Enhancing data-driven weather forecasting via gated relative position encoding and spatial-aware feed-forward network
Transformer-based weather forecasting models often use static positional encodings, limiting their representation of flow-dependency and geographical heterogeneity. We introduce Gated Relative Position Encoding (GRPE) to address these limitations. Gating mechanism has recently been applied in data-driven weather forecasting, but its specific contribution remains insufficiently understood. We propose Spatial-Aware Feed-Forward Network (SAFN) to explore this question. GRPE constructs dynamic positional biases through a gated linear combination of learnable prototypes, allowing spatial relationships to vary with location and atmospheric state. SAFN combines depth-wise convolutions, multiplicative gating, and a learnable global positional bias to represent spatial feature interactions and persistent geographical influences. We integrate both components into the Neighborhood Attention Transformer for Atmospheric prediction (AtmoNAT), a global forecasting model with 43.4 million parameters trained on ERA5 reanalysis at 1.5° spatial resolution and 12 h temporal intervals. Evaluations using WeatherBench 2 metrics show that AtmoNAT's deterministic forecasts outperform the ensemble-mean forecasts of several other coarse-resolution models across most key variables at lead times up to 72 h. Over global land areas, AtmoNAT also outperforms several models trained at 0.25° resolution, including FuXi and GraphCast, for 10 m winds and 700 hPa specific humidity at lead times up to 120 h. Ablation experiments show that GRPE and SAFN each reduce root mean square errors by approximately 5 %–10 % across most evaluated variables, while individually increasing parameter counts and computational costs by only approximately 1 %–4 %. These results demonstrate that adaptive positional encoding and spatially aware feature gating can improve weather forecasting accuracy with modest computational overhead, highlighting the profound potential of GRPE and SAFN in advancing next-generation weather forecasting.
Authors
- Baoxiang Pan (ORCID: https://orcid.org/0000-0002-3409-5568)
- D Zhang
- Dazhi Xi (ORCID: https://orcid.org/0000-0002-4096-8441)
- Leyi Wang
- Xiaoyu Huang
- Jerry Zhijian Yang
Institutions
- Chinese Academy of Sciences (CN)
- Wuhan University (CN)
- Dongfang Electric Corporation (China) (CN)
- Institute of Atmospheric Physics (CN)
- University of Hong Kong (HK)
Publication Details
- Journal
- Geoscientific model development
- Published
- 2026-11-23
- DOI
- https://doi.org/10.5194/gmd-19-11149-2026
- Primary Topic
- Meteorological Phenomena and Simulations
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- State Grid Corporation of China
- National Science and Technology Major Project