Shiwei Chen , Chaoxian Liu , Shan Zeng , Chengyu Zhang , Weiqiang Yang , Wei Tao , Zhiguang Yang
{"title":"Task-driven and interpretable hyperspectral band selection via deep sequential modeling: A case study on apple bruise detection","authors":"Shiwei Chen , Chaoxian Liu , Shan Zeng , Chengyu Zhang , Weiqiang Yang , Wei Tao , Zhiguang Yang","doi":"10.1016/j.foodcont.2025.111740","DOIUrl":null,"url":null,"abstract":"<div><div>Hyperspectral imaging (HSI) has emerged as a powerful non-destructive sensing technology for detailed quality assessment of agricultural and food products. However, the high dimensionality, redundancy, and nonlinear inter-band dependencies inherent in HSI data present major challenges for model efficiency, robustness, and interpretability. Traditional band selection methods often rely on linear assumptions, neglect inter-band dependencies, fail to model hierarchical spectral features, and lack task-specific adaptability, thereby limiting their practical utility. To overcome these limitations, this study proposes a dual-phase spectral sequence modeling framework, inspired by natural language processing, where hyperspectral bands are treated as a wavelength-ordered sequence. The first phase employs Long Short-Term Memory (LSTM) networks to extract local spectral dynamics by explicitly modeling short-range band-to-band interactions. The second phase leverages Transformer-based self-attention mechanisms to globally optimize band selection by capturing long-range spectral dependencies and assigning task-adaptive weights. This hierarchical design bridges local physical coherence and global contextual relevance, while an attention-guided sparsity constraint enhances interpretability. Taking early-stage apple bruise detection as a representative application, the proposed method achieves state-of-the-art performance, with a precision of 98.43 %, recall of 98.29 %, and F1-score of 0.98, using a compact set of physically meaningful bands. These bands correspond to absorption features associated with moisture variation and cellular damage. The results demonstrate that LSTM's local sequential modeling and Transformer's global dependency discovery are mutually necessary. This work advances HSI-based quality inspection by unifying structural priors, task-driven learning, and interpretable band selection for real-world deployment.</div></div>","PeriodicalId":319,"journal":{"name":"Food Control","volume":"181 ","pages":"Article 111740"},"PeriodicalIF":6.3000,"publicationDate":"2025-09-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Food Control","FirstCategoryId":"97","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0956713525006097","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"FOOD SCIENCE & TECHNOLOGY","Score":null,"Total":0}
引用次数: 0
Abstract
Hyperspectral imaging (HSI) has emerged as a powerful non-destructive sensing technology for detailed quality assessment of agricultural and food products. However, the high dimensionality, redundancy, and nonlinear inter-band dependencies inherent in HSI data present major challenges for model efficiency, robustness, and interpretability. Traditional band selection methods often rely on linear assumptions, neglect inter-band dependencies, fail to model hierarchical spectral features, and lack task-specific adaptability, thereby limiting their practical utility. To overcome these limitations, this study proposes a dual-phase spectral sequence modeling framework, inspired by natural language processing, where hyperspectral bands are treated as a wavelength-ordered sequence. The first phase employs Long Short-Term Memory (LSTM) networks to extract local spectral dynamics by explicitly modeling short-range band-to-band interactions. The second phase leverages Transformer-based self-attention mechanisms to globally optimize band selection by capturing long-range spectral dependencies and assigning task-adaptive weights. This hierarchical design bridges local physical coherence and global contextual relevance, while an attention-guided sparsity constraint enhances interpretability. Taking early-stage apple bruise detection as a representative application, the proposed method achieves state-of-the-art performance, with a precision of 98.43 %, recall of 98.29 %, and F1-score of 0.98, using a compact set of physically meaningful bands. These bands correspond to absorption features associated with moisture variation and cellular damage. The results demonstrate that LSTM's local sequential modeling and Transformer's global dependency discovery are mutually necessary. This work advances HSI-based quality inspection by unifying structural priors, task-driven learning, and interpretable band selection for real-world deployment.
期刊介绍:
Food Control is an international journal that provides essential information for those involved in food safety and process control.
Food Control covers the below areas that relate to food process control or to food safety of human foods:
• Microbial food safety and antimicrobial systems
• Mycotoxins
• Hazard analysis, HACCP and food safety objectives
• Risk assessment, including microbial and chemical hazards
• Quality assurance
• Good manufacturing practices
• Food process systems design and control
• Food Packaging technology and materials in contact with foods
• Rapid methods of analysis and detection, including sensor technology
• Codes of practice, legislation and international harmonization
• Consumer issues
• Education, training and research needs.
The scope of Food Control is comprehensive and includes original research papers, authoritative reviews, short communications, comment articles that report on new developments in food control, and position papers.