تصنيف بذور اللوبين إلى فئات حلوة ومرّة باستخدام التحليل الطيفي VIS-NIR والتعلم الآلي Classification of Lupinus seeds into sweet and bitter categories using VIS–NIR spectroscopy and machine learning

شارك:
المجلة: Frontiers in Artificial Intelligence، المجلد: 9
DOI: https://doi.org/10.3389/frai.2026.1745720
PMID: https://pubmed.ncbi.nlm.nih.gov/41837243
تاريخ النشر: 2026-02-27
المؤلف: Josefa Díaz-Álvarez وآخرون
الموضوع الرئيسي: الطيفية والتحليلات الكيميائية

نظرة عامة

تستكشف هذه الدراسة طريقة غير مدمرة لتصنيف بذور اللوبين الحلوة والمرّة باستخدام مطيافية الأشعة المرئية والقريبة من تحت الحمراء (VIS-NIR) مع تقنيات التعلم الآلي. غالبًا ما تكون الطرق التقليدية للتعرف مدمرة، مما يدفع لاستكشاف خوارزميات التعلم الآلي على مجموعتين من البيانات (الانعكاس والامتصاص) المستمدة من طيف VIS-NIR. تم تقييم خمسة خوارزميات تعلم آلي، حيث حققت الانحدار اللوجستي (LGR) وتصنيف الدعم المتجه (SVC) أداء تصنيف عالي بنسبة 92.5% و92.0% على بيانات الانعكاس، بينما حقق SVC وغابة عشوائية (RF) 93.2% و92.5% على بيانات الامتصاص، على التوالي. كما أبرزت الدراسة فعالية التحولات الهجينة وطرق إعادة أخذ العينات في معالجة عدم توازن الفئات وتحسين دقة النموذج.

تؤكد النتائج جدوى استخدام نماذج التعلم الآلي كنهج غير مدمر للتمييز بين أنواع اللوبين الحلوة والمرّة بناءً على بيانات الطيف VIS-NIR. تشير النتائج إلى أن LGR وRF وSVC هي خوارزميات قوية، تحقق باستمرار دقة تصنيف تزيد عن 90%. تدعم تحليلات التمايز الطيفي موثوقية الطريقة، كاشفة عن أنماط قابلة للتكرار عبر طيف VIS-NIR. ومع ذلك، يحذر المؤلفون من أن هذه النتائج يجب أن تُفسر بحذر حتى يتم إجراء مزيد من التحقق مع مجموعة بيانات أكثر توازنًا. تشمل اتجاهات البحث المستقبلية تعزيز توازن مجموعة البيانات واستكشاف استراتيجيات اختيار الطول الموجي لتبسيط تنفيذ النموذج في التطبيقات العملية.

مقدمة

تناقش مقدمة ورقة البحث أهمية اللوبين (جنس اللوبينوس) كنوع من البقوليات مع أكثر من 200 نوع، مزروعة منذ العصور القديمة لقيمتها الغذائية وقدرتها على تحسين جودة التربة من خلال تثبيت النيتروجين. يُعزى الاهتمام المتزايد باللوبين، خاصة في النصف الثاني من القرن العشرين، إلى محتواها العالي من البروتين (36%-42%)، وفوائدها الصحية، وإمكاناتها الزراعية المستدامة. من الجدير بالذكر أن بذور اللوبين تحتوي على مركبات نشطة حيويًا ذات خصائص مضادة للأكسدة ومضادة للالتهابات، على الرغم من أن وجود القلويات السامة يشكل مخاطر صحية، مما يستلزم تصنيفًا دقيقًا إلى أنواع حلوة ومرّة.

تهدف الدراسة إلى استخدام مطيافية الأشعة المرئية والقريبة من تحت الحمراء (VIS-NIR) مع خوارزميات التعلم الآلي لتصنيف مادة اللوبين كحلوة أو مرّة، مما يوفر بديلاً سريعًا وغير مدمر لطرق تقدير القلويات التقليدية. تبرز الورقة التطبيق المتزايد للتعلم الآلي في الزراعة الدقيقة، خاصة في سياق أبحاث اللوبين، التي شهدت زيادة في المنشورات التي تتناول جوانب مختلفة، بما في ذلك اكتشاف الأنواع الغازية وتوصيف القلويات. تُوضع هذه الدراسة ضمن هذا الاتجاه، مع التركيز على الاستخدام المبتكر للبيانات الطيفية من سبعة أنواع مختلفة من اللوبين لتعزيز دقة التصنيف والمساهمة في الفهم الأوسع لأنواع اللوبين.

طرق

