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

Institutions

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

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Enhancing data-driven weather forecasting via gated relative position encoding and spatial-aware feed-forward network

Baoxiang Pan, D Zhang, Dazhi Xi, Leyi Wang et al.
2 links
Geoscientific model development
Meteorological Phenomena and Simulations
article

Enhancing data-driven weather forecasting via gated relative position encoding and spatial-aware feed-forward network

Baoxiang Pan, D Zhang, Dazhi Xi, Leyi Wang, Xiaoyu Huang, Jerry Zhijian Yang
article en

Abstract

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.

Geoscientific model developmentVol. 19(22)
Chinese Academy of Sciences (CN), Wuhan University (CN), Dongfang Electric Corporation (China) (CN), Institute of Atmospheric Physics (CN), University of Hong Kong (HK)
State Grid Corporation of China, National Science and Technology Major Project
Climate action
Meteorological Phenomena and Simulations
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon