Multi-Path Attention Fusion Transformer for Spectral Learning in Corn Quality Assessment
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 R2 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.
Authors
- Hao‐Yi Wang (ORCID: https://orcid.org/0000-0003-4882-3578)
- Tongqiang Jiang (ORCID: https://orcid.org/0000-0001-6544-548X)
- Jialu Li (ORCID: https://orcid.org/0000-0003-0092-8071)
- HongBo Zhang (ORCID: https://orcid.org/0009-0000-4655-594X)
Institutions
- Beijing Wuzi University (CN)
- Beijing Technology and Business University (CN)
- Beijing Academy of Artificial Intelligence (CN)
Publication Details
- Journal
- Foods
- Published
- 2025-11-04
- DOI
- https://doi.org/10.3390/foods14213786
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 0.00