تحدد قسم “الطرق” منهجية البحث والبيانات المستخدمة لتحقيق أهداف الدراسة، كما هو موضح في الشكل 2. وهي منظمة في ثلاثة أقسام رئيسية: (i) مادة النبات واكتساب البيانات، (ii) تقنيات المعالجة المسبقة بما في ذلك التحولات الطيفية وطرق إعادة أخذ العينات لمعالجة عدم توازن الفئات، و(iii) تقنيات التعلم الآلي التي تم تقييمها في الدراسة.

ركزت الدراسة على سبعة أنواع من اللوبين السنوي، بما في ذلك ثلاثة أصناف مزروعة على نطاق واسع—لوبينوس ألبوس L. (لوبين أبيض)، لوبينوس أنغستيفوليوس L. (لوبين أزرق)، ولوبينوس لوتيوس L. (لوبين أصفر)—بالإضافة إلى أربعة أنواع برية. تم الحصول على البذور من بنك الجينات CICYTEX، حيث تم الحفاظ عليها تحت ظروف حرارة ورطوبة مسيطر عليها. قبل التحليل، تم تكييف البذور مع درجة حرارة الغرفة لضمان محتوى رطوبة موحد لقياسات الطيف.

شمل الإطار التجريبي تطوير نماذج التعلم الآلي للتمييز بين أنواع اللوبين الحلوة والمرّة باستخدام طيف الانعكاس والامتصاص VIS-NIR. تم تقييم خمسة خوارزميات تعلم آلي، مع تحليل البيانات الطيفية في شكلها الخام وبعد تطبيق تحولات طيفية مختلفة. لإدارة عدم توازن الفئات، تم استخدام خمس طرق لإعادة أخذ العينات. تم تقييم فعالية هذه الطرق والتحولات باستخدام مقاييس F1-score وAUC-ROC، والتي تناسب مجموعات البيانات غير المتوازنة. يتم تعريف F1-score على أنه \( F1 = \frac{2 \times (\text{الدقة} \times \text{الاسترجاع})}{\text{الدقة} + \text{الاسترجاع}} \)، بينما تقيس AUC-ROC قدرة النموذج التمييزية في سياقات التصنيف الثنائي. تم تقديم أوصاف مفصلة لطرق إعادة أخذ العينات وتأثيرها على عدم توازن الفئات في الجدول 1.

نتائج

يقدم قسم النتائج تحليلًا شاملاً لبيانات الانعكاس والامتصاص VIS-NIR، مع التركيز على أداء مختلف المصنفات التي تم تقييمها من خلال مقاييس F1-score وAUC-ROC. بالنسبة لبيانات الانعكاس، أدت التحولات الهجينة، وخاصة SNV+1D (2-3-3) وSNV+1D (2-7-7)، إلى تحقيق أعلى درجات F1، حيث حقق الانحدار اللوجستي (LGR) أفضل درجة إجمالية بنسبة 92.5% باستخدام SMOTE-Tomek. كما أظهرت غابة عشوائية (RF) وتصنيف الدعم المتجه (SVC) أداءً قويًا عبر التحولات، بينما أظهرت الشبكة العصبية متعددة الطبقات (MLP) والمنحدر الشجري (DTR) أدنى الدرجات، على الرغم من أن كلاهما تحسن مع التقنيات الهجينة. أكدت تحليل AUC-ROC فعالية LGR، خاصة مع طرق إعادة أخذ العينات المذكورة أعلاه.

في تحليل الامتصاص، كانت النتائج مشابهة لتلك الخاصة بالانعكاس، حيث أدت التحولات الهجينة مرة أخرى إلى تحسين الأداء. ظهرت RF وSVC كأفضل المصنفات، حيث حقق SVC أعلى درجة F1 بنسبة 93.2% باستخدام SVM-SMOTE. حافظ LGR على أداء تنافسي، يتراوح بين 86.7% إلى 90.4% عبر طرق إعادة أخذ العينات المختلفة، على الرغم من أنه لم يتطابق مع درجات RF وSVC. استمرت MLP وDTR في الأداء الضعيف، حيث سجلت DTR أدنى الدرجات. بشكل عام، تؤكد النتائج فعالية تقنيات التحول الهجينة في تعزيز أداء المصنفين لكل من بيانات الانعكاس والامتصاص في التمييز بين بذور اللوبين الحلوة والمرّة.

مناقشة

