A Spatiotemporal Attention-Guided Graph Neural Network for Precise Hyperspectral Estimation of Corn Nitrogen Content
Abstract
:1. Introduction
- Temporal–spatial fusion feature extraction module based on the transformer architecture: This structure integrates temporal sequences and spatial locations using a self-attention mechanism to capture global dependencies among spectral bands, thereby improving attention to key bands and enhancing prediction accuracy.
- Joint modeling of spectral and graph structures: This study innovatively transforms hyperspectral data into graph representations. By leveraging a GNN to propagate and aggregate spectral features between adjacent crop samples, the model enhances spatial dependency learning, thereby improving generalization performance in complex field environments.
- A dynamic attention weight update mechanism: Considering the significant variation in maize nitrogen content across growth stages, a dynamic attention update strategy was designed that incorporates temporal windows and field-level information, enabling the model to adjust its focus according to phenological stages and enhancing the modeling of temporal features.
2. Related Work
2.1. Traditional Machine Learning for Hyperspectral Estimation of Maize Nitrogen Content
2.2. Deep Learning-Based Hyperspectral Estimation of Maize Nitrogen Content
3. Materials and Method
3.1. Data Collection
3.2. Data Preprocessing
3.3. Proposed Method
3.3.1. Overall View
3.3.2. Dynamic Spectral–Spatiotemporal Attention Fusion Module
3.3.3. Graph Neural Network
3.4. Hardware and Software Platform
3.5. Model Evaluation
3.6. Baseline
4. Results and Discussion
4.1. Experimental Results of Nitrogen Content Estimation Models
4.2. Visualization of Attention Mechanisms and Response to Key Factors
4.3. Performance of the Proposed Method at Different Growth Stages
4.4. Ablation Study of Different Attention Mechanisms
4.5. Ablation Study on GNN Contribution
4.6. Computational Efficiency and Inference Speed Analysis
4.7. Discussion
4.8. Limitation and Future Work
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Li, J.; Ge, Y.; Puntel, L.A.; Heeren, D.M.; Bai, G.; Balboa, G.R.; Gamon, J.A.; Arkebauer, T.J.; Shi, Y. Integrating UAV hyperspectral data and radiative transfer model simulation to quantitatively estimate maize leaf and canopy nitrogen content. Int. J. Appl. Earth Obs. Geoinf. 2024, 129, 103817. [Google Scholar] [CrossRef]
- Saudy, H.S.; Mohamed El-Metwally, I. Effect of irrigation, nitrogen sources, and metribuzin on performance of maize and its weeds. Commun. Soil Sci. Plant Anal. 2023, 54, 22–35. [Google Scholar] [CrossRef]
- Zhao, X.; Dong, Q.; Han, Y.; Zhang, K.; Shi, X.; Yang, X.; Yuan, Y.; Zhou, D.; Wang, K.; Wang, X.; et al. Maize/peanut intercropping improves nutrient uptake of side-row maize and system microbial community diversity. BMC Microbiol. 2022, 22, 14. [Google Scholar] [CrossRef]
- Liang, Y.; Wang, J.; Wang, Z.; Hu, D.; Jiang, Y.; Han, Y.; Wang, Y. Fulvic acid alleviates the stress of low nitrogen on maize by promoting root development and nitrogen metabolism. Physiol. Plant. 2024, 176, e14249. [Google Scholar] [CrossRef] [PubMed]
- Wang, S.; Guan, K.; Wang, Z.; Ainsworth, E.A.; Zheng, T.; Townsend, P.A.; Liu, N.; Nafziger, E.; Masters, M.D.; Li, K.; et al. Airborne hyperspectral imaging of nitrogen deficiency on crop traits and yield of maize by machine learning and radiative transfer modeling. Int. J. Appl. Earth Obs. Geoinf. 2021, 105, 102617. [Google Scholar] [CrossRef]
- Li, Z.W.; Wang, G.Y.; Khan, K.; Yang, L.; Chi, Y.X.; Wang, Y.; Zhou, X.B. Irrigation combines with nitrogen application to optimize soil carbon and nitrogen, increase maize yield, and nitrogen use efficiency. Plant Soil 2024, 499, 605–620. [Google Scholar] [CrossRef]
- Shtylla, B.; Pikuli, K.; Morava, K.; Karapanci, N.; Zhidro, N. Determination of Proteins by the Kjeldahl Method in Cereals of the Markets in Korça City. JASRD J. Agric. Sustain. Rural Dev. 2024, 2, 26–33. [Google Scholar] [CrossRef]
- Kumar, K.; Parihar, C.M.; Nayak, H.S.; Sena, D.R.; Godara, S.; Dhakar, R.; Patra, K.; Sarkar, A.; Bharadwaj, S.; Ghasal, P.C.; et al. Modeling maize growth and nitrogen dynamics using CERES-Maize (DSSAT) under diverse nitrogen management options in a conservation agriculture-based maize-wheat system. Sci. Rep. 2024, 14, 11743. [Google Scholar] [CrossRef]
- Bofana, J.; Mussane, R.D.; Tamele, R.A.; Costa, A.C.; Savanguane, B.; Popinsky, I.; Matusse, A.F. Quantifying the Spatiotemporal Variations of Soil Nitrogen Fixation or Absorption from Soybean, Cotton, and Maize Planted Fields to Support Sustainable Agriculture Practices. Nitrogen 2024, 5, 1135–1155. [Google Scholar] [CrossRef]
- Shen, J.; Huang, Y.; Chen, W.; Li, M.; Tan, W.; Wang, R.; Deng, Y.; Gong, Y.; Ai, S.; Liu, N. Assessing the Transferability of Models for Predicting Foliar Nutrient Concentrations Across Maize Cultivars. Remote Sens. 2025, 17, 652. [Google Scholar] [CrossRef]
- Guo, A.; Huang, W.; Wang, K.; Qian, B.; Cheng, X. Early monitoring of maize northern leaf blight using vegetation indices and plant traits from multiangle hyperspectral data. Agriculture 2024, 14, 1311. [Google Scholar] [CrossRef]
- Mandal, D.; de Siqueira, R.; Longchamps, L.; Khosla, R. Machine learning and fluorosensing for estimation of maize nitrogen status at early growth-stages. Comput. Electron. Agric. 2024, 225, 109341. [Google Scholar] [CrossRef]
- Wang, Z.; Fan, S.; An, T.; Zhang, C.; Chen, L.; Huang, W. Detection of insect-damaged maize seed using hyperspectral imaging and hybrid 1D-CNN-BiLSTM model. Infrared Phys. Technol. 2024, 137, 105208. [Google Scholar] [CrossRef]
- Sabzi, S.; Pourdarbani, R.; Rohban, M.H.; García-Mateos, G.; Arribas, J.I. Estimation of nitrogen content in cucumber plant (Cucumis sativus L.) leaves using hyperspectral imaging data with neural network and partial least squares regressions. Chemom. Intell. Lab. Syst. 2021, 217, 104404. [Google Scholar] [CrossRef]
- Geng, J.; Yang, C.; Li, Y.; Lan, L.; Luo, Q. MPA-RNN: A novel attention-based recurrent neural networks for total nitrogen prediction. IEEE Trans. Ind. Inform. 2022, 18, 6516–6525. [Google Scholar] [CrossRef]
- Zhang, X.; Han, L.; Sobeih, T.; Lappin, L.; Lee, M.A.; Howard, A.; Kisdi, A. The self-supervised spectral–spatial vision transformer network for accurate prediction of wheat nitrogen status from UAV imagery. Remote Sens. 2022, 14, 1400. [Google Scholar] [CrossRef]
- Zhang, X.; Han, L.; Sobeih, T.; Lappin, L.; Lee, M.; Howard, A.; Kisdi, A. The self-supervised spectral-spatial attention-based transformer network for automated, accurate prediction of crop nitrogen status from UAV imagery. arXiv 2021, arXiv:2111.06839. [Google Scholar]
- Gupta, A.; Singh, A. Agri-gnn: A novel genotypic-topological graph neural network framework built on graphsage for optimized yield prediction. arXiv 2023, arXiv:2310.13037. [Google Scholar]
- da Silva, B.C.; de Mello Prado, R.; Baio, F.H.R.; Campos, C.N.S.; Teodoro, L.P.R.; Teodoro, P.E.; Santana, D.C.; Fernandes, T.F.S.; da Silva Junior, C.A.; de Souza Loureiro, E. New approach for predicting nitrogen and pigments in maize from hyperspectral data and machine learning models. Remote Sens. Appl. Soc. Environ. 2024, 33, 101110. [Google Scholar] [CrossRef]
- Ma, C.; Zhai, L.; Li, C.; Wang, Y. Hyperspectral estimation of nitrogen content in different leaf positions of wheat using machine learning models. Appl. Sci. 2022, 12, 7427. [Google Scholar] [CrossRef]
- Shu, M.; Zhu, J.; Yang, X.; Gu, X.; Li, B.; Ma, Y. A spectral decomposition method for estimating the leaf nitrogen status of maize by UAV-based hyperspectral imaging. Comput. Electron. Agric. 2023, 212, 108100. [Google Scholar] [CrossRef]
- Sun, Q.; Chen, L.; Gu, X.; Zhang, S.; Dai, M.; Zhou, J.; Gu, L.; Zhen, W. Estimation of canopy nitrogen nutrient status in lodging maize using unmanned aerial vehicles hyperspectral data. Ecol. Inform. 2023, 78, 102315. [Google Scholar] [CrossRef]
- Chen, B.; Lu, X.; Yu, S.; Gu, S.; Huang, G.; Guo, X.; Zhao, C. The application of machine learning models based on leaf spectral reflectance for estimating the nitrogen nutrient index in maize. Agriculture 2022, 12, 1839. [Google Scholar] [CrossRef]
- Cherkassky, V.; Ma, Y. Practical selection of SVM parameters and noise estimation for SVM regression. Neural Netw. 2004, 17, 113–126. [Google Scholar] [CrossRef]
- Zhang, Y.; Xia, C.; Zhang, X.; Cheng, X.; Feng, G.; Wang, Y.; Gao, Q. Estimating the maize biomass by crop height and narrowband vegetation indices derived from UAV-based hyperspectral images. Ecol. Indic. 2021, 129, 107985. [Google Scholar] [CrossRef]
- Belgiu, M.; Drăguţ, L. Random forest in remote sensing: A review of applications and future directions. ISPRS J. Photogramm. Remote Sens. 2016, 114, 24–31. [Google Scholar] [CrossRef]
- Yang, W.; Nigon, T.; Hao, Z.; Paiao, G.D.; Fernández, F.G.; Mulla, D.; Yang, C. Estimation of corn yield based on hyperspectral imagery and convolutional neural network. Comput. Electron. Agric. 2021, 184, 106092. [Google Scholar] [CrossRef]
- Zhao, R.; An, L.; Tang, W.; Qiao, L.; Wang, N.; Li, M.; Sun, H.; Liu, G. Improving chlorophyll content detection to suit maize dynamic growth effects by deep features of hyperspectral data. Field Crop. Res. 2023, 297, 108929. [Google Scholar] [CrossRef]
- Sun, L.; Yang, C.; Wang, J.; Cui, X.; Suo, X.; Fan, X.; Ji, P.; Gao, L.; Zhang, Y. Automatic Modeling Prediction Method of Nitrogen Content in Maize Leaves Based on Machine Vision and CNN. Agronomy 2024, 14, 124. [Google Scholar] [CrossRef]
- Zhao, X.; Wang, L.; Zhang, Y.; Han, X.; Deveci, M.; Parmar, M. A review of convolutional neural networks in computer vision. Artif. Intell. Rev. 2024, 57, 99. [Google Scholar] [CrossRef]
- Zhang, L.; An, D.; Wei, Y.; Liu, J.; Wu, J. Prediction of oil content in single maize kernel based on hyperspectral imaging and attention convolution neural network. Food Chem. 2022, 395, 133563. [Google Scholar] [CrossRef] [PubMed]
- Gallo, I.; Boschetti, M.; Rehman, A.U.; Candiani, G. Self-supervised convolutional neural network learning in a hybrid approach framework to estimate chlorophyll and nitrogen content of maize from hyperspectral images. Remote Sens. 2023, 15, 4765. [Google Scholar] [CrossRef]
- Das, S.; Tariq, A.; Santos, T.; Kantareddy, S.S.; Banerjee, I. Recurrent neural networks (RNNs): Architectures, training tricks, and introduction to influential research. Mach. Learn. Brain Disord. 2023, 197, 117–138. [Google Scholar]
- Toledo, C.A.; Crawford, M.; Vyn, T. Maize yield prediction based on multi-modality remote sensing and LSTM models in nitrogen management practice trials. In Proceedings of the 2022 12th Workshop on Hyperspectral Imaging and Signal Processing: Evolution in Remote Sensing (WHISPERS), Rome, Italy, 13–16 September 2022; pp. 1–7. [Google Scholar]
- Savitzky, A.; Golay, M.J. Smoothing and differentiation of data by simplified least squares procedures. Anal. Chem. 1964, 36, 1627–1639. [Google Scholar] [CrossRef]
- Kreutzer, J.S.; Caplan, B.; DeLuca, J. Encyclopedia of Clinical Neuropsychology; Springer: New York, NY, USA, 2011; Volume 28. [Google Scholar]
- Asesh, A. Normalization and bias in time series data. In Proceedings of the Conference on Multimedia, Interaction, Design and Innovation, Online, 9–10 December 2021; Springer: Cham, Switzerland, 2021; pp. 88–97. [Google Scholar]
- Shaw, P.; Uszkoreit, J.; Vaswani, A. Self-attention with relative position representations. arXiv 2018, arXiv:1803.02155. [Google Scholar]
- Kipf, T.N.; Welling, M. Semi-supervised classification with graph convolutional networks. arXiv 2016, arXiv:1609.02907. [Google Scholar]
- Hearst, M.A.; Dumais, S.T.; Osuna, E.; Platt, J.; Scholkopf, B. Support vector machines. IEEE Intell. Syst. Their Appl. 1998, 13, 18–28. [Google Scholar] [CrossRef]
- Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Online, 5 July 2016; pp. 770–778. [Google Scholar]
- Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Online, 20 December 2015; pp. 1–9. [Google Scholar]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16 × 16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Online, 4 August 2021; pp. 10012–10022. [Google Scholar]
Group | Treatment Code | Description and Fertilizer Rate (kg N/ha) |
---|---|---|
1 | N0 | No nitrogen (control); 0 kg N/ha |
2 | N1 | Recommended nitrogen application (N rate); 180 kg N/ha |
3 | N2 | High nitrogen application (150% of N1); 270 kg N/ha |
Model | RMSE | MAE | R2 |
---|---|---|---|
SVM | 0.67 | 0.76 | 0.84 |
RF | 0.61 | 0.73 | 0.86 |
ResNet | 0.58 | 0.69 | 0.87 |
GoogleNet | 0.53 | 0.65 | 0.88 |
Swin-transformer | 0.48 | 0.60 | 0.90 |
ViT | 0.42 | 0.54 | 0.88 |
Proposed method | 0.35 | 0.48 | 0.93 |
Growth Stage | RMSE | MAE | R2 |
---|---|---|---|
Jointing stage | 0.38 | 0.52 | 0.92 |
Tasseling stage | 0.36 | 0.49 | 0.95 |
Grain-filling stage | 0.33 | 0.45 | 0.96 |
Model | RMSE | MAE | R2 |
---|---|---|---|
Coordinate Attention | 0.54 | 0.66 | 0.74 |
Triplet Attention | 0.47 | 0.56 | 0.85 |
Proposed method | 0.35 | 0.48 | 0.93 |
Model | RMSE | MAE | |
---|---|---|---|
Full model (attention + GNN) | 0.35 | 0.48 | 0.93 |
Without GNN (only attention module) | 0.44 | 0.57 | 0.88 |
Attention + FC replacement for GNN | 0.41 | 0.54 | 0.89 |
Model | Params (M) | FLOPs (G) | Inference Time (ms) | Memory Usage (MB) |
---|---|---|---|---|
SVM | - | - | 1.4 | 52 |
RF | - | - | 1.6 | 63 |
ResNet | 23.5 | 4.1 | 8.9 | 430 |
ViT | 86.7 | 15.3 | 12.5 | 812 |
Proposed method | 37.2 | 7.8 | 9.4 | 598 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lu, F.; Zhang, B.; Hou, Y.; Xiong, X.; Dong, C.; Lu, W.; Li, L.; Lv, C. A Spatiotemporal Attention-Guided Graph Neural Network for Precise Hyperspectral Estimation of Corn Nitrogen Content. Agronomy 2025, 15, 1041. https://doi.org/10.3390/agronomy15051041
Lu F, Zhang B, Hou Y, Xiong X, Dong C, Lu W, Li L, Lv C. A Spatiotemporal Attention-Guided Graph Neural Network for Precise Hyperspectral Estimation of Corn Nitrogen Content. Agronomy. 2025; 15(5):1041. https://doi.org/10.3390/agronomy15051041
Chicago/Turabian StyleLu, Feiyu, Boming Zhang, Yifei Hou, Xiao Xiong, Chaoran Dong, Wenbo Lu, Liangxue Li, and Chunli Lv. 2025. "A Spatiotemporal Attention-Guided Graph Neural Network for Precise Hyperspectral Estimation of Corn Nitrogen Content" Agronomy 15, no. 5: 1041. https://doi.org/10.3390/agronomy15051041
APA StyleLu, F., Zhang, B., Hou, Y., Xiong, X., Dong, C., Lu, W., Li, L., & Lv, C. (2025). A Spatiotemporal Attention-Guided Graph Neural Network for Precise Hyperspectral Estimation of Corn Nitrogen Content. Agronomy, 15(5), 1041. https://doi.org/10.3390/agronomy15051041