# Multi-Path Attention Fusion Transformer for Spectral Learning in Corn Quality Assessment

**Authors:** Jialu Li, Haoyi Wang, Hongbo Zhang, Tongqiang Jiang

PMC · DOI: 10.3390/foods14213786 · 2025-11-04

## TL;DR

This paper introduces SpecTran, a new Transformer model that improves the prediction of corn quality traits using near-infrared spectra.

## Contribution

The novel contribution is SpecTran, a spectral Transformer with adaptive multi-scale patch embedding and hierarchical fusion for corn quality assessment.

## Key findings

- SpecTran achieved an average R2 score of 0.483 for predicting corn traits like moisture, starch, oil, and protein.
- It reduced RMSE by 11.2% for protein and 10.7% for oil compared to the best baseline model.
- The model effectively captures multi-scale spectral patterns and provides interpretable insights.

## 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 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.

## Full-text entities

- **Chemicals:** oil (MESH:D009821), starch (MESH:D013213)

## Figures

9 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12610532/full.md

---
Source: https://tomesphere.com/paper/PMC12610532