في هذا القسم، تناقش الدراسة تصنيف أنواع اللوبين إلى فئات حلوة (محتوى قلوي منخفض) ومرّة (محتوى قلوي مرتفع) استنادًا إلى بيانات من بنك الجينات CICYTEX. تُعرف البذور الحلوة بأنها تحتوي على إجمالي محتوى القلويات الكينوليزيدينية (QA) أقل من 0.02%-0.05% على أساس الوزن الجاف، وهو حد تم تحديده من خلال تقنيات التحليل الكمي مثل الكروماتوغرافيا الغازية-مطيافية الكتلة (GC-MS) والكروماتوغرافيا السائلة-مطيافية الكتلة (LC-MS). التصنيف أمر حاسم للحفاظ على الجينات والتربية، حيث يعمل التمييز بين الحلو والمر كموصوف وظيفي في جنس اللوبينوس. تستخدم الدراسة مطيافية VIS-NIR مع تقنيات التعلم الآلي (ML) لتصنيف هذه البذور بشكل غير مدمر، مستفيدة من سجلات التصنيف الحالية دون الحاجة إلى تحليلات كيميائية إضافية.

تشمل المنهجية اكتساب بيانات طيفية غير مدمرة باستخدام مقياس الطيف FieldSpec 3، حيث يتم التقاط نطاق من 350-2,500 نانومتر مع 2,151 متغير طيفي. تؤكد الدراسة على أهمية المعالجة المسبقة الطيفية لتقليل الضوضاء وتعزيز جودة البيانات، باستخدام تقنيات مثل المتغيرات الطبيعية القياسية (SNV) وترشيح سافيتسكي-غولاي. يتم معالجة عدم توازن الفئات في مجموعة البيانات، مع نسبة عدم توازن (IR) تبلغ 10.77، من خلال طرق إعادة أخذ العينات المختلفة لتحسين أداء نموذج التعلم الآلي. تم تقييم خمس خوارزميات إشرافية—الانحدار اللوجستي، الشبكة العصبية متعددة الطبقات، آلة الدعم المتجه، الغابة العشوائية، وشجرة القرار—لقدرتها على تصنيف البذور. تشير النتائج إلى أن هناك اختلافات طيفية منهجية بين البذور الحلوة والمرّة، مع مساهمة مناطق طيفية محددة في التصنيف، مما يعزز نهج الدراسة في استخدام الإشارات الطيفية الجوهرية للتمييز الفعال.

Journal: Frontiers in Artificial Intelligence, Volume: 9
DOI: https://doi.org/10.3389/frai.2026.1745720
PMID: https://pubmed.ncbi.nlm.nih.gov/41837243
Publication Date: 2026-02-27
Author(s): Josefa Díaz-Álvarez et al.
Primary Topic: Spectroscopy and Chemometric Analyses

Overview

This study investigates a non-destructive method for classifying sweet and bitter Lupinus seeds using visible-near infrared (VIS-NIR) spectroscopy combined with machine learning techniques. Traditional methods of identification are often destructive, prompting the exploration of machine learning algorithms on two datasets (reflectance and absorbance) derived from VIS-NIR spectra. Five machine learning algorithms were evaluated, with logistic regression (LGR) and support vector classification (SVC) achieving high classification performance of 92.5% and 92.0% on reflectance data, and SVC and random forest (RF) reaching 93.2% and 92.5% on absorbance data, respectively. The study also highlighted the effectiveness of hybrid transformations and resampling methods in addressing class imbalance and improving model accuracy.

The findings confirm the viability of using machine learning models as a non-destructive approach for distinguishing between sweet and bitter Lupinus ecotypes based on VIS-NIR spectral data. The results indicate that LGR, RF, and SVC are robust algorithms, consistently achieving over 90% classification accuracy. The spectral differentiation analyses further support the reliability of the method, revealing reproducible patterns across the VIS-NIR spectrum. However, the authors caution that these results should be interpreted with care until further validation with a more balanced dataset is conducted. Future research directions include enhancing dataset balance and exploring wavelength selection strategies to streamline model implementation in practical applications.

Introduction

The introduction of the research paper discusses the significance of lupins (genus Lupinus) as a legume with over 200 species, cultivated since ancient times for their nutritional value and ability to enhance soil quality through nitrogen fixation. The growing interest in lupins, particularly in the latter half of the 20th century, is attributed to their high protein content (36%-42%), health benefits, and sustainable agricultural potential. Notably, lupin seeds contain bioactive compounds with antioxidant and anti-inflammatory properties, although the presence of toxic alkaloids poses health risks, necessitating careful classification into sweet and bitter varieties.

The research aims to utilize visible-near infrared (VIS-NIR) spectroscopy combined with machine learning algorithms to classify lupin material as sweet or bitter, offering a rapid and non-destructive alternative to traditional alkaloid quantification methods. The paper highlights the increasing application of machine learning in precision agriculture, particularly in the context of lupin research, which has seen a rise in publications addressing various aspects, including the detection of invasive species and alkaloid profiling. This study is positioned within this trend, focusing on the innovative use of spectral data from seven different lupin species to enhance classification accuracy and contribute to the broader understanding of lupin varieties.

