Ting Wu , Longhui Zhu , Lei Li , Leian Liu , Weidong Bai , Li Lin , Ling Yang
{"title":"SHAPAttention: A novel approach to enhance model performance and interpretability in agricultural spectral data analysis","authors":"Ting Wu , Longhui Zhu , Lei Li , Leian Liu , Weidong Bai , Li Lin , Ling Yang","doi":"10.1016/j.compag.2025.110445","DOIUrl":null,"url":null,"abstract":"<div><div>This paper proposes an innovative deep learning method, SHAPAttention, aiming to enhance the performance and interpretability of models in spectral analysis. This method utilizes SHAP (SHapley Additive explanation) values as a dynamic attention mechanism to accurately capture the contributions of spectral features to the model output. The performance of SHAPAttention was evaluated on three different spectral datasets: near infrared, Raman, and hyperspectral band data. The results show that compared with the standard one-dimensional convolutional neural network, the determination coefficients of the predictions for the three datasets increased from 0.83, 0.81, and 0.59 to 0.87, 0.85, and 0.65 respectively. The ratio of performance to deviation values increased from 2.42, 2.40, and 1.57 to 2.88, 2.78, and 1.71 respectively. Compared with attention mechanisms (such as self_attention and squeeze-and-excitation attention), SHAPAttention improves the prediction performance of the model. The algorithm has a certain anti-interference ability against noise. In addition, this method also provides a dynamic feature importance analysis, enhancing the interpretability of the model. The research indicates that SHAPAttention has great potential in improving the performance and transparency of spectral analysis models, providing new ideas for precise detection and decision making in the agricultural field.</div></div>","PeriodicalId":50627,"journal":{"name":"Computers and Electronics in Agriculture","volume":"236 ","pages":"Article 110445"},"PeriodicalIF":7.7000,"publicationDate":"2025-04-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computers and Electronics in Agriculture","FirstCategoryId":"97","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0168169925005514","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURE, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 0
Abstract
This paper proposes an innovative deep learning method, SHAPAttention, aiming to enhance the performance and interpretability of models in spectral analysis. This method utilizes SHAP (SHapley Additive explanation) values as a dynamic attention mechanism to accurately capture the contributions of spectral features to the model output. The performance of SHAPAttention was evaluated on three different spectral datasets: near infrared, Raman, and hyperspectral band data. The results show that compared with the standard one-dimensional convolutional neural network, the determination coefficients of the predictions for the three datasets increased from 0.83, 0.81, and 0.59 to 0.87, 0.85, and 0.65 respectively. The ratio of performance to deviation values increased from 2.42, 2.40, and 1.57 to 2.88, 2.78, and 1.71 respectively. Compared with attention mechanisms (such as self_attention and squeeze-and-excitation attention), SHAPAttention improves the prediction performance of the model. The algorithm has a certain anti-interference ability against noise. In addition, this method also provides a dynamic feature importance analysis, enhancing the interpretability of the model. The research indicates that SHAPAttention has great potential in improving the performance and transparency of spectral analysis models, providing new ideas for precise detection and decision making in the agricultural field.
期刊介绍:
Computers and Electronics in Agriculture provides international coverage of advancements in computer hardware, software, electronic instrumentation, and control systems applied to agricultural challenges. Encompassing agronomy, horticulture, forestry, aquaculture, and animal farming, the journal publishes original papers, reviews, and applications notes. It explores the use of computers and electronics in plant or animal agricultural production, covering topics like agricultural soils, water, pests, controlled environments, and waste. The scope extends to on-farm post-harvest operations and relevant technologies, including artificial intelligence, sensors, machine vision, robotics, networking, and simulation modeling. Its companion journal, Smart Agricultural Technology, continues the focus on smart applications in production agriculture.