Spatiotemporal self‐attention network
ST
‐
GranNet
for granary temperature prediction
Changtian Li, Zelong Zhou, Hongfu Liu, Zhikang Chen, Han Gu, Jun Ma, Bin Chen Abstract
Background
Food storage temperature prediction is critical for ensuring the safety of the food supply chain and reducing food waste. Traditional physical modeling and statistical methods heavily depend on prior data and struggle to capture complex nonlinear features. Existing deep learning models for granary temperature prediction still face challenges in effectively extracting spatiotemporal features. With traditional adjacency‐matrix‐based methods it is difficult to capture the complex relationships among sensors, most existing algorithms merely performing simple concatenation or sequential input of spatiotemporal features, lacking sufficient interaction. In addition, they fall short in incorporating external feature variables. To address these limitations, this study proposes ST‐GranNet, an innovative spatiotemporal attention framework based on the self‐attention mechanism. ST‐GranNet employs channel embedding and point embedding to capture spatial correlations among sensors and long‐term dependencies in temperature sequences, respectively, followed by a novel fusion approach to integrate these spatiotemporal features. The model is validated on a real corn storage dataset from Sinograin Chongqing Depot Co. Ltd.
Results
Experimental results demonstrate that ST‐GranNet outperforms conventional time series prediction models (LSTM and GRU) in terms of mean absolute error and mean squared error. It also exhibits noticeable enhancements compared with recently emerging self‐attention‐based models. We optimize the model performance via hyperparameter experiments. Ablation studies further confirm the effectiveness of the coordinated spatiotemporal feature extraction in enhancing prediction accuracy. Visualization experiments additionally illustrate the internal mechanism of the self‐attention in ST‐GranNet.
Conclusion
This work provides a high‐precision temperature prediction tool for intelligent grain storage management, enabling real‐time monitoring and risk warning, with significant potential to reduce grain loss and optimize storage conditions. © 2026 Society of Chemical Industry.