Methods

The “Methods” section outlines the research methodology and data utilized to achieve the study’s objectives, as illustrated in Figure 2. It is structured into three main subsections: (i) plant material and data acquisition, (ii) preprocessing techniques including spectral transformations and resampling methods to address class imbalance, and (iii) machine learning techniques assessed in the study.

The study focused on seven annual lupin species, including three widely cultivated varieties—Lupinus albus L. (white lupin), Lupinus angustifolius L. (blue lupin), and Lupinus luteus L. (yellow lupin)—alongside four wild species. Seeds were sourced from the CICYTEX Germplasm Bank, where they were conserved under controlled temperature and humidity conditions. Prior to analysis, seeds were acclimatized to room temperature to ensure uniform moisture content for spectral measurements.

The experimental framework involved the development of machine learning models to differentiate between sweet and bitter lupin ecotypes using VIS-NIR reflectance and absorbance spectra. Five machine learning algorithms were evaluated, with spectral data analyzed in both raw form and after applying various spectral transformations. To manage class imbalance, five resampling methods were employed. The effectiveness of these methods and transformations was assessed using F1-score and AUC-ROC metrics, which are suitable for imbalanced datasets. The F1-score is defined as \( F1 = \frac{2 \times (\text{precision} \times \text{recall})}{\text{precision} + \text{recall}} \), while AUC-ROC measures the model’s discriminative ability in binary classification contexts. Detailed descriptions of the resampling methods and their impact on class imbalance are provided in Table 1.

Results

The results section presents a comprehensive analysis of VIS-NIR reflectance and absorbance data, focusing on the performance of various classifiers evaluated through F1-score and AUC-ROC metrics. For reflectance data, hybrid transformations, particularly SNV+1D (2-3-3) and SNV+1D (2-7-7), yielded the highest F1-scores, with Logistic Regression (LGR) achieving the best overall score of 92.5% using SMOTE-Tomek. Random Forest (RF) and Support Vector Classifier (SVC) also demonstrated strong performance across transformations, while Multi-Layer Perceptron (MLP) and Decision Tree Regressor (DTR) exhibited the lowest scores, although both improved with hybrid techniques. The AUC-ROC analysis further confirmed LGR’s effectiveness, particularly with the aforementioned resampling methods.

In the absorbance analysis, results mirrored those of reflectance, with hybrid transformations again leading to performance enhancements. RF and SVC emerged as the top classifiers, with SVC achieving the highest F1-score of 93.2% using SVM-SMOTE. LGR maintained competitive performance, ranging from 86.7% to 90.4% across different resampling methods, though it did not match the scores of RF and SVC. MLP and DTR continued to underperform, with DTR recording the lowest scores. Overall, the findings underscore the efficacy of hybrid transformation techniques in enhancing classifier performance for both reflectance and absorbance data in discriminating between sweet and bitter Lupinus seeds.

Discussion

In this section, the research discusses the classification of Lupinus accessions into sweet (low alkaloid content) and bitter (high alkaloid content) categories based on data from the CICYTEX Germplasm Bank. Sweet seeds are defined as having a total quinolizidine alkaloid (QA) content below 0.02%-0.05% on a dry weight basis, a threshold established through quantitative analytical techniques such as gas chromatography-mass spectrometry (GC-MS) and liquid chromatography-mass spectrometry (LC-MS). The classification is critical for germplasm conservation and breeding, with the sweet/bitter distinction serving as a functional descriptor in the genus Lupinus. The study employs VIS-NIR spectroscopy combined with machine learning (ML) techniques to non-destructively classify these seeds, utilizing existing classification records without additional chemical analyses.

The methodology includes non-destructive spectral data acquisition using a FieldSpec 3 spectroradiometer, capturing a range of 350-2,500 nm with 2,151 spectral variables. The study emphasizes the importance of spectral preprocessing to mitigate noise and enhance data quality, employing techniques such as standard normal variate (SNV) and Savitzky-Golay filtering. Class imbalance in the dataset, with an imbalance ratio (IR) of 10.77, is addressed through various resampling methods to improve ML model performance. Five supervised algorithms—logistic regression, multilayer perceptron, support vector machine, random forest, and decision tree—are evaluated for their ability to classify the seeds. The results indicate that systematic spectral differences exist between sweet and bitter seeds, with specific spectral regions contributing to the classification, thereby reinforcing the study’s approach to utilizing intrinsic spectral signals for effective discrimination.