STCFormer:基于动态聚类Transformer的自适应时空建模,用于站点级天气预报
摘要
论文提出STCFormer,一种自适应时空Transformer,通过聚类引导注意力模块(Cluster-Guided Attention Block)在每个时间片上对气象站进行动态聚类,该模块结合了局部簇内注意力与全局区域摘要,在全部八项温度与风速预报任务中取得了最低的24小时MSE。
arXiv:2610.00377v1 Announce Type: new
Abstract: Station-based weather forecasting supports daily life and economic activity, yet accurate forecasts require modeling complex spatial dependencies among stations. Recent clustering-based selective modeling offers a promising alternative to dense inter-station interactions. However, a grouping shared across an observation window may obscure local changes in station relationships, while intra-cluster interactions alone may miss important global context. The theoretical advantages of selective interactions over dense connectivity also remain insufficiently understood. We therefore propose STCFormer, an adaptive spatio-temporal Transformer that dynamically groups stations according to their local evolution within each temporal patch. Its Cluster-Guided Attention Block combines fine-grained local attention within clusters and global attention over regional state summaries, allowing each station to access information beyond its own cluster. We further show that a derived Lipschitz upper bound for cluster-conditioned local attention is no larger than its fully connected counterpart, explaining a potential robustness benefit and motivating the design of InfoLoss. Experiments on three real-world weather datasets spanning eight temperature and wind forecasting tasks show that STCFormer achieves the lowest 24-hour mean squared error on all eight tasks and ranks first or second in 47 of 48 comparisons across metrics and forecasting horizons. Ablations and case studies further confirm the benefits of locally adaptive grouping and complementary local-global interactions. Our code can be obtained at https://github.com/hnu-vis/STCFormer.
查看缓存全文
缓存时间: 2026/10/03 09:52
# STCFormer: Adaptive Spatio-Temporal Modeling with Dynamic Cluster Transformer for Station-based Weather Forecasting
Source: [https://arxiv.org/html/2610.00377](https://arxiv.org/html/2610.00377)
Rongwen Li, Haixin Xie, Mingyang Wang, Hongwu LiuKun Fang, Changjian Chen, Zhuo Tang, Kenli Li††thanks:Corresponding to changjianchen@hnu\.edu\.cn\.Affiliation:Hunan UniversityAffiliation:Hunan Provincial Meteorological Bureau
###### Abstract
Station\-based weather forecasting supports daily life and economic activity, yet accurate forecasts require modeling complex spatial dependencies among stations\. Recent clustering\-based selective modeling offers a promising alternative to dense inter\-station interactions\. However, a grouping shared across an observation window may obscure local changes in station relationships, while intra\-cluster interactions alone may miss important global context\. The theoretical advantages of selective interactions over dense connectivity also remain insufficiently understood\. We therefore propose STCFormer, an adaptive spatio\-temporal Transformer that dynamically groups stations according to their local evolution within each temporal patch\. Its Cluster\-Guided Attention Block combines fine\-grained local attention within clusters and global attention over regional state summaries, allowing each station to access information beyond its own cluster\. We further show that a derived Lipschitz upper bound for cluster\-conditioned local attention is no larger than its fully connected counterpart, explaining a potential robustness benefit and motivating the design of InfoLoss\. Experiments on three real\-world weather datasets spanning eight temperature and wind forecasting tasks show that STCFormer achieves the lowest 24\-hour mean squared error on all eight tasks and ranks first or second in 47 of 48 comparisons across metrics and forecasting horizons\. Ablations and case studies further confirm the benefits of locally adaptive grouping and complementary local–global interactions\. Our code can be obtained at https://github\.com/hnu\-vis/STCFormer\.
## 1Introduction
Station\-based weather forecasting supports agriculture, transportation, and many other applications[Lazo et al\. \(2009\)](https://arxiv.org/html/2610.00377#bib.bib13);[Freebairn and Zillman \(2002\)](https://arxiv.org/html/2610.00377#bib.bib14)\. The widespread deployment of automatic weather stations has increased the demand for accurate station\-level predictions, particularly for fine\-grained urban forecasting[Baklanov et al\. \(2018\)](https://arxiv.org/html/2610.00377#bib.bib15);[Rolnick et al\. \(2022\)](https://arxiv.org/html/2610.00377#bib.bib16)\. Shaped by local environments and atmospheric processes, station observations exhibit complex temporal variations and spatial relationships\. Effectively capturing these spatio\-temporal dependencies remains a key challenge in station\-based weather forecasting\.
Existing studies approach this challenge through Spatio\-Temporal \(ST\) and Multivariate Time Series \(MTS\) forecasting\. ST methods incorporate spatial structures, spatio\-temporal priors, or physical processes[Li et al\. \(2018\)](https://arxiv.org/html/2610.00377#bib.bib9);[Wu et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib17)\. MTS methods typically treat stations as channels, modeling them independently or capturing their dependencies through channel mixing[Nie et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib1);[Chen et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib23);[Qiu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib22)\. Because geography and atmospheric processes induce heterogeneous dependencies, dense, fine\-grained interactions between all station pairs are not always necessary\. Recent clustering\-based methods offer a promising strategy for selective dependency modeling by organizing related sequences into groups[Chen et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib23);[Qiu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib22);[Hu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib24)\. Figure[1](https://arxiv.org/html/2610.00377#S1.F1)\(a\) illustrates this grouping\-based perspective\.
Figure 1:Motivation for locally adaptive station grouping\. \(a\) A single grouping is shared across an observation window\. \(b\) A real 72\-hour case from the French temperature dataset shows the strongest relationship shifting from A–B to B–C before all three stations become highly correlated\. Insets report Pearson correlations within each 24\-hour segment\.Despite the promising progress, two key challenges remain\.\(1\) Window\-level grouping can obscure local relationship changes and restrict useful information exchange\.Groups estimated from complete sequences and shared across a window may overlook changing station dependencies as weather processes evolve\. In the real French\-temperature dataset case in Figure[1](https://arxiv.org/html/2610.00377#S1.F1)\(b\), A and B are strongly correlated in the first 24\-hour segment, B and C in the second, and all three stations in the third\. A single grouping can therefore blend distinct local relationships\. Moreover, when groups restrict interactions to their members, useful cross\-region information may be lost: atmospheric circulation and propagating weather systems can connect stations with different local evolution patterns\. Effective selective modeling should thus adapt to local relationship changes while retaining access to global context\.\(2\) Clustering\-based selective interaction still lacks sufficient theoretical support\.Its effectiveness is primarily established empirically, leaving its advantages over dense interaction and potential robustness benefits insufficiently explained\. A theoretical account is needed to complement empirical evidence and inform the design of selective interactions\.
To address these challenges, we proposeSTCFormer, an adaptive spatio\-temporal Transformer\. Joint spatio\-temporal patch embedding represents observations at a local temporal granularity\. Within each temporal patch, efficient EM\-style clustering uses evolution representations to dynamically organize stations into regional units\. The Cluster\-Guided Attention Block \(CGAB\) first performs hard\-routed local attention within clusters, then aggregates the updated state features into regional content centers\. Global station\-to\-region attention allows each station to access summaries from all regions, combining selective local interactions with global context\. Theoretically, we show that the derived Lipschitz upper bound for fixed\-partition local attention is no larger than the corresponding fully connected bound\. We further connect this bound to station–cluster mutual information through the largest cluster size, motivating our mutual\-information clustering regularizer, InfoLoss\. Experiments on three real\-world weather datasets demonstrate strong predictive performance and support the proposed design\.
Our main contributions are as follows:
\(1\)We propose STCFormer, combining evolution\-driven grouping at each temporal patch with cluster\-guided local–global attention to capture changing station dependencies while preserving global context\.
\(2\)We establish a conditional sensitivity analysis of clustering\-based attention, compare its derived Lipschitz upper bound with the dense counterpart, and connect the bound to mutual information to motivate InfoLoss\.
\(3\)Experiments on three real\-world datasets covering eight forecasting tasks demonstrate competitive performance against 15 baselines, while ablations and case studies validate the benefits of locally adaptive grouping and complementary local–global interactions\.
## 2STCFormer
Let𝒳H∈ℝT×N×C\\mathcal\{X\}\_\{H\}\\in\\mathbb\{R\}^\{T\\times N\\times C\}denoteCCmeteorological variables observed atNNstations over the pastTTtime steps\. Our goal is to predict the nextOOsteps,𝒴F∈ℝO×N×C\\mathcal\{Y\}\_\{F\}\\in\\mathbb\{R\}^\{O\\times N\\times C\}\. Figure[2](https://arxiv.org/html/2610.00377#S2.F2)gives an overview of STCFormer\. The model combines locally adaptive station grouping with access to global spatial context\. Spatio\-Temporal Patch Embedding forms compact tokens from local observations and geographic coordinates\. Each subsequent block constructs two temporal views: a state view provides contextualized features for prediction, while an evolution view guides grouping at each temporal patch\. The Cluster\-Guided Attention Block \(CGAB\) first models dependencies within the resulting groups, then enables each station to attend to content summarized from all regions\. A direct prediction head maps the encoded features to future observations\. We then analyze how grouping controls a local\-attention sensitivity bound and use the resulting mutual\-information connection to motivate InfoLoss for within\-patch assignments\.
### 2\.1Spatio\-Temporal Patch Embedding
Patch embedding is an effective way to reduce sequence length in multivariate forecasting[Nie et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib1);[Huang et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib2), while conventional temporal patches encode each variable separately without explicitly incorporating neighboring stations\. We construct joint spatio\-temporal patches to retain local spatial context\. Before patching, stations are grouped into latitude bands and ordered by longitude in alternating directions across adjacent bands\. This snake\-like ordering limits jumps at band boundaries and places geographically nearby stations at nearby indices[Wu et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib17)\. The temporal and station axes are padded to multiples of the patch lengths when necessary\.
LetLtL\_\{t\}andLsL\_\{s\}be the temporal and spatial patch lengths, and letT′T^\{\\prime\}andN′N^\{\\prime\}be the resulting numbers of patches\. The final feature or variable axis is implicit in all slices\. The\(p,s\)\(p,s\)\-th patch is
𝒳p,s\(pa\)=𝒳H\[\(p−1\)Lt:pLt,\(s−1\)Ls:sLs\]∈ℝLt×Ls×C\.\\displaystyle\\mathcal\{X\}^\{\(\\mathrm\{pa\}\)\}\_\{p,s\}=\\mathcal\{X\}\_\{H\}\[\(p\-1\)L\_\{t\}:pL\_\{t\},\(s\-1\)L\_\{s\}:sL\_\{s\}\]\\in\\mathbb\{R\}^\{L\_\{t\}\\times L\_\{s\}\\times C\}\.\(1\)A value projector encodes each flattened patch, while a lightweight geographic projector embeds the normalized latitude and longitude coordinates𝐜s\\mathbf\{c\}\_\{s\}within each spatial patch\. Together with a learnable temporal\-patch position embedding𝐞p\(pos\)\\mathbf\{e\}^\{\(\\mathrm\{pos\}\)\}\_\{p\}, the input representation is
𝒳p,s=fval\(vec\(𝒳p,s\(pa\)\)\)\+fgeo\(𝐜s\)\+𝐞p\(pos\)\.\\displaystyle\\mathcal\{X\}\_\{p,s\}=f\_\{\\mathrm\{val\}\}\\\!\\left\(\\operatorname\{vec\}\(\\mathcal\{X\}^\{\(\\mathrm\{pa\}\)\}\_\{p,s\}\)\\right\)\+f\_\{\\mathrm\{geo\}\}\(\\mathbf\{c\}\_\{s\}\)\+\\mathbf\{e\}^\{\(\\mathrm\{pos\}\)\}\_\{p\}\.\(2\)The embedded tensor𝒳∈ℝT′×N′×D\\mathcal\{X\}\\in\\mathbb\{R\}^\{T^\{\\prime\}\\times N^\{\\prime\}\\times D\}reduces the token grid fromT×NT\\times NtoT′×N′T^\{\\prime\}\\times N^\{\\prime\}while retaining local spatio\-temporal and geographic context for subsequent attention\.
Figure 2:Overview of STCFormer\. \(a\) The forecasting pipeline stacks CGAB encoders over patch embeddings and dual\-view features\. \(b\) Dual\-view representation separates temporal state and local evolution\. \(c\) Spatio\-temporal patch embedding forms joint station–time tokens\. \(d\) CGAB combines dynamic clustering, local attention within clusters, and global attention over regional summaries\.
### 2\.2Dual\-View Temporal Representation
We construct two temporal views to support predictive information exchange and station grouping according to local evolution\. For spatial patchss, the temporal slice𝒳:,s∈ℝT′×D\\mathcal\{X\}\_\{:,s\}\\in\\mathbb\{R\}^\{T^\{\\prime\}\\times D\}contains its features across all temporal patches, where a colon denotes all entries along an axis\. Specifically, the state view uses temporal self\-attention to capture temporal dependencies across the observation window, followed by a feed\-forward update:
𝒳temp:,s\\displaystyle\\mathcal\{X\}^\{\\mathrm\{temp\}\}\_\{:,s\}=SelfAttention\(𝒳:,s\),𝒳:,satt=𝒳:,stemp\+FFN\(𝒳:,stemp\)\.\\displaystyle=\\operatorname\{SelfAttention\}\(\\mathcal\{X\}\_\{:,s\}\),\\qquad\\mathcal\{X\}^\{\\mathrm\{att\}\}\_\{:,s\}=\\mathcal\{X\}^\{\\mathrm\{temp\}\}\_\{:,s\}\+\\operatorname\{FFN\}\(\\mathcal\{X\}^\{\\mathrm\{temp\}\}\_\{:,s\}\)\.\(3\)The resulting state view𝒳att\\mathcal\{X\}^\{\\mathrm\{att\}\}retains temporal context, providing the feature content for subsequent local and global spatial attention\. To make grouping responsive to changes within the observation window, we additionally construct an evolution view at each temporal patch\. It incorporates local changes by concatenating each input token with its first\-order temporal difference:
Δ𝒳p,s\\displaystyle\\Delta\\mathcal\{X\}\_\{p,s\}=𝒳p,s−𝒳p−1,s,𝒳p,sclu=MLPclu\(\[𝒳p,s;Δ𝒳p,s\]\)\.\\displaystyle=\\mathcal\{X\}\_\{p,s\}\-\\mathcal\{X\}\_\{p\-1,s\},\\qquad\\mathcal\{X\}^\{\\mathrm\{clu\}\}\_\{p,s\}=\\operatorname\{MLP\}\_\{\\mathrm\{clu\}\}\\\!\\left\(\[\\mathcal\{X\}\_\{p,s\};\\Delta\\mathcal\{X\}\_\{p,s\}\]\\right\)\.\(4\)Here the difference is defined forp=2,…,T′p=2,\\ldots,T^\{\\prime\}, withΔ𝒳1,s=𝟎\\Delta\\mathcal\{X\}\_\{1,s\}=\\mathbf\{0\}, and concatenation is along the feature axis\. The patch\-aligned views give CGAB temporally contextualized state features for attention and local evolution features for patch\-specific grouping\.
### 2\.3Cluster\-Guided Attention Block \(CGAB\)
We propose the Cluster\-Guided Attention Block to combine time\-varying station interactions with global spatial context\. CGAB comprises two modules: Dynamic Station Clustering and Cluster\-Guided Local–Global Attention\. For notational convenience, we take temporal patchppas an example and write𝒳p,:clu=𝐗clu=\[𝐱1clu,…,𝐱N′clu\]⊤\\mathcal\{X\}^\{\\mathrm\{clu\}\}\_\{p,:\}=\\mathbf\{X\}^\{\\mathrm\{clu\}\}=\[\\mathbf\{x\}^\{\\mathrm\{clu\}\}\_\{1\},\\ldots,\\mathbf\{x\}^\{\\mathrm\{clu\}\}\_\{N^\{\\prime\}\}\]^\{\\top\}and𝒳p,:att=𝐗att=\[𝐱1att,…,𝐱N′att\]⊤\\mathcal\{X\}^\{\\mathrm\{att\}\}\_\{p,:\}=\\mathbf\{X\}^\{\\mathrm\{att\}\}=\[\\mathbf\{x\}^\{\\mathrm\{att\}\}\_\{1\},\\ldots,\\mathbf\{x\}^\{\\mathrm\{att\}\}\_\{N^\{\\prime\}\}\]^\{\\top\}, both inℝN′×D\\mathbb\{R\}^\{N^\{\\prime\}\\times D\}\. Each row corresponds to a spatial patch, referred to as a station token, and the time index is omitted below\.
#### 2\.3\.1Dynamic Station Clustering
To capture relationship changes within an observation window, we group theN′N^\{\\prime\}station tokens intoKKclusters separately at each temporal patch using a differentiable EM\-style procedure[Zhou et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib33);[Li et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib34)\. Each layer maintains learnable prototypes𝐏=\[𝐩1,…,𝐩K\]⊤∈ℝK×D\\mathbf\{P\}=\[\\mathbf\{p\}\_\{1\},\\ldots,\\mathbf\{p\}\_\{K\}\]^\{\\top\}\\in\\mathbb\{R\}^\{K\\times D\}\. These shared prototypes provide a common reference across patches, while patch\-specific updates allow a station to change groups as its local evolution changes\. We perform one E–M update, followed by a final E\-step to obtain the assignments used for spatial interaction\.
Initial E\-step\.Using the prototypes as initial centroids, we compute provisional soft assignments from the evolution descriptors:
r~s,k=softmaxk\(⟨𝐱sclu,𝐩k⟩τ\),\\displaystyle\\widetilde\{r\}\_\{s,k\}=\\operatorname\{softmax\}\_\{k\}\\\!\\left\(\\frac\{\\langle\\mathbf\{x\}\_\{s\}^\{\\mathrm\{clu\}\},\\mathbf\{p\}\_\{k\}\\rangle\}\{\\tau\}\\right\),\(5\)whereτ\>0\\tau\>0is a learned temperature\.M\-step\.The assignments produce a data\-dependent center for each cluster, which is blended with its learnable prototype through an EMA\-style update:
𝐜¯k\\displaystyle\\bar\{\\mathbf\{c\}\}\_\{k\}=∑s=1N′r~s,k𝐱sclumax\(∑s=1N′r~s,k,ϵ\),𝐜k=η𝐜¯k\+\(1−η\)𝐩k\.\\displaystyle=\\frac\{\\sum\_\{s=1\}^\{N^\{\\prime\}\}\\widetilde\{r\}\_\{s,k\}\\mathbf\{x\}\_\{s\}^\{\\mathrm\{clu\}\}\}\{\\max\(\\sum\_\{s=1\}^\{N^\{\\prime\}\}\\widetilde\{r\}\_\{s,k\},\\epsilon\)\},\\qquad\\mathbf\{c\}\_\{k\}=\\eta\\bar\{\\mathbf\{c\}\}\_\{k\}\+\(1\-\\eta\)\\mathbf\{p\}\_\{k\}\.\(6\)Hereη∈\[0,1\]\\eta\\in\[0,1\]balances the current patch’s evolution information and the learned prototype, whileϵ\>0\\epsilon\>0prevents division by zero\. This blend is computed within the current patch and does not carry centroids across time\. Finally, we repeat the E\-step in Eq\. \([5](https://arxiv.org/html/2610.00377#S2.E5)\) with the updated centers𝐜k\\mathbf\{c\}\_\{k\}replacing𝐩k\\mathbf\{p\}\_\{k\}, obtaining the final soft assignments𝐑=\[rs,k\]∈\[0,1\]N′×K\\mathbf\{R\}=\[r\_\{s,k\}\]\\in\[0,1\]^\{N^\{\\prime\}\\times K\}for InfoLoss, hard local routing, and soft regional aggregation\. During training, Gumbel\-Max samples the cluster index
κs=argmax𝑘\(logrs,k\+gs,k\),gs,k∼Gumbel\(0,1\)\.\\displaystyle\\kappa\_\{s\}=\\underset\{k\}\{\\arg\\max\}\\bigl\(\\log r\_\{s,k\}\+g\_\{s,k\}\\bigr\),\\qquad g\_\{s,k\}\\sim\\operatorname\{Gumbel\}\(0,1\)\.\(7\)The hard assignment matrix𝐇∈\{0,1\}N′×K\\mathbf\{H\}\\in\\\{0,1\\\}^\{N^\{\\prime\}\\times K\}hasHs,k=1H\_\{s,k\}=1iffk=κsk=\\kappa\_\{s\}\. During training, a straight\-through Gumbel–Softmax estimator preserves hard routing in the forward pass while enabling backpropagation through the assignment probabilities[Huijben et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib3)\. At inference, we omit the noise and setκs=argmaxkrs,k\\kappa\_\{s\}=\\arg\\max\_\{k\}r\_\{s,k\}\. Recomputing this E–M–E procedure at each temporal patch lets groups track local changes within the observation window\. Its hard assignments determine local attention neighborhoods, while the corresponding soft assignments carry graded membership into regional aggregation\.
#### 2\.3\.2Cluster\-Guided Local–Global Attention
Tokens are grouped according to similarity in their local evolution representations\. We express local attention over the state features𝐗att\\mathbf\{X\}^\{\\mathrm\{att\}\}using𝐇𝐇⊤\\mathbf\{H\}\\mathbf\{H\}^\{\\top\}as a mask; our experiments implement the same hard partition with efficient packed attention \(Appendix[B](https://arxiv.org/html/2610.00377#A2)\):
𝐗loc=𝐗att\+Softmax\(\(𝐗att𝐖Qloc\)\(𝐗att𝐖Kloc\)⊤D\+log\(𝐇𝐇⊤\)\)\(𝐗att𝐖Vloc\)\.\\displaystyle\\mathbf\{X\}^\{\\mathrm\{loc\}\}=\\mathbf\{X\}^\{\\mathrm\{att\}\}\+\\operatorname\{Softmax\}\\\!\\left\(\\frac\{\(\\mathbf\{X\}^\{\\mathrm\{att\}\}\\mathbf\{W\}^\{\\mathrm\{loc\}\}\_\{Q\}\)\(\\mathbf\{X\}^\{\\mathrm\{att\}\}\\mathbf\{W\}^\{\\mathrm\{loc\}\}\_\{K\}\)^\{\\top\}\}\{\\sqrt\{D\}\}\+\\log\(\\mathbf\{H\}\\mathbf\{H\}^\{\\top\}\)\\right\)\(\\mathbf\{X\}^\{\\mathrm\{att\}\}\\mathbf\{W\}^\{\\mathrm\{loc\}\}\_\{V\}\)\.\(8\)At each temporal patch, the mask restricts this attention step to station tokens assigned to the same region\. The state view can therefore model fine\-grained dependencies among stations with similar recent evolution\.
Stations with different local evolution patterns may still provide useful predictive context\. We therefore complement local attention with global station\-to\-region attention over all regional content centers\. Specifically, the regional M\-step aggregates the locally refined state features𝐗loc\\mathbf\{X\}^\{\\mathrm\{loc\}\}with the soft assignments𝐑\\mathbf\{R\}\. Let𝐃R=Diag\(max\(𝐑⊤𝟏,ϵ\)\)\\mathbf\{D\}\_\{R\}=\\operatorname\{Diag\}\(\\max\(\\mathbf\{R\}^\{\\top\}\\mathbf\{1\},\\epsilon\)\), whereϵ=10−6\\epsilon=10^\{\-6\}and the maximum is elementwise\. We then perform cross\-attention with𝐗loc\\mathbf\{X\}^\{\\mathrm\{loc\}\}as queries and𝝁\\bm\{\\mu\}as keys and values:
𝝁\\displaystyle\\bm\{\\mu\}=𝐃R−1𝐑⊤𝐗loc,𝐗glo=𝐗loc\+Softmax\(\(𝐗loc𝐖Qglo\)\(𝝁𝐖Kglo\)⊤D\)\(𝝁𝐖Vglo\)\.\\displaystyle=\\mathbf\{D\}\_\{R\}^\{\-1\}\\mathbf\{R\}^\{\\top\}\\mathbf\{X\}^\{\\mathrm\{loc\}\},\\qquad\\mathbf\{X\}^\{\\mathrm\{glo\}\}=\\mathbf\{X\}^\{\\mathrm\{loc\}\}\+\\operatorname\{Softmax\}\\\!\\left\(\\frac\{\(\\mathbf\{X\}^\{\\mathrm\{loc\}\}\\mathbf\{W\}^\{\\mathrm\{glo\}\}\_\{Q\}\)\(\\bm\{\\mu\}\\mathbf\{W\}^\{\\mathrm\{glo\}\}\_\{K\}\)^\{\\top\}\}\{\\sqrt\{D\}\}\\right\)\(\\bm\{\\mu\}\\mathbf\{W\}^\{\\mathrm\{glo\}\}\_\{V\}\)\.\(9\)The regional centers𝝁\\bm\{\\mu\}summarize state content, whereas the updated clustering centers\{𝐜k\}k=1K\\\{\\mathbf\{c\}\_\{k\}\\\}\_\{k=1\}^\{K\}represent evolution for grouping\. Soft weights retain each token’s degree of membership when forming these centers, even though local attention uses hard cluster boundaries\. Each station queries all regional centers, accessing global context beyond its own group without all\-to\-all station attention\. We then apply a feed\-forward update for nonlinear transformation:
𝐗out=𝐗glo\+FFN\(𝐗glo\)\.\\displaystyle\\mathbf\{X\}^\{\\mathrm\{out\}\}=\\mathbf\{X\}^\{\\mathrm\{glo\}\}\+\\operatorname\{FFN\}\(\\mathbf\{X\}^\{\\mathrm\{glo\}\}\)\.\(10\)Thus, local attention captures fine\-grained dependencies within evolving clusters, while global attention shares information across clusters through compact regional summaries\. This separation preserves selective local interactions without isolating stations from other regions\. The following sensitivity analysis focuses on local attention; the equations above use single\-head notation for clarity\.
##### Direct prediction\.
For spatial patchss, we flatten the encoded temporal features𝐅s∈ℝT′×D\\mathbf\{F\}\_\{s\}\\in\\mathbb\{R\}^\{T^\{\\prime\}\\times D\}and predict allOLsOL\_\{s\}future values for one target variable:
𝐘^s=ReshapeO×Ls\(MLPpred\(LN\(vec\(𝐅s\)\)\)\)\.\\widehat\{\\mathbf\{Y\}\}\_\{s\}=\\operatorname\{Reshape\}\_\{O\\times L\_\{s\}\}\\\!\\left\(\\operatorname\{MLP\}\_\{\\mathrm\{pred\}\}\\\!\\left\(\\operatorname\{LN\}\(\\operatorname\{vec\}\(\\mathbf\{F\}\_\{s\}\)\)\\right\)\\right\)\.\(11\)The MLP uses two affine layers with GELU and dropout between them\. The patch outputs are assembled, unpadded, and reordered to recover forecasts in the original station order\.
### 2\.4Lipschitz Bounds and Mutual Information Regularization
In this section, we analyze the potential sensitivity advantage of cluster\-conditioned local attention over dense attention\. Following bounded\-domain analyses of attention\([Castin et al\., 2024](https://arxiv.org/html/2610.00377#bib.bib41)\), we compare the two operators under identical projection weights and feature\-norm constraints\. At one temporal patch, letn=N′n=N^\{\\prime\}, fix a hard partitionHH, and denote its largest cluster size bym\(H\)m\(H\)\. Let𝒜H\\mathcal\{A\}\_\{H\}be the single\-head residual local\-attention operator in Eq\. \([8](https://arxiv.org/html/2610.00377#S2.E8)\), and𝒜dense\\mathcal\{A\}\_\{\\mathrm\{dense\}\}its fully connected counterpart\. Features use the Frobenius norm onΩRX=\{U:maxs‖us‖2≤RX\}\\Omega\_\{R\_\{X\}\}=\\\{U:\\max\_\{s\}\\\|u\_\{s\}\\\|\_\{2\}\\leq R\_\{X\}\\\}, and weights use the spectral norm\.
###### Theorem 2\.1\(Grouping\-dependent sensitivity bound\)\.
Letv=‖WVloc‖2v=\\\|W\_\{V\}^\{\\mathrm\{loc\}\}\\\|\_\{2\}and
β=RX2‖WQloc\(WKloc\)⊤‖2D\.\\beta=\\frac\{R\_\{X\}^\{2\}\\\|W\_\{Q\}^\{\\mathrm\{loc\}\}\(W\_\{K\}^\{\\mathrm\{loc\}\}\)^\{\\top\}\\\|\_\{2\}\}\{\\sqrt\{D\}\}\.Forq≥1q\\geq 1, define the nondecreasing bound
B\(q\)=1\+v\[β\+\(1\+β\)qe2βq−1\+e2β\]\.B\(q\)=1\+v\\left\[\\beta\+\(1\+\\beta\)\\sqrt\{\\frac\{qe^\{2\\beta\}\}\{q\-1\+e^\{2\\beta\}\}\}\\right\]\.\(12\)Then the derived Lipschitz upper bounds satisfy
Bours\(H\):=B\(m\(H\)\)≤B\(n\)=:Bdense\.B\_\{\\mathrm\{ours\}\}\(H\):=B\(m\(H\)\)\\leq B\(n\)=:B\_\{\\mathrm\{dense\}\}\.\(13\)Moreover,LipF\(𝒜H\)≤Bours\(H\)\\operatorname\{Lip\}\_\{F\}\(\\mathcal\{A\}\_\{H\}\)\\leq B\_\{\\mathrm\{ours\}\}\(H\)andLipF\(𝒜dense\)≤Bdense\\operatorname\{Lip\}\_\{F\}\(\\mathcal\{A\}\_\{\\mathrm\{dense\}\}\)\\leq B\_\{\\mathrm\{dense\}\}\.
Sincem\(H\)≤nm\(H\)\\leq nandBBis nondecreasing, the derived local\-attention bound is no larger than the dense bound and is strictly tighter whenm\(H\)<nm\(H\)<nandv,β\>0v,\\beta\>0\. The maximum cluster size therefore controls the local\-attention certificate\. This observation motivates a loss that favors informative, non\-degenerate assignments rather than allowing cluster collapse\.
Mutual information clustering loss\.LetR∈\[0,1\]n×KR\\in\[0,1\]^\{n\\times K\}be row\-stochastic, with1≤K≤n1\\leq K\\leq n\. LetXXbe a station token sampled uniformly within the patch andYYits cluster label, withPr\(Y=k∣X=𝐱sclu\)=Rs,k\\Pr\(Y=k\\mid X=\\mathbf\{x\}\_\{s\}^\{\\mathrm\{clu\}\}\)=R\_\{s,k\}\. Using natural logarithms, we maximize the within\-patch mutual informationI\(X,Y\)=H\(Y\)−H\(Y∣X\)I\(X;Y\)=H\(Y\)\-H\(Y\\mid X\)\([Gomes et al\., 2010](https://arxiv.org/html/2610.00377#bib.bib40)\)\. Restoring the temporal\-patch indexpp, write
πp,k=1N′∑sRp,s,k,H\(Yp∣Xp\)=1N′∑sH\(𝐑p,s,:\),\\pi\_\{p,k\}=\\frac\{1\}\{N^\{\\prime\}\}\\sum\_\{s\}R\_\{p,s,k\},\\qquad H\(Y\_\{p\}\\mid X\_\{p\}\)=\\frac\{1\}\{N^\{\\prime\}\}\\sum\_\{s\}H\(\\mathbf\{R\}\_\{p,s,:\}\),\(14\)whereH\(𝐫\)=−∑krklogrkH\(\\mathbf\{r\}\)=\-\\sum\_\{k\}r\_\{k\}\\log r\_\{k\}andH\(Yp\)=H\(𝝅p\)H\(Y\_\{p\}\)=H\(\\bm\{\\pi\}\_\{p\}\)\. We minimize the negative mutual information
ℒinfo=−∑ℓ=1L1T′∑p=1T′I\(Xp\(ℓ\);Yp\(ℓ\)\)=∑ℓ=1L1T′∑p=1T′\[1N′∑sH\(𝐑p,s,:\(ℓ\)\)−H\(𝝅p\(ℓ\)\)\]\.\\mathcal\{L\}\_\{\\mathrm\{info\}\}=\-\\sum\_\{\\ell=1\}^\{L\}\\frac\{1\}\{T^\{\\prime\}\}\\sum\_\{p=1\}^\{T^\{\\prime\}\}I\(X\_\{p\}^\{\(\\ell\)\};Y\_\{p\}^\{\(\\ell\)\}\)=\\sum\_\{\\ell=1\}^\{L\}\\frac\{1\}\{T^\{\\prime\}\}\\sum\_\{p=1\}^\{T^\{\\prime\}\}\\left\[\\frac\{1\}\{N^\{\\prime\}\}\\sum\_\{s\}H\(\\mathbf\{R\}\_\{p,s,:\}^\{\(\\ell\)\}\)\-H\(\\bm\{\\pi\}\_\{p\}^\{\(\\ell\)\}\)\\right\]\.\(15\)HereLLis the number of encoder layers: InfoLoss is computed at every layer, averaged over its temporal patches, and summed over layers\. Lower conditional entropy encourages confident assignments, while higher marginal entropy encourages balanced cluster use\. We train withℒ=ℒpred\+λℒinfo\\mathcal\{L\}=\\mathcal\{L\}\_\{\\mathrm\{pred\}\}\+\\lambda\\mathcal\{L\}\_\{\\mathrm\{info\}\}, using MSE forℒpred\\mathcal\{L\}\_\{\\mathrm\{pred\}\}and a single regularization weightλ\\lambda\. The following theorem formalizes why this objective is relevant: increasing station–cluster mutual information tightens a probabilistic certificate on the largest sampled group, which in turn tightens the derived local\-attention bound\.
###### Theorem 2\.2\(Mutual\-information control of sampled grouping\)\.
Conditional onRR, sample token labels independently according to its rows, as in training\-time Gumbel\-Max\. Forδ∈\(0,1\)\\delta\\in\(0,1\), define
Mδ\(I\)=min\{n,nK\+\(n22\+nδ\)\(logK−I\)\}\.M\_\{\\delta\}\(I\)=\\min\\\!\\left\\\{n,\\;\\frac\{n\}\{K\}\+\\sqrt\{\\left\(\\frac\{n^\{2\}\}\{2\}\+\\frac\{n\}\{\\delta\}\\right\)\(\\log K\-I\)\}\\right\\\}\.\(16\)Then, with conditional probability at least1−δ1\-\\delta,
m\(H\)≤Mδ\(I\(X,Y\)\),Bours\(H\)≤B\(Mδ\(I\(X,Y\)\)\)\.m\(H\)\\leq M\_\{\\delta\}\(I\(X;Y\)\),\\qquad B\_\{\\mathrm\{ours\}\}\(H\)\\leq B\\\!\\left\(M\_\{\\delta\}\(I\(X;Y\)\)\\right\)\.\(17\)
At fixedn,K,v,β,δn,K,v,\\beta,\\delta, increasing mutual information tightens or preserves this probabilistic certificate\. Together, the two results connect the training objective to the sensitivity analysis: InfoLoss promotes informative assignments, the mutual\-information theorem controls the largest sampled group, and the grouping theorem maps that size to the local\-attention bound\. The failure probabilityδ\\deltais an analysis parameter, not a training hyperparameter\. Appendix[D](https://arxiv.org/html/2610.00377#A4)gives the proofs and a deterministic argmax counterpart; Appendix[E](https://arxiv.org/html/2610.00377#A5)discusses further loss properties\.
## 3Experiments
### 3\.1Experimental Setup
##### Datasets and Baselines\.
We evaluate STCFormer on three real\-world weather datasets—French, Hunan, and Global—covering eight temperature and wind forecasting tasks\. All datasets use a 6:2:2 training/validation/test split and Z\-score normalization based on training\-set statistics\. We compare with 15 baselines: six spatio\-temporal methods and nine multivariate time series methods\. Dataset descriptions and the complete baseline list are provided in Appendices[F\.1](https://arxiv.org/html/2610.00377#A6.SS1)and[F\.2](https://arxiv.org/html/2610.00377#A6.SS2)\.
##### Implementation Details\.
All experiments use PyTorch and BasicTS[Shao et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib28)on an NVIDIA A100 GPU \(40 GB\)\. We use a 48\-hour look\-back window to forecast the next 24 and 72 hours, with MSE as the training loss\. Models are trained with Adam for up to 50 epochs, with an early\-stopping patience of 5\. We repeat each experiment three times and report mean and standard deviation\. The main text presents 24\-hour MSE; other metrics and 72\-hour results appear in the appendix\. Full training and model configurations are given in Appendix[F\.3](https://arxiv.org/html/2610.00377#A6.SS3)\.
### 3\.2Main Results
Table 1:24\-hour forecasting results \(MSE,↓\\downarrow\) with a 48\-hour look\-back window\. Values are mean±\\pmstandard deviation over three runs\. Bold and underlined means indicate the best and second\-best reported values in each column; ties share the same marking\.Table[1](https://arxiv.org/html/2610.00377#S3.T1)reports 24\-hour MSE on eight dataset–variable tasks\. The corresponding 24\-hour MAE and SEDI, together with all 72\-hour metrics, are reported in Appendix[G](https://arxiv.org/html/2610.00377#A7)\. STCFormer achieves the lowest mean 24\-hour MSE on all eight tasks, consistently outperforming both spatio\-temporal and multivariate forecasting methods\. Relative to the second\-best mean in each task, it reduces MSE by 2\.2% on average\. The additional results in Appendix[G](https://arxiv.org/html/2610.00377#A7)further demonstrate this consistency\.
Across all 48 dataset–variable–horizon–metric combinations, STCFormer ranks first in 42 and second in five\. It also outperforms the clustering\-based methods DUET and CCM and the dynamic interaction\-selection method TimeFilter on every task in the main table\. We attribute this advantage to locally adaptive clustering, which tracks changing station relationships, together with global attention over regional summaries, which restores information exchange across clusters\. Overall, the results support a stable predictive advantage across heterogeneous station networks\.
### 3\.3Ablation Studies
We evaluate six variants: one grouping shared across the observation window \(Window\-shared\), full spatial attention instead of CGAB \(Full Attention\), fixed geographic grouping \(Static Clustering\), and removal ofInfoLoss,global attention, orlocal attention\. Table[2](https://arxiv.org/html/2610.00377#S3.T2)reports 24\-hour MSE; the corresponding MAE and SEDI results appear in Appendix[H](https://arxiv.org/html/2610.00377#A8)\.
Table 2:24\-hour ablation results \(MSE,↓\\downarrow\) with a 48\-hour look\-back window\. Values are mean±\\pmstandard deviation over three runs\. Bold means indicate the best reported values in each column; ties are both bold\.The full model achieves the lowest mean MSE on all eight tasks\.\(1\)Sharing one grouping across the window increases MSE on all tasks, supporting grouping updates within the window\. Averaged over the eight tasks, Window\-shared raises MSE by 2\.9%, whereas replacing CGAB with full attention raises it by 3\.6%\. The latter result indicates that selective, structured interaction is beneficial beyond merely reducing attention cost\.\(2\)Fixed geographic grouping produces a 3\.3% average increase, showing that geographic proximity alone cannot capture the input\-dependent relationships exposed by evolving weather conditions\. Removing the within\-patch InfoLoss regularizer also increases MSE, with task\-dependent effects: Hunan temperature rises from 4\.743 to 5\.119, while Global temperature changes only from 6\.917 to 6\.930\. This variation is consistent with InfoLoss acting most strongly when the task benefits from clearer assignment structure\.\(3\)Removing either attention branch worsens all tasks\. On Global wind, MSE rises from 3\.584 to 3\.760 without global attention and 3\.811 without local attention, supporting their complementary roles\. Together, these comparisons isolate the contributions of assignment adaptivity, regularized grouping, and cross\-region information exchange rather than attributing the gain to a single component\.
### 3\.4Model Analysis
#### 3\.4\.1Hyperparameter Sensitivity
We evaluate the InfoLoss weightλ\\lambda, cluster ratioρ\\rho, and embedding dimensiondmodeld\_\{\\mathrm\{model\}\}on the French, Hunan, and Global temperature tasks using 24\-hour MSE\. The cluster count isK≈ρN′K\\approx\\rho N^\{\\prime\}, whereN′N^\{\\prime\}denotes the station tokens after spatial patching\. Look\-back and patch\-size studies are provided in Appendix[I\.3](https://arxiv.org/html/2610.00377#A9.SS3)\.
\(a\)MSE w\.r\.t\. differentλ\\lambda\.\(b\)MSE w\.r\.t\. differentρ\\rho\.\(c\)MSE w\.r\.t\. differentdmodeld\_\{\\text\{model\}\}\.
Figure 3:Hyperparameter sensitivity on three temperature tasks \(24\-hour MSE\)\. Red markers indicate the lowest reported MSE within each dataset’s sweep\.Figure[3](https://arxiv.org/html/2610.00377#S3.F3)shows moderate sensitivity across all three settings\. The bestλ\\lambdais0\.10\.1on French and Hunan and0\.20\.2on Global, while larger weights bring no further gain\. Intermediate cluster ratios are preferred:ρ=0\.1\\rho=0\.1performs best on French and Hunan, and0\.050\.05on Global, with nearby settings remaining competitive\. French favorsdmodel=256d\_\{\\mathrm\{model\}\}=256, whereas Hunan and Global favor 512; however, gains beyond 256 are small\. Overall, STCFormer remains stable over practical ranges and does not require uniformly large regularization, cluster counts, or feature dimensions\.
#### 3\.4\.2Efficiency Analysis
Figure 4:Efficiency on Hunan temperature \(48\-to\-24\-hour forecasting, batch size 8\)\.Figure[4](https://arxiv.org/html/2610.00377#S3.F4)compares accuracy, mean training time per epoch, and peak memory on Hunan\. Among the methods shown, STCFormer achieves the lowest reported MSE \(4\.743\) and memory usage \(7\.429 GiB\), taking46\.372±0\.09546\.372\\pm 0\.095s/epoch\. Compared with Crossformer, it reduces training time by 26\.0% and memory by 35\.4%; it is2\.87×2\.87\\timesfaster than TimeFilter\. PatchTST trains faster \(36\.913 s/epoch\), but has higher MSE \(5\.509\) and memory usage \(7\.930 GiB\)\. The bubble sizes make clear that STCFormer’s accuracy gain does not come with a larger memory footprint\. This result is consistent with CGAB’s selective local interactions and compact regional summaries, which retain cross\-cluster information without dense station\-wise attention\. STCFormer thus provides a favorable accuracy–resource trade\-off on the larger station network\. Appendix[I\.4](https://arxiv.org/html/2610.00377#A9.SS4)reports the French comparison\.
#### 3\.4\.3Dynamic Clustering Case Study
Figure 5:Dynamic, fixed, and random grouping on all French\-temperature test windows \(→2448\\\!\\rightarrow\\\!24\)\. Parentheses report MSE\.To test whether learned groups track within\-window relationship changes, we evaluate all test windows from the French\-temperature 48\-to\-24\-hour forecasting task\. For each window, we measure within\-cluster evolution coherence using Pearson correlations between hourly temperature increments for valid co\-clustered station pairs and average the scores over local temporal blocks\. Higher values indicate that stations grouped together exhibit more consistent short\-term evolution\.
Figure[5](https://arxiv.org/html/2610.00377#S3.F5)compares dynamic grouping with a fixed window\-shared partition and size\-matched random grouping\. Dynamic grouping achieves the highest median coherence \(0\.385\), compared with Fixed \(0\.290\) and Random \(0\.244\), while also obtaining the lowest forecasting MSE \(6\.291 versus 6\.516 and 6\.620\)\. Fixed remains better than Random, indicating persistent station dependence; the additional gain from Dynamic shows that updating assignments within a window captures transient couplings that a single shared partition obscures\.
## 4Conclusion
We introduced STCFormer to model locally changing station dependencies while preserving global context for weather forecasting\. Evolution\-driven grouping adapts spatial interactions at each temporal patch, and CGAB combines fine\-grained local attention within clusters and global attention over regional state summaries\. Our theoretical analysis shows that the derived Lipschitz upper bound for fixed\-partition local attention is no larger than its dense counterpart\. Its connection to station–cluster mutual information motivates InfoLoss\. Across three real\-world datasets, STCFormer achieves the lowest 24\-hour MSE on all eight tasks and ranks first or second in 47 of 48 metric–task–horizon comparisons\. Ablations and case studies support the complementary roles of local grouping updates, global context, and clustering regularization\. These findings support locally adaptive, selective spatial modeling for station\-based weather forecasting\.
### AI use statement
Generative AI assisted the authors with preliminary exploration, literature review, and manuscript polishing and editing\. The authors remain fully responsible for the accuracy of the text, the cited references, and the reported research\.
## References
- Ansariet al\.\(2024\)A\. F\. Ansari, L\. Stella, C\. Turkmen, X\. Zhang, P\. Mercado, H\. Shen, O\. Shchur, S\. S\. Rangapuram, S\. Pineda Arango, S\. Kapoor, J\. Zschiegner, D\. C\. Maddix, M\. W\. Mahoney, K\. Torkkola, A\. G\. Wilson, M\. Bohlke\-Schneider, and Y\. WangChronos: learning the language of time series\.Transactions on Machine Learning Research\.External Links:[Link](https://openreview.net/forum?id=gerNCVqqtR)Cited by:[§I\.1](https://arxiv.org/html/2610.00377#A9.SS1.p1.1)\.
- Baklanovet al\.\(2018\)A\. Baklanov, C\. S\. B\. Grimmond, D\. Carlson, D\. Terblanche, X\. Tang, V\. Bouchet, B\. Lee, G\. Langendijk, R\. K\. Kolli, and A\. HovsepyanFrom urban meteorology, climate and environment research to integrated city services\.Urban Climate23,pp\. 330–341\.Cited by:[§1](https://arxiv.org/html/2610.00377#S1.p1.1)\.
- Castinet al\.\(2024\)V\. Castin, P\. Ablin, and G\. PeyréHow smooth is attention?\.InProceedings of the 41st International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.235,pp\. 5817–5840\.External Links:[Link](https://proceedings.mlr.press/v235/castin24a.html)Cited by:[§D\.2](https://arxiv.org/html/2610.00377#A4.SS2.p2.3.1),[§2\.4](https://arxiv.org/html/2610.00377#S2.SS4.p1.1)\.
- Chenet al\.\(2026\)H\. Chen, X\. Li, X\. Chen, Y\. Cheng, J\. Li, K\. Chen, and L\. NieS2\{\}^\{2\}Transformer: scalable structured transformers for global station weather forecasting\.Transactions on Machine Learning Research\.External Links:[Link](https://openreview.net/forum?id=AL2VnKno5n)Cited by:[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1)\.
- Chenet al\.\(2024\)J\. Chen, J\. E\. Lenssen, A\. Feng, W\. Hu, M\. Fey, L\. Tassiulas, J\. Leskovec, and R\. YingFrom similarity to superiority: channel clustering for time series forecasting\.InAdvances in Neural Information Processing Systems 37: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 \- 15, 2024,Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p3.1),[§C\.3](https://arxiv.org/html/2610.00377#A3.SS3.p2.1),[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1),[§1](https://arxiv.org/html/2610.00377#S1.p2.1)\.
- Daset al\.\(2023\)A\. Das, W\. Kong, A\. Leach, S\. Mathur, R\. Sen, and R\. YuLong\-term forecasting with tide: time\-series dense encoder\.Trans\. Mach\. Learn\. Res\.2023\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p2.1)\.
- Freebairn and Zillman \(2002\)J\. W\. Freebairn and J\. W\. ZillmanEconomic benefits of meteorological services\.Meteorological Applications9\(1\),pp\. 33–44\.Cited by:[§1](https://arxiv.org/html/2610.00377#S1.p1.1)\.
- Fuet al\.\(2025\)Y\. Fu, F\. Wang, Z\. Shao, B\. Diao, L\. Wu, Z\. An, C\. Yu, Y\. Li, and Y\. XuOn the integration of spatial\-temporal knowledge: a lightweight approach to atmospheric time series forecasting\.InAdvances in Neural Information Processing Systems,Vol\.38\.External Links:[Link](https://papers.nips.cc/paper_files/paper/2025/file/7691484a7a35d5e2742279c1d926b778-Paper-Conference.pdf)Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p1.1),[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1)\.
- Gaoet al\.\(2022\)Z\. Gao, C\. Tan, L\. Wu, and S\. Z\. LiSimVP: simpler yet better video prediction\.InIEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2022, New Orleans, LA, USA, June 18\-24, 2022,pp\. 3160–3170\.Cited by:[§I\.2](https://arxiv.org/html/2610.00377#A9.SS2.p1.1)\.
- Gomeset al\.\(2010\)R\. Gomes, A\. Krause, and P\. PeronaDiscriminative clustering by regularized information maximization\.InAdvances in Neural Information Processing Systems,Vol\.23\.External Links:[Link](https://proceedings.neurips.cc/paper_files/paper/2010/file/42998cf32d552343bc8e460416382dca-Paper.pdf)Cited by:[§2\.4](https://arxiv.org/html/2610.00377#S2.SS4.p3.1)\.
- Guen and Thome \(2020\)V\. L\. Guen and N\. ThomeDisentangling physical dynamics from unknown factors for unsupervised video prediction\.In2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13\-19, 2020,pp\. 11471–11481\.Cited by:[§I\.2](https://arxiv.org/html/2610.00377#A9.SS2.p1.1)\.
- Hewageet al\.\(2020\)P\. Hewage, A\. Behera, M\. Trovati, E\. Pereira, M\. Ghahremani, F\. Palmieri, and Y\. LiuTemporal convolutional neural \(tcn\) network for an effective weather forecasting using time\-series data from the local weather station\.Soft Computing24\(21\),pp\. 16453–16482\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p2.1)\.
- Huet al\.\(2025\)Y\. Hu, G\. Zhang, P\. Liu, D\. Lan, N\. Li, D\. Cheng, T\. Dai, S\. Xia, and S\. PanTimeFilter: patch\-specific spatial\-temporal graph filtration for time series forecasting\.InForty\-second International Conference on Machine Learning, ICML 2025, Vancouver, BC, Canada, July 13\-19, 2025,Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p3.1),[§C\.3](https://arxiv.org/html/2610.00377#A3.SS3.p3.1),[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1),[§1](https://arxiv.org/html/2610.00377#S1.p2.1)\.
- Huanget al\.\(2024\)Q\. Huang, L\. Shen, R\. Zhang, J\. Cheng, S\. Ding, Z\. Zhou, and Y\. WangHDMixer: hierarchical dependency with extendable patch for multivariate time series forecasting\.Proceedings of the AAAI Conference on Artificial Intelligence38\(11\),pp\. 12608–12616\.External Links:[Document](https://dx.doi.org/10.1609/aaai.v38i11.29155)Cited by:[§2\.1](https://arxiv.org/html/2610.00377#S2.SS1.p1.1)\.
- Huijbenet al\.\(2023\)I\. A\. M\. Huijben, W\. Kool, M\. B\. Paulus, and R\. J\. G\. van SlounA review of the gumbel\-max trick and its extensions for discrete stochasticity in machine learning\.IEEE Trans\. Pattern Anal\. Mach\. Intell\.45\(2\),pp\. 1353–1371\.Cited by:[§2\.3\.1](https://arxiv.org/html/2610.00377#S2.SS3.SSS1.p2.4)\.
- Jianget al\.\(2023\)R\. Jiang, Z\. Wang, J\. Yong, P\. Jeph, Q\. Chen, Y\. Kobayashi, X\. Song, S\. Fukushima, and T\. SuzumuraSpatio\-temporal meta\-graph learning for traffic forecasting\.InThirty\-Seventh AAAI Conference on Artificial Intelligence, AAAI 2023, Thirty\-Fifth Conference on Innovative Applications of Artificial Intelligence, IAAI 2023, Thirteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2023, Washington, DC, USA, February 7\-14, 2023,pp\. 8078–8086\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p1.1)\.
- Kim and Suk \(2026\)D\. Kim and H\. SukSIGMAformer: a spatiotemporal gaussian mixture correlation transformer for global weather forecasting\.npj Climate and Atmospheric Science9,pp\. 113\.External Links:[Document](https://dx.doi.org/10.1038/s41612-026-01385-w),[Link](https://www.nature.com/articles/s41612-026-01385-w)Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p1.1)\.
- Lazoet al\.\(2009\)J\. K\. Lazo, R\. E\. Morss, and J\. L\. Demuth300 billion served: sources, perceptions, uses, and values of weather forecasts\.Bulletin of the American Meteorological Society90\(6\),pp\. 785–798\.Cited by:[§1](https://arxiv.org/html/2610.00377#S1.p1.1)\.
- Liet al\.\(2024\)R\. Li, H\. Hu, L\. Du, J\. Chen, B\. Jiang, and P\. ZhouOne\-stage fair multi\-view spectral clustering\.InProceedings of the 32nd ACM International Conference on Multimedia,pp\. 1407–1416\.Cited by:[§2\.3\.1](https://arxiv.org/html/2610.00377#S2.SS3.SSS1.p1.1)\.
- Liet al\.\(2018\)Y\. Li, R\. Yu, C\. Shahabi, and Y\. LiuDiffusion convolutional recurrent neural network: data\-driven traffic forecasting\.In6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 \- May 3, 2018, Conference Track Proceedings,Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p1.1),[§C\.3](https://arxiv.org/html/2610.00377#A3.SS3.p2.1),[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1),[§1](https://arxiv.org/html/2610.00377#S1.p2.1)\.
- Linet al\.\(2025\)S\. Lin, H\. Chen, H\. Wu, C\. Qiu, and W\. LinTemporal query network for efficient multivariate time series forecasting\.InProceedings of the 42nd International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.267,pp\. 37797–37814\.External Links:[Link](https://proceedings.mlr.press/v267/lin25e.html)Cited by:[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1)\.
- Liuet al\.\(2022\)D\. Liu, J\. Wang, S\. Shang, and P\. HanMSDR: multi\-step dependency relation networks for spatial temporal forecasting\.InKDD ’22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 \- 18, 2022,pp\. 1042–1050\.External Links:[Document](https://dx.doi.org/10.1145/3534678.3539397)Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p1.1)\.
- Liuet al\.\(2024a\)Y\. Liu, T\. Hu, H\. Zhang, H\. Wu, S\. Wang, L\. Ma, and M\. LongITransformer: inverted transformers are effective for time series forecasting\.InThe Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7\-11, 2024,Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p2.1)\.
- Liuet al\.\(2024b\)Y\. Liu, H\. Zhang, C\. Li, X\. Huang, J\. Wang, and M\. LongTimer: generative pre\-trained transformers are large time series models\.InProceedings of the 41st International Conference on Machine Learning,Vol\.235,pp\. 32369–32399\.External Links:[Link](https://proceedings.mlr.press/v235/liu24cb.html)Cited by:[§I\.1](https://arxiv.org/html/2610.00377#A9.SS1.p1.1)\.
- Nieet al\.\(2023\)Y\. Nie, N\. H\. Nguyen, P\. Sinthong, and J\. KalagnanamA time series is worth 64 words: long\-term forecasting with transformers\.InThe Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1\-5, 2023,Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p2.1),[§C\.3](https://arxiv.org/html/2610.00377#A3.SS3.p2.1),[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1),[§1](https://arxiv.org/html/2610.00377#S1.p2.1),[§2\.1](https://arxiv.org/html/2610.00377#S2.SS1.p1.1)\.
- Qiuet al\.\(2025\)X\. Qiu, X\. Wu, Y\. Lin, C\. Guo, J\. Hu, and B\. YangDUET: dual clustering enhanced multivariate time series forecasting\.InProceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining, V\.1, KDD 2025, Toronto, ON, Canada, August 3\-7, 2025,pp\. 1185–1196\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p3.1),[§C\.3](https://arxiv.org/html/2610.00377#A3.SS3.p3.1),[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1),[§1](https://arxiv.org/html/2610.00377#S1.p2.1)\.
- Rolnicket al\.\(2022\)D\. Rolnick, P\. L\. Donti, L\. H\. Kaack, K\. Kochanski, A\. Lacoste, K\. Sankaran, A\. S\. Ross, N\. Milojevic\-Dupont, N\. Jaques, A\. Waldman\-Brown,et al\.Tackling climate change with machine learning\.ACM Computing Surveys \(CSUR\)55\(2\),pp\. 1–96\.Cited by:[§1](https://arxiv.org/html/2610.00377#S1.p1.1)\.
- Senet al\.\(2019\)R\. Sen, H\. Yu, and I\. S\. DhillonThink globally, act locally: A deep neural network approach to high\-dimensional time series forecasting\.InAdvances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8\-14, 2019, Vancouver, BC, Canada,H\. M\. Wallach, H\. Larochelle, A\. Beygelzimer, F\. d’Alché\-Buc, E\. B\. Fox, and R\. Garnett \(Eds\.\),pp\. 4838–4847\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p2.1)\.
- Shaoet al\.\(2025\)Z\. Shao, F\. Wang, Y\. Xu, W\. Wei, C\. Yu, Z\. Zhang, D\. Yao, T\. Sun, G\. Jin, X\. Cao, G\. Cong, C\. S\. Jensen, and X\. ChengExploring progress in multivariate time series forecasting: comprehensive benchmarking and heterogeneity analysis\.IEEE Trans\. Knowl\. Data Eng\.37\(1\),pp\. 291–305\.Cited by:[§F\.3](https://arxiv.org/html/2610.00377#A6.SS3.SSS0.Px1.p1.1),[§3\.1](https://arxiv.org/html/2610.00377#S3.SS1.SSS0.Px2.p1.1)\.
- Shiet al\.\(2025\)X\. Shi, S\. Wang, Y\. Nie, D\. Li, Z\. Ye, Q\. Wen, and M\. JinTime\-MoE: billion\-scale time series foundation models with mixture of experts\.InInternational Conference on Learning Representations,External Links:[Link](https://proceedings.iclr.cc/paper_files/paper/2025/hash/558d48c1f08675daa636e09bfe94a89e-Abstract-Conference.html)Cited by:[§I\.1](https://arxiv.org/html/2610.00377#A9.SS1.p1.1)\.
- Stitsyuk and Choi \(2025\)A\. Stitsyuk and J\. ChoixPatch: dual\-stream time series forecasting with exponential seasonal\-trend decomposition\.InProceedings of the AAAI Conference on Artificial Intelligence,Vol\.39,pp\. 20601–20609\.External Links:[Link](https://github.com/stitsyuk/xPatch)Cited by:[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1)\.
- Tanget al\.\(2024\)J\. Tang, W\. Wei, L\. Xia, and C\. HuangEasyST: A simple framework for spatio\-temporal prediction\.InProceedings of the 33rd ACM International Conference on Information and Knowledge Management, CIKM 2024, Boise, ID, USA, October 21\-25, 2024,E\. Serra and F\. Spezzano \(Eds\.\),pp\. 2220–2229\.Cited by:[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1)\.
- Wanget al\.\(2023\)Y\. Wang, H\. Wu, J\. Zhang, Z\. Gao, J\. Wang, P\. S\. Yu, and M\. LongPredRNN: A recurrent neural network for spatiotemporal predictive learning\.IEEE Trans\. Pattern Anal\. Mach\. Intell\.45\(2\),pp\. 2208–2225\.Cited by:[§I\.2](https://arxiv.org/html/2610.00377#A9.SS2.p1.1)\.
- Wanget al\.\(2024\)Y\. Wang, H\. Wu, J\. Dong, G\. Qin, H\. Zhang, Y\. Liu, Y\. Qiu, J\. Wang, and M\. LongTimeXer: empowering transformers for time series forecasting with exogenous variables\.InAdvances in Neural Information Processing Systems 37: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 \- 15, 2024,Cited by:[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1)\.
- Wuet al\.\(2021\)H\. Wu, J\. Xu, J\. Wang, and M\. LongAutoformer: decomposition transformers with auto\-correlation for long\-term series forecasting\.InAdvances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6\-14, 2021, virtual,pp\. 22419–22430\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p2.1)\.
- Wuet al\.\(2023\)H\. Wu, H\. Zhou, M\. Long, and J\. WangInterpretable weather forecasting for worldwide stations with a unified deep model\.Nat\. Mac\. Intell\.5\(6\),pp\. 602–611\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p1.1),[§C\.3](https://arxiv.org/html/2610.00377#A3.SS3.p2.1),[§F\.1](https://arxiv.org/html/2610.00377#A6.SS1.p1.1),[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1),[§1](https://arxiv.org/html/2610.00377#S1.p2.1),[§2\.1](https://arxiv.org/html/2610.00377#S2.SS1.p1.1)\.
- Wuet al\.\(2020\)Z\. Wu, S\. Pan, G\. Long, J\. Jiang, X\. Chang, and C\. ZhangConnecting the dots: multivariate time series forecasting with graph neural networks\.InKDD ’20: The 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Virtual Event, CA, USA, August 23\-27, 2020,pp\. 753–763\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p1.1)\.
- Wuet al\.\(2019\)Z\. Wu, S\. Pan, G\. Long, J\. Jiang, and C\. ZhangGraph wavenet for deep spatial\-temporal graph modeling\.InProceedings of the Twenty\-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10\-16, 2019,pp\. 1907–1913\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p1.1)\.
- Xuet al\.\(2025\)C\. Xu, Y\. Ma, H\. Deng, Y\. Gao, Y\. Wang, K\. Lv, and X\. LiuContinuous diffusive prediction network for multi\-station weather prediction\.InProceedings of the Thirty\-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2025, Montreal, Canada, August 16\-22, 2025,pp\. 6714–6722\.External Links:[Document](https://dx.doi.org/10.24963/IJCAI.2025/747)Cited by:[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1)\.
- Yuet al\.\(2018\)B\. Yu, H\. Yin, and Z\. ZhuSpatio\-temporal graph convolutional networks: A deep learning framework for traffic forecasting\.InProceedings of the Twenty\-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, July 13\-19, 2018, Stockholm, Sweden,pp\. 3634–3640\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p1.1)\.
- Zenget al\.\(2023\)A\. Zeng, M\. Chen, L\. Zhang, and Q\. XuAre transformers effective for time series forecasting?\.InThirty\-Seventh AAAI Conference on Artificial Intelligence, AAAI 2023, Thirty\-Fifth Conference on Innovative Applications of Artificial Intelligence, IAAI 2023, Thirteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2023, Washington, DC, USA, February 7\-14, 2023,pp\. 11121–11128\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p2.1),[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1)\.
- Zhang and Yan \(2023\)Y\. Zhang and J\. YanCrossformer: transformer utilizing cross\-dimension dependency for multivariate time series forecasting\.InThe Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1\-5, 2023,Cited by:[§C\.3](https://arxiv.org/html/2610.00377#A3.SS3.p2.1),[§F\.2](https://arxiv.org/html/2610.00377#A6.SS2.p1.1)\.
- Zhouet al\.\(2021\)H\. Zhou, S\. Zhang, J\. Peng, S\. Zhang, J\. Li, H\. Xiong, and W\. ZhangInformer: beyond efficient transformer for long sequence time\-series forecasting\.InThirty\-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Thirty\-Third Conference on Innovative Applications of Artificial Intelligence, IAAI 2021, The Eleventh Symposium on Educational Advances in Artificial Intelligence, EAAI 2021, Virtual Event, February 2\-9, 2021,pp\. 11106–11115\.Cited by:[Appendix A](https://arxiv.org/html/2610.00377#A1.p2.1)\.
- Zhouet al\.\(2024\)P\. Zhou, R\. Li, and L\. DuFair kernel k\-means: from single kernel to multiple kernel\.InAdvances in Neural Information Processing Systems,pp\. 99686–99714\.Cited by:[§2\.3\.1](https://arxiv.org/html/2610.00377#S2.SS3.SSS1.p1.1)\.
## Appendix ARelated Work
Spatio\-Temporal Forecasting:ST methods combine temporal modeling with spatial structures, learned relationships, or domain knowledge\. Graph\-based approaches represent locations as nodes and dependencies as edges[Jiang et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib25);[Liu et al\. \(2022\)](https://arxiv.org/html/2610.00377#bib.bib26)\. DCRNN[Li et al\. \(2018\)](https://arxiv.org/html/2610.00377#bib.bib9)uses diffusion convolution and recurrent modeling, while STGCN[Yu et al\. \(2018\)](https://arxiv.org/html/2610.00377#bib.bib10)combines graph convolutions with gated temporal convolutions\. Graph WaveNet[Wu et al\. \(2019\)](https://arxiv.org/html/2610.00377#bib.bib11)and MTGNN[Wu et al\. \(2020\)](https://arxiv.org/html/2610.00377#bib.bib12)learn adjacency structures from data, although a graph learned during training need not adapt within each observation window\. Weather models further incorporate domain structure: Corrformer[Wu et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib17)organizes correlations hierarchically, and STELLA[Fu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib35)integrates spatial\-temporal knowledge into a lightweight model\. SIGMAformer[Kim and Suk \(2026\)](https://arxiv.org/html/2610.00377#bib.bib39)combines Gaussian\-mixture pattern extraction with dynamic spatio\-temporal correlation modeling for global station weather forecasting\. Our focus is on grouping stations from local evolution at each temporal patch while retaining information from all groups\.
Multivariate Time Series Forecasting:MTS methods treat station sequences as channels\. Channel\-dependent methods model series jointly, whereas channel\-independent methods process them separately with shared parameters\. Following recurrent and convolutional approaches[Hewage et al\. \(2020\)](https://arxiv.org/html/2610.00377#bib.bib18);[Sen et al\. \(2019\)](https://arxiv.org/html/2610.00377#bib.bib19), Informer[Zhou et al\. \(2021\)](https://arxiv.org/html/2610.00377#bib.bib4)and Autoformer[Wu et al\. \(2021\)](https://arxiv.org/html/2610.00377#bib.bib5)improve temporal modeling through sparse attention and decomposition\. iTransformer[Liu et al\. \(2024a\)](https://arxiv.org/html/2610.00377#bib.bib7)attends over variate tokens to capture cross\-channel dependencies\. Channel\-independent models avoid unnecessary mixing[Das et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib21);[Nie et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib1): DLinear[Zeng et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib8)uses decomposition and linear mappings, while PatchTST[Nie et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib1)applies a shared Transformer to temporal patches\. Independent processing, however, does not explicitly exploit other stations’ predictive information\.
Clustering balances shared modeling and channel specialization\. CCM[Chen et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib23)groups similar channels and learns cluster\-specific shared parameters\. DUET[Qiu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib22)combines temporal distribution clustering with frequency\-based channel soft clustering\. These mechanisms differ from fully isolated hard partitions\. TimeFilter[Hu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib24)further adapts dependencies through patch\-specific spatio\-temporal graph filtration\. Across these designs, grouping granularity and information coverage matter: window\-shared assignments may obscure local relationship changes, while exclusively intra\-group interactions can omit useful global context\. STCFormer combines locally updated groups with attention over all regional content centers\.
## Appendix BEfficient Implementation of Intra\-Cluster Local Attention
Equation \([8](https://arxiv.org/html/2610.00377#S2.E8)\) describes the hard\-partition attention pattern\. Our experiments evaluate it with packed local attention, avoiding an explicitN′×N′N^\{\\prime\}\\times N^\{\\prime\}mask\. Assignments are recomputed at every temporal patch and encoder layer\.
##### Hard routing with a differentiable membership bias\.
Training obtains straight\-through assignments𝐇ST\\mathbf\{H\}\_\{\\mathrm\{ST\}\}usingF\.gumbel\_softmax\(log\(R\), hard=True\)\. Letκs\\kappa\_\{s\}be the selected cluster index andℐk=\{s:κs=k\}\\mathcal\{I\}\_\{k\}=\\\{s:\\kappa\_\{s\}=k\\\}\. The indices and their sorting are nondifferentiable\. Crucially, we retain the selected membershipas=\(HST\)s,κsa\_\{s\}=\(H\_\{\\mathrm\{ST\}\}\)\_\{s,\\kappa\_\{s\}\}as a differentiable tensor\. For groupkk, gather the state features𝐗k=𝐗attℐk,:\\mathbf\{X\}\_\{k\}=\\mathbf\{X\}^\{\\mathrm\{att\}\}\_\{\\mathcal\{I\}\_\{k\},:\}and the membership vector𝐚k=\(as\)s∈ℐk\\mathbf\{a\}\_\{k\}=\(a\_\{s\}\)\_\{s\\in\\mathcal\{I\}\_\{k\}\}\. Packed attention computes
𝐘k=𝐗k\+Softmax\(\(𝐗k𝐖Qloc\)\(𝐗k𝐖Kloc\)⊤D\+𝟏nk\(log𝐚k\)⊤\)\(𝐗k𝐖Vloc\)\.\\mathbf\{Y\}\_\{k\}=\\mathbf\{X\}\_\{k\}\+\\operatorname\{Softmax\}\\\!\\left\(\\frac\{\(\\mathbf\{X\}\_\{k\}\\mathbf\{W\}\_\{Q\}^\{\\mathrm\{loc\}\}\)\(\\mathbf\{X\}\_\{k\}\\mathbf\{W\}\_\{K\}^\{\\mathrm\{loc\}\}\)^\{\\top\}\}\{\\sqrt\{D\}\}\+\\mathbf\{1\}\_\{n\_\{k\}\}\(\\log\\mathbf\{a\}\_\{k\}\)^\{\\top\}\\right\)\(\\mathbf\{X\}\_\{k\}\\mathbf\{W\}\_\{V\}^\{\\mathrm\{loc\}\}\)\.\(18\)The logarithmic membership is a key bias, broadcast across queries\. Selected memberships equal one in the hard forward pass, so this bias is zero and each token attends to exactly its hard cluster\. In the backward pass, the membership bias propagates gradients through the continuous Gumbel–Softmax relaxation to𝐑\\mathbf\{R\}, despite nondifferentiable group indexing\. At inference, routing uses deterministicargmaxkRs,k\\arg\\max\_\{k\}R\_\{s,k\}\.
## Appendix CComputational Complexity Analysis
We analyze the current pipeline: patch embedding, dual\-view temporal representation, dynamic clustering, intra\-cluster attention, station\-to\-region attention, and a direct prediction head\. Letn=N′=⌈N/Ls⌉n=N^\{\\prime\}=\\lceil N/L\_\{s\}\\rceilandm=T′=⌈T/Lt⌉m=T^\{\\prime\}=\\lceil T/L\_\{t\}\\rceil, whereN,TN,Tare the original station count and history length\. LetDDbe the hidden width andK≤nK\\leq nthe number of clusters\. Clustering uses one E–M update followed by a final E\-step\. Costs below are per sample and per block, with a fixed number of heads and feed\-forward widths proportional toDD\. For a batch, multiply operation counts by the batch size\.
### C\.1Module\-wise computation
##### Patch embedding and dual views\.
Flattening and linearly projecting the value patches costs𝒪\(mnLtLsCD\)\\mathcal\{O\}\(mnL\_\{t\}L\_\{s\}CD\), whereCCis the number of observed variables; geographic projection and positional addition contribute separate lightweight embedding operations\. The state view applies temporal attention tommtokens for each of thennspatial patches, costing𝒪\(nm2D\)\\mathcal\{O\}\(nm^\{2\}D\)\. Temporal differences cost𝒪\(mnD\)\\mathcal\{O\}\(mnD\), and the evolution MLP, attention projections, and feed\-forward updates cost𝒪\(mnD2\)\\mathcal\{O\}\(mnD^\{2\}\)for fixed expansion ratios\. The evolution view introduces no additional all\-pairs temporal attention\.
##### Dynamic station clustering\.
At each temporal patch, the initial E\-step computes𝐗clu𝐏⊤\\mathbf\{X\}^\{\\mathrm\{clu\}\}\\mathbf\{P\}^\{\\top\}, the M\-step aggregates𝐑~⊤𝐗clu\\widetilde\{\\mathbf\{R\}\}^\{\\top\}\\mathbf\{X\}^\{\\mathrm\{clu\}\}and blends the result with𝐏\\mathbf\{P\}, and the final E\-step computes𝐗clu𝐂⊤\\mathbf\{X\}^\{\\mathrm\{clu\}\}\\mathbf\{C\}^\{\\top\}\. Each matrix product costs𝒪\(nKD\)\\mathcal\{O\}\(nKD\); prototype mixing and normalization are lower\-order operations\. Thus, the fixed E–M–E sequence over the window costs
𝒞clu=𝒪\(mnKD\)\.\\mathcal\{C\}\_\{\\mathrm\{clu\}\}=\\mathcal\{O\}\(mnKD\)\.\(19\)Sampling or taking the row\-wise argmax of the final assignments adds𝒪\(mnK\)\\mathcal\{O\}\(mnK\)\. No station\-to\-station distance matrix or reuse of the previous patch’s partition is required\.
##### Intra\-cluster attention\.
Letnp,k=\|ℐp,k\|n\_\{p,k\}=\|\\mathcal\{I\}\_\{p,k\}\|andSp=∑k=1Knp,k2S\_\{p\}=\\sum\_\{k=1\}^\{K\}n\_\{p,k\}^\{2\}\. The packed evaluation in Appendix[B](https://arxiv.org/html/2610.00377#A2)has attention\-product cost
𝒞loc=𝒪\(D∑p=1mSp\),n2K≤Sp≤n2\.\\mathcal\{C\}\_\{\\mathrm\{loc\}\}=\\mathcal\{O\}\\\!\\left\(D\\sum\_\{p=1\}^\{m\}S\_\{p\}\\right\),\\qquad\\frac\{n^\{2\}\}\{K\}\\leq S\_\{p\}\\leq n^\{2\}\.\(20\)The lower bound follows from Cauchy–Schwarz and is attained by equal group sizes when divisibility permits\. Approximately balanced groups giveSp≈n2/KS\_\{p\}\\approx n^\{2\}/K; collapse into one group givesSp=n2S\_\{p\}=n^\{2\}\. InfoLoss encourages balanced soft masses but does not enforce equal hard group sizes\.
##### Station\-to\-region global attention\.
Soft\-assignment\-weighted aggregation𝐑⊤𝐗loc\\mathbf\{R\}^\{\\top\}\\mathbf\{X\}^\{\\mathrm\{loc\}\}costs𝒪\(mnKD\)\\mathcal\{O\}\(mnKD\); computing and normalizing the regional soft masses costs𝒪\(mnK\+mKD\)\\mathcal\{O\}\(mnK\+mKD\)\. Cross\-attention betweennnstation queries andKKregional content centers costs𝒪\(mnKD\)\\mathcal\{O\}\(mnKD\), with an additional𝒪\(m\(n\+K\)D2\)\\mathcal\{O\}\(m\(n\+K\)D^\{2\}\)for projections\. These are station\-to\-region interactions, rather than aK×KK\\times Kcentroid self\-attention stage\. The centroids used in the E–M updates and the content centers used as attention keys and values are computed separately\.
##### InfoLoss during training\.
At each temporal patch, computing𝝅p=n−1𝐑p⊤𝟏\\bm\{\\pi\}\_\{p\}=n^\{\-1\}\\mathbf\{R\}\_\{p\}^\{\\top\}\\mathbf\{1\}and the sum of row entropies takes𝒪\(nK\)\\mathcal\{O\}\(nK\)operations\. The marginal entropy adds𝒪\(K\)\\mathcal\{O\}\(K\), giving
𝒞info=𝒪\(mnK\)\.\\mathcal\{C\}\_\{\\mathrm\{info\}\}=\\mathcal\{O\}\(mnK\)\.\(21\)NoK×KK\\times Kjoint matrix or adjacent\-patch pairing is required\. The loss averages over temporal patches within each layer and sums across layers; these reductions do not change the asymptotic cost\. This term is absent at inference\. Backpropagation through the differentiable clustering updates has the same asymptotic arithmetic order as their forward operations for the fixed E–M–E sequence; retained intermediate activations and the chosen assignment surrogate affect training memory\.
##### Direct prediction head\.
For one target variable, the head in Eq\. \([11](https://arxiv.org/html/2610.00377#S2.E11)\) flattens them×Dm\\times Dencoded features of each spatial patch\. Layer normalization costs𝒪\(nmD\)\\mathcal\{O\}\(nmD\), and the two projections cost𝒪\(nmDDh\+nDhOLs\)\\mathcal\{O\}\(nmDD\_\{h\}\+nD\_\{h\}OL\_\{s\}\), whereDhD\_\{h\}is the head’s hidden width andOOthe forecasting horizon\. Reshaping, removing padding, and restoring station order add no learned pairwise interaction\.
### C\.2Overall cost and memory
Combining the representation and interaction modules gives
𝒞block=𝒪\(mnD2\+nm2D\+mnKD\+D∑p=1mSp\)\.\\mathcal\{C\}\_\{\\mathrm\{block\}\}=\\mathcal\{O\}\\\!\\left\(mnD^\{2\}\+nm^\{2\}D\+mnKD\+D\\sum\_\{p=1\}^\{m\}S\_\{p\}\\right\)\.\(22\)With approximately balanced groups, the last term becomesmn2D/Kmn^\{2\}D/K; in the worst case it becomesmn2Dmn^\{2\}D\. Clustering and global attention remain in both expressions and cannot be discarded merely becauseK<nK<n\. ForBBblocks with unchanged dimensions, the backbone cost isB𝒞blockB\\mathcal\{C\}\_\{\\mathrm\{block\}\}\. If dimensions differ across blocks, their costs must instead be summed explicitly\. The full model additionally incurs patch embedding and direct\-head costs; training adds InfoLoss wherever it is applied\. No layer\-wise temporal shrinking or autoregressive decoder is assumed\.
Ignoring widths and rounding, the principal terms are
NT2LsLt2⏟temporal attention,TN2LtLs2K⏟balanced local attention,TNKLtLs⏟clustering and global attention\.\\underbrace\{\\frac\{NT^\{2\}\}\{L\_\{s\}L\_\{t\}^\{2\}\}\}\_\{\\text\{temporal attention\}\},\\qquad\\underbrace\{\\frac\{TN^\{2\}\}\{L\_\{t\}L\_\{s\}^\{2\}K\}\}\_\{\\text\{balanced local attention\}\},\\qquad\\underbrace\{\\frac\{TNK\}\{L\_\{t\}L\_\{s\}\}\}\_\{\\text\{clustering and global attention\}\}\.\(23\)IncreasingKKreduces balanced local\-attention work but increases clustering, global\-attention, and InfoLoss costs\. In particular, settingKKproportional tonndoes not make the full block linear innn: clustering and global attention remain quadratic, while within\-patch InfoLoss costs𝒪\(mnK\)\\mathcal\{O\}\(mnK\)and is quadratic innnat a fixed cluster ratio\. Patching reduces the token grid, but these trade\-offs and hardware utilization determine practical efficiency\.
For conventional materialized attention, score storage is𝒪\(nm2\+∑pSp\+mnK\)\\mathcal\{O\}\(nm^\{2\}\+\\sum\_\{p\}S\_\{p\}\+mnK\), while token features and assignments require𝒪\(mnD\+mnK\)\\mathcal\{O\}\(mnD\+mnK\)\. The two E\-steps and single M\-step retain only a fixed number of clustering intermediates during training\. Fused attention kernels can avoid storing the full score matrices without changing the arithmetic orders above\. InfoLoss reduces the existing soft assignments intommcluster\-marginal vectors and row\-entropy sums\. These summaries require𝒪\(mK\+mn\)\\mathcal\{O\}\(mK\+mn\)storage if materialized together; a conventional elementwise entropy implementation may additionally retain𝒪\(mnK\)\\mathcal\{O\}\(mnK\)intermediates for backward computation\. Sequential or fused reductions can reduce forward workspace, with backward storage depending on checkpointing\. These are activation and workspace costs, excluding model parameters and optimizer states\.
### C\.3Comparison with current baselines
Table[3](https://arxiv.org/html/2610.00377#A3.T3)compares representative dependency\-modeling operators from the baselines in our experiments\. Hidden widths, head counts, and depth are fixed; each expression covers the operator named in the table, not end\-to\-end training or forecasting\. Embedding, prediction heads, and auxiliary objectives are excluded\. This scope makes explicit the distinction between dense station attention, temporal patch attention, compressed global interaction, and dynamically grouped interaction\.
Table 3:Computational complexity of representative dependency\-modeling operators among the current baselines\.N,TN,Tdenote stations and history steps\.PtP\_\{t\}is each baseline’s actual temporal\-token count \(accounting for its patch length and stride\),rris Crossformer’s router count,KCCMK\_\{\\mathrm\{CCM\}\}is CCM’s cluster count, andq,\|ℰ\|q,\|\\mathcal\{E\}\|are DCRNN’s diffusion order and graph\-edge count\. For STCFormer,n=⌈N/Ls⌉n=\\lceil N/L\_\{s\}\\rceil,m=⌈T/Lt⌉m=\\lceil T/L\_\{t\}\\rceil, with spatial and temporal patch sizesLs,LtL\_\{s\},L\_\{t\}\. Widths are fixed; the stated scope excludes embeddings, output heads, and training losses\.ModelOperator comparedTime complexityDCRNNDiffusion recurrence overTTsteps𝒪\(Tq\(N\+\|ℰ\|\)\)\\mathcal\{O\}\(Tq\(N\+\|\\mathcal\{E\}\|\)\)CorrformerMulti\-correlation𝒪\(NTlogT\)\\mathcal\{O\}\(NT\\log T\)PatchTSTPer\-channel temporal attention𝒪\(NPt2\)\\mathcal\{O\}\(NP\_\{t\}^\{2\}\)CrossformerTemporal attention and routers𝒪\(NPt2\+NPtr\)\\mathcal\{O\}\(NP\_\{t\}^\{2\}\+NP\_\{t\}r\)CCM \(DLinear\)Cluster assignment and prototype cross\-attention𝒪\(NKCCM\)\\mathcal\{O\}\(NK\_\{\\mathrm\{CCM\}\}\)DUETMasked channel\-attention fusion𝒪\(N2\)\\mathcal\{O\}\(N^\{2\}\)TimeFilterDense patch\-pair graph construction𝒪\(N2Pt2\)\\mathcal\{O\}\(N^\{2\}P\_\{t\}^\{2\}\)STCFormerDual views, clustering, local–global attention𝒪\(nm2\+mnK\+∑pSp\)\\mathcal\{O\}\(nm^\{2\}\+mnK\+\\sum\_\{p\}S\_\{p\}\)DCRNN’s sparse diffusion cost depends on graph edges rather than necessarily onN2N^\{2\}\([Li et al\., 2018](https://arxiv.org/html/2610.00377#bib.bib9)\)\. Corrformer’s multi\-correlation uses a spatial tree and temporal correlation to obtain linear spatial and log\-linear temporal scaling\([Wu et al\., 2023](https://arxiv.org/html/2610.00377#bib.bib17)\)\. PatchTST attends independently along each channel’s temporal patches\([Nie et al\., 2023](https://arxiv.org/html/2610.00377#bib.bib1)\), whereas Crossformer additionally usesrrrouters per temporal segment for cross\-channel communication\([Zhang and Yan, 2023](https://arxiv.org/html/2610.00377#bib.bib6)\)\. CCM’s assignment and prototype cross\-attention cost𝒪\(NKCCM\)\\mathcal\{O\}\(NK\_\{\\mathrm\{CCM\}\}\)at fixed hidden width\([Chen et al\., 2024](https://arxiv.org/html/2610.00377#bib.bib23)\)\. We use DLinear as its backbone; the displayed term excludes that backbone and the cluster\-aware prediction heads, and is not an end\-to\-end cost\.
DUET’s displayed𝒪\(N2\)\\mathcal\{O\}\(N^\{2\}\)term concerns fusion after temporal extraction and channel\-mask construction; its frequency transform and learned distance metric incur additional costs\([Qiu et al\., 2025](https://arxiv.org/html/2610.00377#bib.bib22)\)\. TimeFilter constructs pairwise scores overNPtNP\_\{t\}patch tokens before neighbor selection and filtration, so a sparse final graph alone does not remove this construction cost\([Hu et al\., 2025](https://arxiv.org/html/2610.00377#bib.bib24)\)\. For STCFormer, substitute∑pSp≈mn2/K\\sum\_\{p\}S\_\{p\}\\approx mn^\{2\}/Kfor balanced groups or∑pSp≤mn2\\sum\_\{p\}S\_\{p\}\\leq mn^\{2\}for the worst case\. The matched runtime and memory measurements in Sections[3\.4\.2](https://arxiv.org/html/2610.00377#S3.SS4.SSS2)and[I\.4](https://arxiv.org/html/2610.00377#A9.SS4)complement these asymptotic comparisons and show STCFormer’s favorable accuracy–resource trade\-off\.
## Appendix DProofs for Cluster\-Conditioned Local Attention
### D\.1Notation and Preliminaries
We analyze the single\-head residual local\-attention stage in Eq\. \([8](https://arxiv.org/html/2610.00377#S2.E8)\), equivalently evaluated by the packed implementation in Appendix[B](https://arxiv.org/html/2610.00377#A2)\. The evolution view determines the partition and the state view supplies the attention content\. Holding the realized partition and projection weights fixed isolates how restricted interaction changes the sensitivity bound relative to dense attention\.
Feature perturbations use the Frobenius norm; weights use the spectral norm\. The convex domain isΩRX=\{U∈ℝn×D:maxs‖us‖2≤RX\}\\Omega\_\{R\_\{X\}\}=\\\{U\\in\\mathbb\{R\}^\{n\\times D\}:\\max\_\{s\}\\\|u\_\{s\}\\\|\_\{2\}\\leq R\_\{X\}\\\}\. For a mappingff, define
LipF\(f\)=supU,U~∈ΩRXU≠U~‖f\(U\)−f\(U~\)‖F‖U−U~‖F\.\\operatorname\{Lip\}\_\{F\}\(f\)=\\sup\_\{\\begin\{subarray\}\{c\}U,\\widetilde\{U\}\\in\\Omega\_\{R\_\{X\}\}\\\\ U\\neq\\widetilde\{U\}\\end\{subarray\}\}\\frac\{\\\|f\(U\)\-f\(\\widetilde\{U\}\)\\\|\_\{F\}\}\{\\\|U\-\\widetilde\{U\}\\\|\_\{F\}\}\.\(24\)Integration of the derivative along the segment joining two inputs gives
LipF\(f\)≤supU∈ΩRX‖Df\(U\)‖F→F,‖Df\(U\)‖F→F=supE≠0‖Df\(U\)\[E\]‖F‖E‖F,\\operatorname\{Lip\}\_\{F\}\(f\)\\leq\\sup\_\{U\\in\\Omega\_\{R\_\{X\}\}\}\\\|\\mathrm\{D\}f\(U\)\\\|\_\{F\\to F\},\\qquad\\\|\\mathrm\{D\}f\(U\)\\\|\_\{F\\to F\}=\\sup\_\{E\\neq 0\}\\frac\{\\\|\\mathrm\{D\}f\(U\)\[E\]\\\|\_\{F\}\}\{\\\|E\\\|\_\{F\}\},\(25\)for mappings smooth on a neighborhood of the domain\. Also,LipF\(Id\+f\)≤1\+LipF\(f\)\\operatorname\{Lip\}\_\{F\}\(\\operatorname\{Id\}\+f\)\\leq 1\+\\operatorname\{Lip\}\_\{F\}\(f\)\. The hard assignment matrixHHhas one nonzero entry per row; empty clusters are permitted and produce no output rows\. We use natural logarithms,0log0=00\\log 0=0, and1≤K≤n1\\leq K\\leq n\.
### D\.2Proof of Theorem[2\.1](https://arxiv.org/html/2610.00377#S2.Thmtheorem1)
Write the residual operator and its attention part as
𝒜H\(U\)=U\+ΦH\(U\),ΦH\(U\)=Softmax\(UAU⊤\+log\(HH⊤\)\)UWVloc,A=WQloc\(WKloc\)⊤D,v=∥WVloc∥2,β=RX2∥A∥2\.\\begin\{gathered\}\\mathcal\{A\}\_\{H\}\(U\)=U\+\\Phi\_\{H\}\(U\),\\qquad\\Phi\_\{H\}\(U\)=\\operatorname\{Softmax\}\\\!\\left\(UAU^\{\\top\}\+\\log\(HH^\{\\top\}\)\\right\)UW\_\{V\}^\{\\mathrm\{loc\}\},\\\\ A=\\frac\{W\_\{Q\}^\{\\mathrm\{loc\}\}\(W\_\{K\}^\{\\mathrm\{loc\}\}\)^\{\\top\}\}\{\\sqrt\{D\}\},\\qquad v=\\\|W\_\{V\}^\{\\mathrm\{loc\}\}\\\|\_\{2\},\\qquad\\beta=R\_\{X\}^\{2\}\\\|A\\\|\_\{2\}\.\\end\{gathered\}\(26\)Herelog0=−∞\\log 0=\-\\inftyimplements the fixed mask\. Every attention row contains its self\-entry\. Dense attention corresponds to a single group containing allnntokens\.
###### Proof\.
Step 1: a single attention block\.Letℐ\\mathcal\{I\}be a nonempty cluster of sizeqq\. Write token rows as columnsai=ui⊤a\_\{i\}=u\_\{i\}^\{\\top\}and setV=\(WVloc\)⊤V=\(W\_\{V\}^\{\\mathrm\{loc\}\}\)^\{\\top\}\. Its probabilities, weighted mean, and output are
pij=exp\(ai⊤Aaj\)∑ℓ∈ℐexp\(ai⊤Aaℓ\),μi=∑j∈ℐpijaj,gi=Vμi\.p\_\{ij\}=\\frac\{\\exp\(a\_\{i\}^\{\\top\}Aa\_\{j\}\)\}\{\\sum\_\{\\ell\\in\\mathcal\{I\}\}\\exp\(a\_\{i\}^\{\\top\}Aa\_\{\\ell\}\)\},\\qquad\\mu\_\{i\}=\\sum\_\{j\\in\\mathcal\{I\}\}p\_\{ij\}a\_\{j\},\\qquad g\_\{i\}=V\\mu\_\{i\}\.\(27\)The row\-norm assumption implies\|ai⊤Aaj\|≤β\|a\_\{i\}^\{\\top\}Aa\_\{j\}\|\\leq\\beta\. Consequently,
pij≤e2βq−1\+e2β,∑i∈ℐpij≤sβ\(q\):=qe2βq−1\+e2β≤min\{q,e2β\}\.p\_\{ij\}\\leq\\frac\{e^\{2\\beta\}\}\{q\-1\+e^\{2\\beta\}\},\\qquad\\sum\_\{i\\in\\mathcal\{I\}\}p\_\{ij\}\\leq s\_\{\\beta\}\(q\):=\\frac\{qe^\{2\\beta\}\}\{q\-1\+e^\{2\\beta\}\}\\leq\\min\\\{q,e^\{2\\beta\}\\\}\.\(28\)The probability bound follows by placing its numerator at the largest admissible logit and the otherq−1q\-1logits at the smallest admissible value\. It sharpens the generic column\-sum boundqqby accounting for bounded logits, consistent with the bounded\-domain perspective of[Castin et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib41)\.
For a perturbation with token columnseie\_\{i\}, differentiating the bilinear logits and softmax gives
Dgi\[E\]\\displaystyle\\mathrm\{D\}g\_\{i\}\[E\]=V\(Tival\+Tiqry\+Tikey\),\\displaystyle=V\\bigl\(T\_\{i\}^\{\\mathrm\{val\}\}\+T\_\{i\}^\{\\mathrm\{qry\}\}\+T\_\{i\}^\{\\mathrm\{key\}\}\\bigr\),\(29\)Tival\\displaystyle T\_\{i\}^\{\\mathrm\{val\}\}=∑jpijej,Tiqry=CiA⊤ei,\\displaystyle=\\sum\_\{j\}p\_\{ij\}e\_\{j\},\\qquad T\_\{i\}^\{\\mathrm\{qry\}\}=C\_\{i\}A^\{\\top\}e\_\{i\},Tikey\\displaystyle T\_\{i\}^\{\\mathrm\{key\}\}=∑jpij\(ai⊤Aej\)\(aj−μi\),Ci=∑jpij\(aj−μi\)\(aj−μi\)⊤\.\\displaystyle=\\sum\_\{j\}p\_\{ij\}\(a\_\{i\}^\{\\top\}Ae\_\{j\}\)\(a\_\{j\}\-\\mu\_\{i\}\),\\qquad C\_\{i\}=\\sum\_\{j\}p\_\{ij\}\(a\_\{j\}\-\\mu\_\{i\}\)\(a\_\{j\}\-\\mu\_\{i\}\)^\{\\top\}\.All sums in this step are overℐ\\mathcal\{I\}\. The covariance matrix satisfies
‖Ci‖2≤tr\(Ci\)=∑jpij‖aj‖22−‖μi‖22≤RX2\.\\\|C\_\{i\}\\\|\_\{2\}\\leq\\operatorname\{tr\}\(C\_\{i\}\)=\\sum\_\{j\}p\_\{ij\}\\\|a\_\{j\}\\\|\_\{2\}^\{2\}\-\\\|\\mu\_\{i\}\\\|\_\{2\}^\{2\}\\leq R\_\{X\}^\{2\}\.\(30\)LetTval,Tqry,TkeyT^\{\\mathrm\{val\}\},T^\{\\mathrm\{qry\}\},T^\{\\mathrm\{key\}\}collect the corresponding row contributions\. Jensen’s inequality, Eq\. \([28](https://arxiv.org/html/2610.00377#A4.E28)\), and weighted Cauchy–Schwarz imply
‖Tval‖F2\\displaystyle\\\|T^\{\\mathrm\{val\}\}\\\|\_\{F\}^\{2\}≤∑i,jpij‖ej‖22≤sβ\(q\)‖Eℐ‖F2,\\displaystyle\\leq\\sum\_\{i,j\}p\_\{ij\}\\\|e\_\{j\}\\\|\_\{2\}^\{2\}\\leq s\_\{\\beta\}\(q\)\\\|E\_\{\\mathcal\{I\}\}\\\|\_\{F\}^\{2\},\(31\)‖Tqry‖F2\\displaystyle\\\|T^\{\\mathrm\{qry\}\}\\\|\_\{F\}^\{2\}≤RX4‖A‖22∑i‖ei‖22=β2‖Eℐ‖F2,\\displaystyle\\leq R\_\{X\}^\{4\}\\\|A\\\|\_\{2\}^\{2\}\\sum\_\{i\}\\\|e\_\{i\}\\\|\_\{2\}^\{2\}=\\beta^\{2\}\\\|E\_\{\\mathcal\{I\}\}\\\|\_\{F\}^\{2\},‖Tkey‖F2\\displaystyle\\\|T^\{\\mathrm\{key\}\}\\\|\_\{F\}^\{2\}≤∑i\(∑jpij\(ai⊤Aej\)2\)\(∑jpij‖aj−μi‖22\)\\displaystyle\\leq\\sum\_\{i\}\\left\(\\sum\_\{j\}p\_\{ij\}\(a\_\{i\}^\{\\top\}Ae\_\{j\}\)^\{2\}\\right\)\\left\(\\sum\_\{j\}p\_\{ij\}\\\|a\_\{j\}\-\\mu\_\{i\}\\\|\_\{2\}^\{2\}\\right\)≤RX4‖A‖22∑i,jpij‖ej‖22≤β2sβ\(q\)‖Eℐ‖F2\.\\displaystyle\\leq R\_\{X\}^\{4\}\\\|A\\\|\_\{2\}^\{2\}\\sum\_\{i,j\}p\_\{ij\}\\\|e\_\{j\}\\\|\_\{2\}^\{2\}\\leq\\beta^\{2\}s\_\{\\beta\}\(q\)\\\|E\_\{\\mathcal\{I\}\}\\\|\_\{F\}^\{2\}\.In the key term,\|ai⊤Aej\|≤RX‖A‖2‖ej‖2\|a\_\{i\}^\{\\top\}Ae\_\{j\}\|\\leq R\_\{X\}\\\|A\\\|\_\{2\}\\\|e\_\{j\}\\\|\_\{2\}and the second factor is at mostRX2R\_\{X\}^\{2\}\. Thus the non\-residual block obeys
‖DΦℐ\(Uℐ\)\[Eℐ\]‖F≤v\[β\+\(1\+β\)sβ\(q\)\]‖Eℐ‖F\.\\\|\\mathrm\{D\}\\Phi\_\{\\mathcal\{I\}\}\(U\_\{\\mathcal\{I\}\}\)\[E\_\{\\mathcal\{I\}\}\]\\\|\_\{F\}\\leq v\\left\[\\beta\+\(1\+\\beta\)\\sqrt\{s\_\{\\beta\}\(q\)\}\\right\]\\\|E\_\{\\mathcal\{I\}\}\\\|\_\{F\}\.\(32\)Equation \([25](https://arxiv.org/html/2610.00377#A4.E25)\) therefore gives the same bound forLipF\(Φℐ\)\\operatorname\{Lip\}\_\{F\}\(\\Phi\_\{\\mathcal\{I\}\}\)\.
Step 2: disjoint groups and the dense comparison\.Letqk=\|ℐk\|q\_\{k\}=\|\\mathcal\{I\}\_\{k\}\|andm\(H\)=maxkqkm\(H\)=\\max\_\{k\}q\_\{k\}\. Reordering tokens by their fixed groups preserves Frobenius norms and makes the mapping block separable\. Hence
‖ΦH\(U\)−ΦH\(U~\)‖F2\\displaystyle\\\|\\Phi\_\{H\}\(U\)\-\\Phi\_\{H\}\(\\widetilde\{U\}\)\\\|\_\{F\}^\{2\}=∑k‖Φℐk\(Uℐk\)−Φℐk\(U~ℐk\)‖F2\\displaystyle=\\sum\_\{k\}\\\|\\Phi\_\{\\mathcal\{I\}\_\{k\}\}\(U\_\{\\mathcal\{I\}\_\{k\}\}\)\-\\Phi\_\{\\mathcal\{I\}\_\{k\}\}\(\\widetilde\{U\}\_\{\\mathcal\{I\}\_\{k\}\}\)\\\|\_\{F\}^\{2\}\(33\)≤\(maxkLipF\(Φℐk\)\)2‖U−U~‖F2\.\\displaystyle\\leq\\left\(\\max\_\{k\}\\operatorname\{Lip\}\_\{F\}\(\\Phi\_\{\\mathcal\{I\}\_\{k\}\}\)\\right\)^\{2\}\\\|U\-\\widetilde\{U\}\\\|\_\{F\}^\{2\}\.The maximum is over nonempty clusters\. For realq≥1q\\geq 1,
sβ′\(q\)=e2β\(e2β−1\)\(q−1\+e2β\)2≥0\.s\_\{\\beta\}^\{\\prime\}\(q\)=\\frac\{e^\{2\\beta\}\(e^\{2\\beta\}\-1\)\}\{\(q\-1\+e^\{2\\beta\}\)^\{2\}\}\\geq 0\.\(34\)Adding the residual and applying monotonicity gives
LipF\(𝒜H\)≤1\+v\[β\+\(1\+β\)sβ\(m\(H\)\)\]=B\(m\(H\)\)≤B\(n\)\.\\operatorname\{Lip\}\_\{F\}\(\\mathcal\{A\}\_\{H\}\)\\leq 1\+v\\left\[\\beta\+\(1\+\\beta\)\\sqrt\{s\_\{\\beta\}\(m\(H\)\)\}\\right\]=B\(m\(H\)\)\\leq B\(n\)\.\(35\)Applying exactly the same single\-block calculation toq=nq=nestablishesLipF\(𝒜dense\)≤B\(n\)\\operatorname\{Lip\}\_\{F\}\(\\mathcal\{A\}\_\{\\mathrm\{dense\}\}\)\\leq B\(n\)\. DefiningBours\(H\)=B\(m\(H\)\)B\_\{\\mathrm\{ours\}\}\(H\)=B\(m\(H\)\)andBdense=B\(n\)B\_\{\\mathrm\{dense\}\}=B\(n\)gives Eq\. \([13](https://arxiv.org/html/2610.00377#S2.E13)\)\. Throughout this appendix,B\(⋅\)B\(\\cdot\)denotes the derived upper bound rather than the exact Lipschitz constant in Eq\. \([24](https://arxiv.org/html/2610.00377#A4.E24)\)\. ∎
Forv\>0v\>0,β\>0\\beta\>0, andm\(H\)<nm\(H\)<n, the comparison is strict:B\(m\(H\)\)<B\(n\)B\(m\(H\)\)<B\(n\)\. Sincesβ\(q\)≤qs\_\{\\beta\}\(q\)\\leq q,1\+v\[β\+\(1\+β\)q\]1\+v\[\\beta\+\(1\+\\beta\)\\sqrt\{q\}\]is also valid, while the bounded\-logit expression is tighter becausesβ\(q\)s\_\{\\beta\}\(q\)saturates ate2βe^\{2\\beta\}\. The numerical diagnostics in Appendix[I\.6](https://arxiv.org/html/2610.00377#A9.SS6)confirm that the predicted cluster\-size dependence is visible in trained models\.
### D\.3Proof of Theorem[2\.2](https://arxiv.org/html/2610.00377#S2.Thmtheorem2)
###### Proof\.
Fix a temporal patch and condition on its pre\-draw soft assignmentsR=\(rs,k\)R=\(r\_\{s,k\}\)\. Sample token labels independently withPr\(κs=k∣R\)=rs,k\\Pr\(\\kappa\_\{s\}=k\\mid R\)=r\_\{s,k\}\. This is the hard forward distribution of Gumbel\-Max,κs=argmaxk\(logrs,k\+gs,k\)\\kappa\_\{s\}=\\arg\\max\_\{k\}\(\\log r\_\{s,k\}\+g\_\{s,k\}\), with fresh independent standard Gumbel noises across tokens and labels\. Leths,k=𝟏\{κs=k\}h\_\{s,k\}=\\mathbf\{1\}\\\{\\kappa\_\{s\}=k\\\}andMk=∑shs,kM\_\{k\}=\\sum\_\{s\}h\_\{s,k\}\. The marginal and conditional entropy of the variablesX,YX,Yin the main text are
πk=1n∑srs,k,h¯=H\(Y∣X\)=1n∑sH\(rs,:\)\.\\pi\_\{k\}=\\frac\{1\}\{n\}\\sum\_\{s\}r\_\{s,k\},\\qquad\\bar\{h\}=H\(Y\\mid X\)=\\frac\{1\}\{n\}\\sum\_\{s\}H\(r\_\{s,:\}\)\.\(36\)Writingd=KL\(π∥uK\)d=\\operatorname\{KL\}\(\\pi\\\|u\_\{K\}\), the information gap decomposes as
ε=logK−I\(X,Y\)=d\+h¯\.\\varepsilon=\\log K\-I\(X;Y\)=d\+\\bar\{h\}\.\(37\)Both terms are nonnegative\. Pinsker’s inequality with natural logarithms gives
maxkπk≤1K\+12‖π−uK‖1≤1K\+d2\.\\max\_\{k\}\\pi\_\{k\}\\leq\\frac\{1\}\{K\}\+\\frac\{1\}\{2\}\\\|\\pi\-u\_\{K\}\\\|\_\{1\}\\leq\\frac\{1\}\{K\}\+\\sqrt\{\\frac\{d\}\{2\}\}\.\(38\)Next, center the count vector byZk=Mk−nπkZ\_\{k\}=M\_\{k\}\-n\\pi\_\{k\}\. Independence across tokens and1−x≤−logx1\-x\\leq\-\\log ximply
𝔼\[‖Z‖22∣R\]\\displaystyle\\mathbb\{E\}\[\\\|Z\\\|\_\{2\}^\{2\}\\mid R\]=∑kVar\(Mk∣R\)=∑s,krs,k\(1−rs,k\)\\displaystyle=\\sum\_\{k\}\\operatorname\{Var\}\(M\_\{k\}\\mid R\)=\\sum\_\{s,k\}r\_\{s,k\}\(1\-r\_\{s,k\}\)\(39\)≤−∑s,krs,klogrs,k=nh¯\.\\displaystyle\\leq\-\\sum\_\{s,k\}r\_\{s,k\}\\log r\_\{s,k\}=n\\bar\{h\}\.Zero entries are interpreted by continuity\. No independence between the cluster counts is required: the squared Euclidean norm is a sum of coordinate squares without cross terms\. Forh¯\>0\\bar\{h\}\>0, Markov’s inequality yields
Pr\(‖Z‖2\>nh¯δ\|R\)≤δ\.\\Pr\\\!\\left\(\\\|Z\\\|\_\{2\}\>\\sqrt\{\\frac\{n\\bar\{h\}\}\{\\delta\}\}\\;\\middle\|\\;R\\right\)\\leq\\delta\.\(40\)Ifh¯=0\\bar\{h\}=0, every assignment is deterministic andZ=0Z=0almost surely, so the same event bound holds\. Combining this event with Eq\. \([38](https://arxiv.org/html/2610.00377#A4.E38)\), and then applying Cauchy–Schwarz, gives
m\(H\)\\displaystyle m\(H\)=maxk\(nπk\+Zk\)≤nK\+nd2\+nh¯δ\\displaystyle=\\max\_\{k\}\(n\\pi\_\{k\}\+Z\_\{k\}\)\\leq\\frac\{n\}\{K\}\+n\\sqrt\{\\frac\{d\}\{2\}\}\+\\sqrt\{\\frac\{n\\bar\{h\}\}\{\\delta\}\}\(41\)≤nK\+\(n22\+nδ\)\(d\+h¯\)\\displaystyle\\leq\\frac\{n\}\{K\}\+\\sqrt\{\\left\(\\frac\{n^\{2\}\}\{2\}\+\\frac\{n\}\{\\delta\}\\right\)\(d\+\\bar\{h\}\)\}=nK\+\(n22\+nδ\)\(logK−I\(X,Y\)\)\.\\displaystyle=\\frac\{n\}\{K\}\+\\sqrt\{\\left\(\\frac\{n^\{2\}\}\{2\}\+\\frac\{n\}\{\\delta\}\\right\)\(\\log K\-I\(X;Y\)\)\}\.Usingm\(H\)≤nm\(H\)\\leq nprovesm\(H\)≤Mδ\(I\(X,Y\)\)m\(H\)\\leq M\_\{\\delta\}\(I\(X;Y\)\)with conditional probability at least1−δ1\-\\delta\. SinceMδ\(I\(X,Y\)\)≥n/K≥1M\_\{\\delta\}\(I\(X;Y\)\)\\geq n/K\\geq 1, monotonicity ofBBand Theorem[2\.1](https://arxiv.org/html/2610.00377#S2.Thmtheorem1)give, on the same event,
LipF\(𝒜H\)≤Bours\(H\)≤B\(Mδ\(I\(X,Y\)\)\)\.\\operatorname\{Lip\}\_\{F\}\(\\mathcal\{A\}\_\{H\}\)\\leq B\_\{\\mathrm\{ours\}\}\(H\)\\leq B\\\!\\left\(M\_\{\\delta\}\(I\(X;Y\)\)\\right\)\.\(42\)No additional failure probability is needed for the sensitivity statement, because the structural theorem holds for every realized partition\. ∎
At fixedn,K,v,β,δn,K,v,\\beta,\\delta, increasingI\(X,Y\)I\(X;Y\)tightens or preserves the certificate\. At its maximumI\(X,Y\)=logKI\(X;Y\)=\\log K, the assignments are deterministic with a uniform marginal, yielding groups of sizen/Kn/Kwhenever divisibility permits\. Thus, InfoLoss directly favors the assignment regime associated with the tightest certificate\.
### D\.4Deterministic argmax grouping at inference
For row\-wise argmaxH\(R\)H\(R\)with any fixed tie\-breaking rule, a separate deterministic bound is
m\(H\(R\)\)\\displaystyle m\(H\(R\)\)≤MA\(ε\):=min\{n,n\[1K\+ε2\+ε\]\},\\displaystyle\\leq M\_\{\\mathrm\{A\}\}\(\\varepsilon\):=\\min\\\!\\left\\\{n,\\;n\\left\[\\frac\{1\}\{K\}\+\\sqrt\{\\frac\{\\varepsilon\}\{2\}\}\+\\varepsilon\\right\]\\right\\\},\(43\)LipF\(𝒜H\(R\)\)\\displaystyle\\operatorname\{Lip\}\_\{F\}\(\\mathcal\{A\}\_\{H\(R\)\}\)≤B\(MA\(ε\)\),ε=logK−I\(X;Y\)\.\\displaystyle\\leq B\(M\_\{\\mathrm\{A\}\}\(\\varepsilon\)\),\\qquad\\varepsilon=\\log K\-I\(X;Y\)\.
###### Proof\.
Retainπ,h¯,ε\\pi,\\bar\{h\},\\varepsilonfrom Eqs\. \([36](https://arxiv.org/html/2610.00377#A4.E36)\)–\([37](https://arxiv.org/html/2610.00377#A4.E37)\)\. Leths,:h\_\{s,:\}be the one\-hot row obtained by argmax, and writeas=maxkrs,ka\_\{s\}=\\max\_\{k\}r\_\{s,k\}\. For each coordinate,
\|hs,k−rs,k\|≤1−as≤−logas≤H\(rs,:\)\.\|h\_\{s,k\}\-r\_\{s,k\}\|\\leq 1\-a\_\{s\}\\leq\-\\log a\_\{s\}\\leq H\(r\_\{s,:\}\)\.\(44\)The first inequality holds for the selected coordinate and every other coordinate, including ties\. The last follows from−logrs,k≥−logas\-\\log r\_\{s,k\}\\geq\-\\log a\_\{s\}for all positive entries\. Thus, forMk=∑shs,kM\_\{k\}=\\sum\_\{s\}h\_\{s,k\}, Eq\. \([38](https://arxiv.org/html/2610.00377#A4.E38)\) andd,h¯≤εd,\\bar\{h\}\\leq\\varepsilongive
Mkn≤πk\+1n∑s\|hs,k−rs,k\|≤1K\+ε2\+h¯≤1K\+ε2\+ε\.\\frac\{M\_\{k\}\}\{n\}\\leq\\pi\_\{k\}\+\\frac\{1\}\{n\}\\sum\_\{s\}\|h\_\{s,k\}\-r\_\{s,k\}\|\\leq\\frac\{1\}\{K\}\+\\sqrt\{\\frac\{\\varepsilon\}\{2\}\}\+\\bar\{h\}\\leq\\frac\{1\}\{K\}\+\\sqrt\{\\frac\{\\varepsilon\}\{2\}\}\+\\varepsilon\.\(45\)Taking the maximum and usingm\(H\(R\)\)≤nm\(H\(R\)\)\\leq nproves the size bound\. SinceMA\(ε\)≥n/K≥1M\_\{\\mathrm\{A\}\}\(\\varepsilon\)\\geq n/K\\geq 1, Theorem[2\.1](https://arxiv.org/html/2610.00377#S2.Thmtheorem1)proves the sensitivity bound\. No sampling assumption or failure probability is needed\. ∎
### D\.5Patching, multiple heads, and simultaneous bounds
At fixedK,v,β,δK,v,\\beta,\\deltaand information gap, the dense ceilingB\(n\)B\(n\)and the information\-controlled size bounds are nondecreasing innn\. Spatial patching replacesNNwithn=⌈N/Ls⌉n=\\lceil N/L\_\{s\}\\rceil, and approximately balanced groups reduce the maximum interacting set to aboutn/Kn/K\. This gives spatial patching and clustering complementary roles in controlling the derived bound\.
The deterministic bound in Appendix[D\.4](https://arxiv.org/html/2610.00377#A4.SS4)applies separately to every temporal patch\. For a simultaneous sampled bound overT′≥1T^\{\\prime\}\\geq 1patches, putε∗=maxpεp\\varepsilon\_\{\*\}=\\max\_\{p\}\\varepsilon\_\{p\}\. Applying Theorem[2\.2](https://arxiv.org/html/2610.00377#S2.Thmtheorem2)with failure probabilityδ/T′\\delta/T^\{\\prime\}per patch and taking a union bound replacesn/δn/\\deltabynT′/δnT^\{\\prime\}/\\deltaand the information gap byε∗\\varepsilon\_\{\*\}in Eq\. \([16](https://arxiv.org/html/2610.00377#S2.E16)\)\. No independence between temporal patches is required, provided each analyzed patch uses independent token\-wise sampling conditional on its pre\-draw soft assignments\. Temporal patching changes the confidence factor, not the size of a single spatial\-attention block\.
For layerℓ\\ell, letℒ¯info\(ℓ\)=−T′−1∑pIp\(ℓ\)\\overline\{\\mathcal\{L\}\}\_\{\\mathrm\{info\}\}^\{\(\\ell\)\}=\-T^\{\\prime\-1\}\\sum\_\{p\}I\_\{p\}^\{\(\\ell\)\}\. Then∑pεp\(ℓ\)=T′\(ℒ¯info\(ℓ\)\+logKℓ\)\\sum\_\{p\}\\varepsilon\_\{p\}^\{\(\\ell\)\}=T^\{\\prime\}\(\\overline\{\\mathcal\{L\}\}\_\{\\mathrm\{info\}\}^\{\(\\ell\)\}\+\\log K\_\{\\ell\}\), and Eq\. \([15](https://arxiv.org/html/2610.00377#S2.E15)\) sums these layer\-wise averages\. The training objective therefore reduces the aggregate information gap across layers and temporal patches while remaining invariant to cluster\-label permutations, allowing groups to adapt locally over time\.
The block argument also extends to multiple heads sharing a partition\. If headhhhas non\-residual boundbh\(q\)=vh\[βh\+\(1\+βh\)sβh\(q\)\]b\_\{h\}\(q\)=v\_\{h\}\[\\beta\_\{h\}\+\(1\+\\beta\_\{h\}\)\\sqrt\{s\_\{\\beta\_\{h\}\}\(q\)\}\]and the concatenated outputs are projected byWOW\_\{O\}, the corresponding residual multi\-head bound is
LipF\(𝒜HMH\)≤1\+‖WO‖2\(∑hbh\(m\(H\)\)2\)1/2\.\\operatorname\{Lip\}\_\{F\}\(\\mathcal\{A\}\_\{H\}^\{\\mathrm\{MH\}\}\)\\leq 1\+\\\|W\_\{O\}\\\|\_\{2\}\\left\(\\sum\_\{h\}b\_\{h\}\(m\(H\)\)^\{2\}\\right\)^\{1/2\}\.\(46\)This follows by summing squared head\-output differences before applying the output projection\. Normalization, feed\-forward layers, regional attention, and the prediction head require their own bounds when analyzing a larger composition\.
## Appendix EProperties of InfoLoss
InfoLoss maximizes mutual information between station\-token data and cluster assignments separately within each temporal patch\. At patchpp, a token is drawn uniformly from then=N′n=N^\{\\prime\}data items and its cluster is sampled according to the corresponding row of𝐑p\\mathbf\{R\}\_\{p\}\. The empirical conditional distribution is thereforePr\(Yp=k∣Xp=𝐱p,sclu\)=Rp,s,k\\Pr\(Y\_\{p\}=k\\mid X\_\{p\}=\\mathbf\{x\}^\{\\mathrm\{clu\}\}\_\{p,s\}\)=R\_\{p,s,k\}, and the marginal isπp,k=n−1∑sRp,s,k\\pi\_\{p,k\}=n^\{\-1\}\\sum\_\{s\}R\_\{p,s,k\}\. The following properties concern the soft assignments; hard groups are obtained by sampling or argmax as described in Section[2\.3\.1](https://arxiv.org/html/2610.00377#S2.SS3.SSS1)\.
##### Cluster balance\.
The marginal entropy satisfiesH\(Yp\)=logK−KL\(𝝅p∥uK\)H\(Y\_\{p\}\)=\\log K\-\\operatorname\{KL\}\(\\bm\{\\pi\}\_\{p\}\\\|u\_\{K\}\), whereuKu\_\{K\}is uniform\. Maximizing this entropy encourages balanced soft cluster masses and discourages collapse into a few clusters\. This equal\-mass preference discourages cluster collapse and promotes broad use of the available regional units\.
##### Assignment confidence\.
The conditional entropy is exactly the average row entropy,
H\(Yp∣Xp\)=1n∑sH\(𝐑p,s,:\)\.H\(Y\_\{p\}\\mid X\_\{p\}\)=\\frac\{1\}\{n\}\\sum\_\{s\}H\(\\mathbf\{R\}\_\{p,s,:\}\)\.\(47\)Minimizing it favors confident, near\-deterministic token\-to\-cluster assignments\. Together with evolution\-driven centroids, this produces clear and input\-adaptive regional memberships\.
##### Joint effect and temporal scope\.
Forℓp=−I\(Xp,Yp\)\\ell\_\{p\}=\-I\(X\_\{p\};Y\_\{p\}\), the gap to the lower bound−logK\-\\log Kis
εp=ℓp\+logK=H\(Yp∣Xp\)\+KL\(𝝅p∥uK\)\.\\varepsilon\_\{p\}=\\ell\_\{p\}\+\\log K=H\(Y\_\{p\}\\mid X\_\{p\}\)\+\\operatorname\{KL\}\(\\bm\{\\pi\}\_\{p\}\\\|u\_\{K\}\)\.\(48\)Both terms are nonnegative, so a small gap jointly promotes confident assignments and balanced cluster usage\. Theorem[2\.2](https://arxiv.org/html/2610.00377#S2.Thmtheorem2)translates this gap into a probabilistic upper bound on the largest sampled group and hence into the fixed\-partition Lipschitz upper bound of Theorem[2\.1](https://arxiv.org/html/2610.00377#S2.Thmtheorem1)\. Appendix[D\.4](https://arxiv.org/html/2610.00377#A4.SS4)provides the deterministic argmax counterpart\. A balanced deterministic partition attains zero when divisibility permits\. Because the loss is evaluated independently at each temporal patch and is invariant to cluster\-label permutations, it supports the locally adaptive regrouping central to STCFormer\.
## Appendix FExperimental Setup Details
### F\.1Datasets and Preprocessing
Table 4:Statistics of the processed weather datasets\. Each variable defines a forecasting task\.TheFrench dataset111https://github\.com/meteofrance/meteonetcomprises hourly temperature, u\-wind, and v\-wind variables collected from 234 meteorological stations, spanning from January 1, 2016, to December 31, 2016\. This dataset is derived from the MeteoNet dataset\. TheHunan datasetcontains hourly temperature, u\-wind, and v\-wind data collected from 3,570 meteorological stations, covering the period from April 1, 2023, to September 30, 2023\. This dataset is provided by the Hunan Meteorological Bureau\. TheGlobal datasetincludes hourly temperature and wind speed variables collected from 3,850 meteorological stations worldwide, spanning from January 1, 2019, to December 31, 2020\. This dataset was curated by Corrformer[Wu et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib17)\. For all datasets, we partition the data into training, validation, and test sets with a ratio of 6:2:2\. We apply Z\-score normalization using the statistics of the training set\.
Table[4](https://arxiv.org/html/2610.00377#A6.T4)summarizes the processed datasets, comprising eight separate dataset–variable forecasting tasks\. Station counts refer to the original stations before spatial patching\. The chronological split uses⌊0\.2T⌋\\lfloor 0\.2T\\rfloortime steps for each of validation and testing, with the remainder used for training, whereTTis the total sequence length\.
### F\.2Baselines
In our experiments, we compare STCFormer against 15 baselines in two categories\. The six spatio\-temporal methods are DCRNN[Li et al\. \(2018\)](https://arxiv.org/html/2610.00377#bib.bib9), Corrformer[Wu et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib17), EasyST[Tang et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib29), CDPNet[Xu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib27), STELLA[Fu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib35), and S2Transformer[Chen et al\. \(2026\)](https://arxiv.org/html/2610.00377#bib.bib36)\. The nine multivariate time series methods are DLinear[Zeng et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib8), PatchTST[Nie et al\. \(2023\)](https://arxiv.org/html/2610.00377#bib.bib1), Crossformer[Zhang and Yan \(2023\)](https://arxiv.org/html/2610.00377#bib.bib6), TimeXer[Wang et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib20), CCM[Chen et al\. \(2024\)](https://arxiv.org/html/2610.00377#bib.bib23), DUET[Qiu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib22), TimeFilter[Hu et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib24), TQNet[Lin et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib37), and xPatch[Stitsyuk and Choi \(2025\)](https://arxiv.org/html/2610.00377#bib.bib38)\. CCM uses DLinear as its forecasting backbone and learns cluster\-specific shared parameters; tables abbreviate this combination as CCM\. These baselines cover graph\-based spatial modeling, station\-specific forecasting, and multivariate temporal modeling\.
### F\.3Implementation and Hyperparameters
##### Training and evaluation\.
All experiments are implemented with PyTorch and BasicTS[Shao et al\. \(2025\)](https://arxiv.org/html/2610.00377#bib.bib28)on a server equipped with an NVIDIA A100 GPU with 40 GB of memory\. We use the past 48 hours to predict the next 24 and 72 hours, with MSE as the training loss\. The maximum number of training epochs is 50, with an early\-stopping patience of 5\. All models use Adam with an initial learning rate of10−410^\{\-4\}, a weight decay of10−410^\{\-4\}, and a cosine annealing learning rate scheduler\. For TimeFilter on Hunan and Global, we use a temporal patch length of 24 and 30 training epochs; the French configuration is unchanged\. All reported experimental results, including hyperparameter sweeps, are means of three runs; tables also report standard deviations where available\. Efficiency benchmarks use batch size 8 for every method\. The main text reports 24\-hour MSE\. Additional forecasting metrics and 72\-hour results are provided in Appendix[G](https://arxiv.org/html/2610.00377#A7), and additional ablation metrics in Appendix[H](https://arxiv.org/html/2610.00377#A8)\.
##### Evaluation metrics\.
MSE and MAE are computed after inverse normalization, in the original data space\. For each dataset’s target\-variable task, SEDI uses one fixed threshold shared by all stations: the 95th percentile of the training\-period observations pooled across all stations\. The threshold is then held fixed for all methods and evaluated horizons\. For each run, we pool all test samples into a single contingency table and compute SEDI once, rather than averaging station\-wise scores\. Leth=TP/\(TP\+FN\)h=\\mathrm\{TP\}/\(\\mathrm\{TP\}\+\\mathrm\{FN\}\)andf=FP/\(FP\+TN\)f=\\mathrm\{FP\}/\(\\mathrm\{FP\}\+\\mathrm\{TN\}\)denote the pooled hit and false\-alarm rates\. ThenSEDI=\[logf−logh−log\(1−f\)\+log\(1−h\)\]/\[logf\+logh\+log\(1−f\)\+log\(1−h\)\]\\mathrm\{SEDI\}=\[\\log f\-\\log h\-\\log\(1\-f\)\+\\log\(1\-h\)\]/\[\\log f\+\\log h\+\\log\(1\-f\)\+\\log\(1\-h\)\], with larger values indicating better extreme\-event discrimination\. Reported SEDI values summarize the three run\-level scores\.
##### Model configuration\.
The common settings across datasets are an embedding dimension of 256, an FFN dimension of 512, a dropout rate of 0\.1, and four attention heads\. The temporal and spatial patch sizes\(Lt,Ls\)\(L\_\{t\},L\_\{s\}\)are\(4,2\)\(4,2\)for French,\(4,7\)\(4,7\)for Hunan, and\(6,7\)\(6,7\)for Global\. STCFormer uses three layers, a clustering ratio of 0\.05, and an InfoLoss weight ofλ=0\.1\\lambda=0\.1on all datasets\. InfoLoss is the negative within\-patch mutual information in Eq\. \([15](https://arxiv.org/html/2610.00377#S2.E15)\), computed at every layer, averaged over temporal patches, and summed across layers; no additional entropy coefficient is used\. The layer counts of the baselines follow their original papers\. For models requiring a predefined graph, we construct a 20\-nearest\-neighbor spatial adjacency matrix using station latitude and longitude\.
## Appendix GAdditional Forecasting Results
Tables[5](https://arxiv.org/html/2610.00377#A7.T5)–[9](https://arxiv.org/html/2610.00377#A7.T9)report 24\-hour MAE and SEDI and all 72\-hour metrics under the main experimental setup\. Across the complete 48 comparisons, STCFormer ranks first in 42 and second in five, demonstrating consistently strong performance across metrics and horizons\.
Table 5:24\-hour forecasting results \(MAE,↓\\downarrow\) with a 48\-hour look\-back window\. Values are mean±\\pmstandard deviation over three runs\. Bold and underlined means indicate the best and second\-best reported values in each column; ties share the same marking\.Table 6:24\-hour forecasting results \(SEDI,↑\\uparrow\) with a 48\-hour look\-back window\. Values are mean±\\pmstandard deviation over three runs\. Bold and underlined means indicate the best and second\-best reported values in each column; ties share the same marking\.Table 7:72\-hour forecasting results \(MAE,↓\\downarrow\) with a 48\-hour look\-back window\. Values are mean±\\pmstandard deviation over three runs\. Bold and underlined means indicate the best and second\-best reported values in each column; ties share the same marking\.Table 8:72\-hour forecasting results \(MSE,↓\\downarrow\) with a 48\-hour look\-back window\. Values are mean±\\pmstandard deviation over three runs\. Bold and underlined means indicate the best and second\-best reported values in each column; ties share the same marking\.Table 9:72\-hour forecasting results \(SEDI,↑\\uparrow\) with a 48\-hour look\-back window\. Values are mean±\\pmstandard deviation over three runs\. Bold and underlined means indicate the best and second\-best reported values in each column; ties share the same marking\.
## Appendix HAdditional Ablation Results
Tables[10](https://arxiv.org/html/2610.00377#A8.T10)and[11](https://arxiv.org/html/2610.00377#A8.T11)report the MAE and SEDI results corresponding to the 24\-hour MSE ablation in Table[2](https://arxiv.org/html/2610.00377#S3.T2)\. The full model attains the best reported mean on all eight tasks for both metrics, consistent with the MSE comparison\. The variants and all other experimental settings follow the main ablation study\.
Table 10:24\-hour ablation results \(MAE,↓\\downarrow\) with a 48\-hour look\-back window\. Values are mean±\\pmstandard deviation over three runs\. Bold means indicate the best reported values in each column; ties are both bold\.Table 11:24\-hour ablation results \(SEDI,↑\\uparrow\) with a 48\-hour look\-back window\. Values are mean±\\pmstandard deviation over three runs\. Bold means indicate the best reported values in each column; ties are both bold\.
## Appendix IAdditional Analyses
We extend the comparison to three time series foundation models and three grid\-based predictive models\. Table[12](https://arxiv.org/html/2610.00377#A9.T12)summarizes 24\-hour MSE on all eight dataset–variable tasks using a 48\-hour input window\. STCFormer results are those of the main experiment\. We report mean and standard deviation, with the best mean in each column in bold\.
Table 12:Additional 24\-hour forecasting comparisons \(MSE,↓\\downarrow\) with a 48\-hour input window\. Values are mean±\\pmstandard deviation over three runs\. Bold means indicate the best reported values in each column; ties are both bold\.### I\.1Comparison with Time Series Foundation Models
We evaluate Timer\([Liu et al\., 2024b](https://arxiv.org/html/2610.00377#bib.bib42)\), Chronos\-Bolt\-Tiny\([Ansari et al\., 2024](https://arxiv.org/html/2610.00377#bib.bib43)\), and Time\-MoE\([Shi et al\., 2025](https://arxiv.org/html/2610.00377#bib.bib44)\)\. These models undergo full\-parameter fine\-tuning for five epochs on French and three epochs on Hunan and Global\. STCFormer obtains lower mean MSE on all eight tasks, with reductions of 1\.1%–5\.6% relative to the strongest foundation\-model baseline on each task\. Time\-MoE is the strongest of these baselines on six tasks, whereas Chronos\-Bolt\-Tiny performs best on Hunan temperature and U\-wind\. These results support the effectiveness of STCFormer under the evaluated fine\-tuning budgets\.
### I\.2Comparison with Grid\-Based Predictive Models
We additionally evaluate PhyDNet\([Guen and Thome, 2020](https://arxiv.org/html/2610.00377#bib.bib30)\), PredRNN\([Wang et al\., 2023](https://arxiv.org/html/2610.00377#bib.bib31)\), and SimVP\([Gao et al\., 2022](https://arxiv.org/html/2610.00377#bib.bib32)\), each trained for 30 epochs\. Station observations are interpolated onto a grid, forecasts are generated on that grid, and predictions are mapped back to station locations for evaluation\. STCFormer achieves the lowest mean MSE on all eight tasks\. On Global temperature and wind, it reduces MSE from the strongest grid baseline’s 20\.139 and 6\.574 to 6\.917 and 3\.584, respectively\. Although interpolation can introduce station–grid conversion error, the consistent margin across all eight tasks highlights both the necessity and effectiveness of forecasting directly on irregular station networks\.
### I\.3Additional Hyperparameter Studies
We complement the InfoLoss\-weight, cluster\-ratio, and embedding\-dimension studies in Section[3\.4\.1](https://arxiv.org/html/2610.00377#S3.SS4.SSS1)with look\-back length and spatio\-temporal patch size\. We report test MSE for temperature forecasting: the look\-back study forecasts 72 hours on French temperature, while the patch\-size study forecasts 24 hours\. Each plotted value is the mean of three runs; error bars are omitted for compactness\.
#### I\.3\.1Look\-Back Window Length
Figure[6](https://arxiv.org/html/2610.00377#A9.F6)compares look\-back windows of 24, 48, 96, and 168 hours for 72\-hour French temperature forecasting\. STCFormer attains MSE values of 11\.498, 11\.245, 11\.318, and 11\.501, respectively, with its lowest error at 48 hours\. It achieves the lowest reported MSE among the compared methods at 24\- and 48\-hour look\-back lengths; CCM performs best at 96 and 168 hours\. The results support the 48\-hour reference window, while showing that longer histories do not consistently improve performance\. CCM uses DLinear as its forecasting backbone, as in the main comparison\.
Figure 6:Look\-back sensitivity on French temperature with a fixed 72\-hour forecasting horizon\. The horizontal axis is the input\-window length in hours\.
#### I\.3\.2Spatio\-Temporal Patch Sizes
We jointly vary the temporal patch lengthLt∈\{1,2,4,6\}L\_\{t\}\\in\\\{1,2,4,6\\\}and the spatial patch lengthLsL\_\{s\}, usingLs∈\{1,2,3,6\}L\_\{s\}\\in\\\{1,2,3,6\\\}on French andLs∈\{1,7,10,14\}L\_\{s\}\\in\\\{1,7,10,14\\\}on Hunan\. Figure[7](https://arxiv.org/html/2610.00377#A9.F7)presents the resulting 24\-hour MSE\. The French sweep favors\(Lt,Ls\)=\(6,2\)\(L\_\{t\},L\_\{s\}\)=\(6,2\), while the main experiments use\(4,2\)\(4,2\)\. Hunan reaches 4\.742 at\(2,10\)\(2,10\), almost identical to 4\.743 at\(4,7\)\(4,7\)\. WithLt=4L\_\{t\}=4, replacingLs=1L\_\{s\}=1by 2 on French and 7 on Hunan reduces MSE from 6\.553 to 6\.291 and from 5\.163 to 4\.743, respectively\. Joint spatial and temporal patching is thus useful in these settings, but the best combination is dataset\-dependent and coarser patches do not uniformly improve performance\.
\(a\)French temperature\.\(b\)Hunan temperature\.
Figure 7:Joint sensitivity to temporal and spatial patch sizes \(24\-hour MSE\)\. Each bar represents one\(Lt,Ls\)\(L\_\{t\},L\_\{s\}\)configuration; colors distinguish spatial patch lengths\.
### I\.4Additional Efficiency Analysis
We complement the Hunan comparison in Section[3\.4\.2](https://arxiv.org/html/2610.00377#S3.SS4.SSS2)with French temperature forecasting, using a 48\-hour input window, a 24\-hour horizon, and batch size 8 for every method\. Figure[8](https://arxiv.org/html/2610.00377#A9.F8)plots mean training time per epoch against test MSE, with bubble area proportional to peak training GPU memory\. The time axis is logarithmic to accommodate the wide runtime range\.
Among the methods shown, STCFormer achieves the lowest reported MSE \(6\.291\), taking15\.306±0\.00315\.306\\pm 0\.003s/epoch and 0\.378 GiB\. It is18\.1×18\.1\\timesfaster than DCRNN; compared with TimeFilter, it uses 28\.3% less training time and 86\.8% less memory\. PatchTST and TimeXer train faster, whereas DUET uses less memory\. These results demonstrate a favorable accuracy–efficiency trade\-off across methods with substantially different computational profiles\.
Figure 8:Efficiency on French temperature \(48\-to\-24\-hour forecasting, batch size 8\)\. Bubble area indicates peak training GPU memory; labels report time per epoch and memory\. The time axis uses a logarithmic scale\.#### I\.4\.1Comparison with Full Attention
We compare CGAB with the Full Attention variant on French and Global temperature forecasting, using a 48\-hour input window, a 24\-hour horizon, and batch size 8\.
Table 13:CGAB versus full attention\. Time: s/epoch; memory: GiB\. All values are three\-run means; lower is better\. Best values per dataset are bold\.Table[13](https://arxiv.org/html/2610.00377#A9.T13)shows that CGAB lowers MSE on both datasets\. Its clustering and regional aggregation increase epoch time by 22\.7% on French and 11\.4% on Global, while reducing peak memory on the larger Global network by 11\.1%, from 10\.023 to 8\.913 GiB\. The modest runtime cost therefore supports more accurate forecasts and, at larger spatial scale, lower memory use, making the additional structured interaction worthwhile\.
### I\.5Sensitivity to Spatial Patch Construction
We compare four ways to organize stations into spatial patches: random grouping, Hilbert\-curve ordering, capacity\-constrained geographic clustering, and the serpentine ordering used in the main experiments\. This comparison concerns patch construction before embedding, rather than the subsequent dynamic clustering in CGAB\.
Table 14:Spatial patch construction \(temperature MSE\)\. Values are mean±\\pmstandard deviation over three runs; best means are bold\.Table[14](https://arxiv.org/html/2610.00377#A9.T14)shows lower mean MSE for all three geographic constructions than for random grouping on both datasets\. Hilbert ordering performs best on French \(6\.152\), whereas the default serpentine ordering performs best on Hunan \(4\.743\)\. Relative to random grouping, serpentine ordering reduces mean MSE by 1\.4% and 4\.8%, respectively\. These results validate geographically informed patch construction: every geographic strategy improves over random grouping, and the default serpentine ordering provides a strong, scalable choice across datasets\.
### I\.6Numerical Diagnostics for the Theoretical Analysis
We examine whether the cluster\-size dependence in Theorem[2\.1](https://arxiv.org/html/2610.00377#S2.Thmtheorem1)and the assignment behavior encouraged by InfoLoss are visible on French Temperature\. Two matched one\-layer models differ only in the InfoLoss weight \(Full\-1L:0\.10\.1; NoInfo\-1L:00\)\. Both use a 48\-hour input, 24\-hour forecast, 6\-hour temporal patches, two\-station spatial patches,n=117n=117valid station tokens, andK=10K=10clusters\. Bound and assignment statistics cover all 1,685 test windows and eight temporal patches per window \(13,480 records per model\)\.
##### Cluster size and the diagnostic bound\.
Figure[9\(a\)](https://arxiv.org/html/2610.00377#A9.F9.sf1)evaluates the monotoneB\(q\)/B\(n\)B\(q\)/B\(n\)dependence on the largest cluster sizeqq; the curves follow the bound formula using constants reconstructed from the reported median and dense diagnostics, and markers show the observed medians\. A smaller largest cluster yields a smaller fixed\-partition diagnostic, whileq=nq=nrecovers the dense value\. The mean diagnostic ratio is0\.40760\.4076for Full\-1L and0\.53370\.5337for NoInfo\-1L\. Using the maximum observed local\-attention input norm instantiates the theoretical dependence on the empirical test domain\.
##### Effect of InfoLoss\.
Table[15](https://arxiv.org/html/2610.00377#A9.T15)summarizes the matched ablation\. With InfoLoss, the mean station–cluster mutual information is higher, while the largest cluster, cluster\-size variation, and empty\-cluster rate are lower\. The mean local\-to\-dense diagnostic ratio falls by0\.12610\.1261\. This is consistent with the theoretical chain from more informative, balanced assignments to smaller clusters and a tighter fixed\-partition diagnostic\.
Table 15:French Temperature one\-layer assignment and bound diagnostics, averaged over 13,480 test\-window/patch records per model\.Δ\\Deltais Full\-1L minus NoInfo\-1L\.
##### Fixed\-partition perturbations\.
For the theorem\-facing residual local\-attention operator, we freeze each partition before perturbing its input and disable dropout\. On the same 64 test windows \(eight patches each\), we evaluate 20 unit\-Frobenius Gaussian directions at five relative perturbation magnitudes\. Figure[9\(b\)](https://arxiv.org/html/2610.00377#A9.F9.sf2)compares only the*largest sampled*amplification for each partition family\. The maxima increase from Balanced \(2\.6266\) through Learned \(2\.7020\), size\-matched Random \(2\.9542\), and Imbalanced \(3\.1824\) to Dense \(3\.8256\), consistent with the diagnostic ordering at this aggregate level\. Balanced gives the smallest amplification and Learned remains close, with both clearly below size\-matched Random, Imbalanced, and Dense\. The separation between Learned and size\-matched Random further shows that the learned partition aligns the restricted interactions with the data\.
\(a\)Cluster size and the fixed\-partition diagnostic\.\(b\)Largest sampled amplification\.
Figure 9:Numerical diagnostics on French temperature\. \(a\) Normalized bound versus largest\-cluster ratio; open markers denote test\-record medians\. \(b\) Maximum sampled fixed\-partition amplification versus medianB\(q\)B\(q\)across five partition families\.
### I\.7Prediction Visualizations
Figures[10](https://arxiv.org/html/2610.00377#A9.F10)–[12](https://arxiv.org/html/2610.00377#A9.F12)compare STCFormer with DLinear, PatchTST, Crossformer, TimeXer, DUET, S2Transformer, and EasyST on French temperature, Hunan temperature, and Global wind speed\. Each figure shows the same station and forecast window across methods, using 48 hours of observations to predict the following 72 hours\. Gray curves denote the observed history, black curves the future ground truth, and red dashed curves the predictions; the shaded region marks the forecast horizon\.
For French temperature, STCFormer closely follows the low\-temperature troughs and the declining level of successive peaks\. On Hunan temperature, it captures both the cooler regime after the observed drop and the subsequent daily fluctuations, whereas several baselines retain a warm bias\. On Global wind speed, STCFormer reproduces the sustained increase and elevated values near the end of the horizon more faithfully than the comparatively flat forecasts of DLinear, PatchTST, and TimeXer\. Together, these cases visually confirm STCFormer’s ability to track regime changes, periodic variation, and evolving trends across distinct station forecasting settings\.
Figure 10:Prediction visualization on French temperature with a 48\-hour input and a 72\-hour forecast horizon\. All methods are shown for the same station and window\. Gray: observed history; black: ground truth; red dashed: prediction\. The shaded region denotes the forecast horizon\.Figure 11:Prediction visualization on Hunan temperature with a 48\-hour input and a 72\-hour forecast horizon\. The plotting conventions follow Figure[10](https://arxiv.org/html/2610.00377#A9.F10)\. Values are shown in dataset units\.Figure 12:Prediction visualization on Global wind speed with a 48\-hour input and a 72\-hour forecast horizon\. The plotting conventions follow Figure[10](https://arxiv.org/html/2610.00377#A9.F10)\. Stored values are divided by 10 for display, consistently for observations and predictions\.相似文章
TSSM:面向全球站点天气预报的三轴状态空间模型(基于时间-变量-历史建模)
本文提出TSSM,一种用于全球站点天气预报的三轴状态空间模型,该模型融合了按周期对齐的历史数据,以改进长时预测和极端事件预测。在大规模Weather-5K数据集上取得了最先进性能,并在观测缺失条件下展现出强大的鲁棒性。
PatchSTG: 用于不规则传感器网络交通预测的可扩展时空图变换器
PatchSTG 提出了一种基于补丁的时空图变换器,用于不规则传感器网络的交通预测,实现了近线性复杂度并保持了有竞争力的性能。
AdaST:面向时空预测的自适应耦合框架
AdaST 提出了一种自适应时空预测框架,利用异构感知专家将输入分解为具有不同耦合机制的组成部分,再通过一个考虑相关性的模块进行重组,从而在交通、气候和能源预测任务上超越了最先进的基线方法。
基于语义结构化分区的多元时间序列预测的重新思考
本文提出了SCPaT,一个基于Transformer的多元时间序列预测框架,它使用语义结构化分区来解决现有基于块方法的局限性,并在真实数据集上展示了有效性。
大气扩散引导的时空Transformer用于核辐射预测
本文介绍了NRFormer+,一种利用大气扩散引导进行核辐射预测的时空Transformer,在日本的两个大规模基准上达到了最先进的精度。