EAAI Journal 2026 Journal Article
Natural gas demand forecasting via latent pattern retrieval and expert specialization
- Sichong Lu
- Hairun Wang
- Jiahui Chai
- Yi Su
- Lean Yu
- Bo Yang
Natural gas demand forecasting is challenged by pattern heterogeneity and recurring cycles, which existing global modeling approaches cannot effectively address. This study proposes a latent pattern retrieval and expert specialization (LPRES) framework that strategically leverages pretrained language models (PLMs) not as direct forecasting tools but through role-specific adaptation. First, latent pattern awareness is developed through a temporal feature learning model derived from a PLM fine-tuned for anomaly detection, exploiting its sensitivity to pattern changes. Second, based on this model, an adaptive sliding window segmentation algorithm partitions historical data into segments, each corresponding to a distinct latent pattern. Third, for each identified latent pattern, specialized forecasting experts are trained using a PLM fine-tuned on large-scale forecasting tasks, thereby adapting its strong predictive capacity to the characteristics of individual latent patterns. Fourth, during forecasting, input windows are matched to their most similar latent pattern through similarity-based retrieval and routed to the corresponding expert. Experiments on four natural gas datasets spanning monthly and hourly frequencies show that LPRES delivers competitive forecasting performance across diverse data characteristics, achieving mean absolute percentage error (MAPE) values from 0. 035 to 0. 107 and reducing errors by up to 11. 2% relative to the strongest baselines. A complementary theoretical framework identifies the conditions under which expert specialization is most beneficial.