A Novel 2D-CNN Model Integrating 2D-Transformed NIR Spectra and Attention Mechanism With Transfer Learning: A Case in SSC Prediction of Pears

IF 2 4区 化学 Q1 SOCIAL WORK
Zhangwei Fan, Anyi Zhao, Jianyi Zhang, Xiaping Fu
{"title":"A Novel 2D-CNN Model Integrating 2D-Transformed NIR Spectra and Attention Mechanism With Transfer Learning: A Case in SSC Prediction of Pears","authors":"Zhangwei Fan,&nbsp;Anyi Zhao,&nbsp;Jianyi Zhang,&nbsp;Xiaping Fu","doi":"10.1002/cem.70158","DOIUrl":null,"url":null,"abstract":"<div>\n \n <p>Near-infrared (NIR) spectroscopy technology has been widely used in agriculture, food, pharmaceuticals, petrochemical, and other fields due to its advantages of high efficiency and nondestructiveness. However, it still faces challenges such as data distribution shifts caused by factors like different spectrometers and spectral acquisition environments. In this study, we propose a GASp2DCNN model that integrates the Gramian Angular Summation Field (GASF) and the adaptive star block (ASB) to address the performance degradation of models when spectrometers or environments change. Firstly, the spectrum is transformed to two-dimensional data after piecewise aggregation approximation (PAA), polar coordinate transformation, and GASF to capture correlation features with 2D convolution. Then, an ASB module integrating star operation and channel attention mechanism is designed to enhance the model's ability to capture spectral local correlations. Finally, a feature-vector based transfer learning (FBTL) method is proposed, which dynamically weights the feature vectors of the source and target domains through an attention mechanism to enhance cross-domain adaptation. The results on a pear dataset indicate that the GASp2DCNN improves <i>R</i><sup>2</sup> by 5.2% to 24.4% compared to machine learning models (PLSR, SVR) and 1D-CNN models. In transfer learning experiments, the proposed FBTL method improved <i>R</i><sup>2</sup> by 4% to 12% compared to global fine-tuning and head-freezing fine-tuning methods and outperformed domain-adversarial neural networks (DANN) and maximum classifier discrepancy (MCD) by 4% to 9% across all transfer scenarios. Stable transfer effects are achieved when the target domain sample size reaches 40% of the total, reducing reliance on target samples. This also provides an interpretable and highly robust solution for fruit quality detection.</p>\n </div>","PeriodicalId":15274,"journal":{"name":"Journal of Chemometrics","volume":"40 7","pages":""},"PeriodicalIF":2.0000,"publicationDate":"2026-06-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Chemometrics","FirstCategoryId":"92","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/cem.70158","RegionNum":4,"RegionCategory":"化学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"SOCIAL WORK","Score":null,"Total":0}
引用次数: 0

Abstract

Near-infrared (NIR) spectroscopy technology has been widely used in agriculture, food, pharmaceuticals, petrochemical, and other fields due to its advantages of high efficiency and nondestructiveness. However, it still faces challenges such as data distribution shifts caused by factors like different spectrometers and spectral acquisition environments. In this study, we propose a GASp2DCNN model that integrates the Gramian Angular Summation Field (GASF) and the adaptive star block (ASB) to address the performance degradation of models when spectrometers or environments change. Firstly, the spectrum is transformed to two-dimensional data after piecewise aggregation approximation (PAA), polar coordinate transformation, and GASF to capture correlation features with 2D convolution. Then, an ASB module integrating star operation and channel attention mechanism is designed to enhance the model's ability to capture spectral local correlations. Finally, a feature-vector based transfer learning (FBTL) method is proposed, which dynamically weights the feature vectors of the source and target domains through an attention mechanism to enhance cross-domain adaptation. The results on a pear dataset indicate that the GASp2DCNN improves R2 by 5.2% to 24.4% compared to machine learning models (PLSR, SVR) and 1D-CNN models. In transfer learning experiments, the proposed FBTL method improved R2 by 4% to 12% compared to global fine-tuning and head-freezing fine-tuning methods and outperformed domain-adversarial neural networks (DANN) and maximum classifier discrepancy (MCD) by 4% to 9% across all transfer scenarios. Stable transfer effects are achieved when the target domain sample size reaches 40% of the total, reducing reliance on target samples. This also provides an interpretable and highly robust solution for fruit quality detection.

结合二维变换近红外光谱、注意机制和迁移学习的二维cnn模型——以梨的SSC预测为例
近红外(NIR)光谱技术以其高效、无损的优点在农业、食品、医药、石油化工等领域得到了广泛的应用。然而,由于不同的光谱仪和光谱采集环境等因素导致的数据分布偏移等问题仍然面临着挑战。在这项研究中,我们提出了一个GASp2DCNN模型,该模型集成了格拉曼角求和场(GASF)和自适应星形块(ASB),以解决光谱仪或环境变化时模型性能下降的问题。首先,将光谱经过分段聚集近似(PAA)、极坐标变换、GASF变换后转化为二维数据,利用二维卷积捕捉相关特征;在此基础上,设计了星操作与信道注意机制相结合的ASB模块,增强了模型捕捉光谱局部相关性的能力。最后,提出了一种基于特征向量的迁移学习(FBTL)方法,该方法通过注意机制对源域和目标域的特征向量进行动态加权,增强跨域自适应能力。在梨数据集上的结果表明,与机器学习模型(PLSR, SVR)和1D-CNN模型相比,GASp2DCNN将R2提高了5.2%至24.4%。在迁移学习实验中,与全局微调和头部冻结微调方法相比,所提出的FBTL方法将R2提高了4%至12%,并且在所有迁移场景中优于域对抗神经网络(DANN)和最大分类器差异(MCD) 4%至9%。当目标域样本量达到总样本量的40%时,实现了稳定的转移效果,减少了对目标样本的依赖。这也为水果质量检测提供了一种可解释和高度稳健的解决方案。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Chemometrics
Journal of Chemometrics 化学-分析化学
CiteScore
5.20
自引率
8.30%
发文量
78
审稿时长
2 months
期刊介绍: The Journal of Chemometrics is devoted to the rapid publication of original scientific papers, reviews and short communications on fundamental and applied aspects of chemometrics. It also provides a forum for the exchange of information on meetings and other news relevant to the growing community of scientists who are interested in chemometrics and its applications. Short, critical review papers are a particularly important feature of the journal, in view of the multidisciplinary readership at which it is aimed.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书