Multi-Path Attention Fusion Transformer for Spectral Learning in Corn Quality Assessment
Open Access
Abstract
Accurately modeling the nonlinear relationships between near-infrared (NIR) spectral signatures and biochemical traits in corn remains a major challenge. A key difficulty lies in capturing multi-scale contextual dependencies—ranging from local absorption peaks to global spectral patterns—that jointly determine quality constituents such as protein and oil. To address this, we propose SpecTran, a spectral Transformer network specifically designed for NIR regression. SpecTran integrates three key components: adaptive multi-scale patch embedding which extracts spectral features at multiple resolutions to capture both fine and coarse patterns, spectral-enhanced positional encoding which preserves wavelength order information more effectively than standard encoding, and hierarchical feature fusion for robust multi-task prediction. Evaluated on the public Eigenvector corn dataset, SpecTran had a performance across four key traits—moisture, starch, oil, and protein—with an average of 0.483. It reduced the RMSE by 11.2% for protein and 10.7% for oil compared to the best-performing baseline, which is the standard Transformer model. These results demonstrate SpecTran’s superior ability to model complex spectral dynamics while providing interpretable insights, offering a reliable framework for NIR-based agricultural quality assessment.
Keywords
Funding Information
- National Key Research and Development Program of China (2019YFC1606401)
- National Natural Science Foundation of China (62433002)
- National Natural Science Foundation of China (62476014)
- Project of Construction and Support for High-Level Innovative Teams of Beijing Municipal Institutions (BPHR20220104)
- Beijing Scholars Program (099)
This publication has 7 references indexed in Scilit:
- Principles, Applications, and Future Evolution of Agricultural Nondestructive Testing Based on MicrowavesSensors, 2025
- Assessment of Peanut Protein Powder Quality by Near-Infrared Spectroscopy and Generalized Regression Neural Network-Based ApproachFoods, 2024
- Attention Is All You NeedarXiv, 2023
- Multisource Data Reconstruction-Based Deep Unsupervised Hashing for Unisource Remote Sensing Image RetrievalIEEE Transactions on Geoscience and Remote Sensing, 2022
- Identification of informative spectral ranges for predicting major chemical constituents in corn using NIR spectroscopyFood Chemistry, 2022
- Rapid-Detection Sensor for Rice Grain Moisture Based on NIR SpectroscopyApplied Sciences, 2019
- Partial least-squares regression: a tutorialAnalytica Chimica Acta, 1986