A Concentration-Invariant FTIR Chemometric Workflow with Peak-Sparse Representation and Machine-Learning Classification | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article A Concentration-Invariant FTIR Chemometric Workflow with Peak-Sparse Representation and Machine-Learning Classification Otabek Atabaev, Moulay Rachid Babaa, Shakhzodbek Samandarov, Asadbek Tajimuratov This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8310607/v1 This work is licensed under a CC BY 4.0 License Status: Published Journal Publication published 03 Apr, 2026 Read the published version in Chemical Papers → Version 1 posted 8 You are reading this latest preprint version Abstract Fourier-transform infrared (FTIR) spectroscopy is a widely utilized analytical technique for qualitative identification in chemical, environmental, and industrial contexts. Variability in sample concentration and operator-dependent preprocessing can compromise the reproducibility of chemometric workflows. This research presents a concentration-invariant FTIR preprocessing and classification framework that incorporates Savitzky–Golay smoothing, asymmetric least-squares baseline correction, area normalization, and a percentile-based peak-sparse representation. Principal component analysis (PCA) is applied to the sparse spectra to generate a compact vibrational feature space, which is then used to train four supervised classifiers: PLS-DA, Random Forest, XGBoost, and Support Vector Machines. With a library of 89 pure organic compounds measured at four concentration levels, all models achieve macro-F1 scores between 0.97 and 1.00 under replicate-stratified evaluation, indicating strong robustness to concentration-driven spectral variation. The workflow is implemented in a lightweight Python/PyQt5 tool that enables real-time prediction and supports deployment in analytical laboratories and industrial quality-control settings. This study offers a transparent and reproducible chemometric framework that may serve as a basis for future extensions to complex mixtures and real-world sample matrices. FTIR spectroscopy Chemometric preprocessing Peak-sparse features PCA Machine learning classification Concentration invariance Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 1. Introduction Fourier-transform infrared (FTIR) spectroscopy is a cornerstone of molecular characterization and quality control in chemistry, materials science, and process engineering, providing rich vibrational “fingerprints” of functional groups and molecular environments [1, 2]. However, raw FTIR spectra often exhibit baseline drift, overlapping bands and strong concentration-dependent absorbance variation, making manual interpretation labor-intensive and operator-dependent. Classical chemometrics, including principal component analysis (PCA) and partial least squares (PLS), has long supported spectral interpretation and calibration, particularly in the high-dimensional N ≪ p regime typical of vibrational spectroscopy [3, 4]. At the same time, regulatory and industrial frameworks such as Process Analytical Technology (PAT) increasingly emphasize model transparency, robustness and lifecycle management for spectroscopic methods implemented at-line or in-line [5]. In parallel, machine learning (ML) has been widely applied to FTIR and ATR-FTIR in biomedical diagnostics, forensic science, food authentication and materials analysis. Recent studies have demonstrated high accuracies for disease classification from blood or serum spectra [6, 7], forensic and illicit drug identification [8, 9], and agro-food authentication, including fruit and honey products [10]. Deep-learning architectures such as one-dimensional convolutional neural networks (1D-CNNs) and transformer-based models further push performance for gas sensing and grain quality assessment [13]. However, these often require large training sets, substantial computational resources and careful regularization, and they tend to obscure the contribution of each preprocessing and modelling step, which complicates deployment in regulated or resource-limited environments [11]. There is therefore a need for FTIR workflows that (i) retain the interpretability of classical chemometrics, (ii) exploit modern ML classification capabilities, (iii) remain computationally lightweight, and (iv) can be deployed as stand-alone tools at the instrument or in PAT settings. In this work we address this gap by developing a modular FTIR machine-learning pipeline that combines well-understood preprocessing operations Savitzky–Golay smoothing, asymmetric least-squares (ALS) baseline correction, area normalization and percentile-based peak selection with PCA and four benchmark classifiers (PLS-DA, XGBoost, RF and SVM). The pipeline is trained and validated on a curated FTIR library of 89 pure organic compounds at four concentration levels each, providing 356 spectra and deliberately introducing intra-class absorbance variability. These controlled variations force the model to rely on structural spectral patterns rather than absolute absorbance magnitude, thereby improving generalization and stability of class boundaries. FTIR spectroscopy is extensively utilized in analytical chemistry, environmental monitoring, pharmaceutical quality control, and industrial process analysis. However, the reliability of FTIR-based identification is often constrained by variations in sample concentration, discrepancies in instrument response, and subjective preprocessing decisions. These variables introduce uncertainty into chemometric workflows and impede spectral comparability between laboratories. Consequently, the development of concentration-invariant and reproducible preprocessing pipelines is critical for maintaining stable analytical performance and facilitating method transferability. The establishment of such standardized workflows is especially pertinent to Chemical Papers, which prioritizes practical and interdisciplinary analytical solutions. The main objectives of this study are: (i) to identify a simple but effective preprocessing strategy that yields concentration-invariant, peak-sparse spectral representations; (ii) to quantify the trade-offs between linear and non-linear classifiers in a high-dimensional, small-sample FTIR setting; and (iii) to demonstrate that such a pipeline can be implemented in a user-friendly Python/PyQt5 software tool suitable for routine laboratory use. Because the focus is on applied chemometric practice, the workflow is designed to offer stable performance across varying concentration levels and to support routine FTIR analysis in laboratory environments. By focusing on transparency, reproducibility and deployment rather than solely on marginal gains in accuracy, we provide a practical chemometric benchmark against which more complex deep-learning approaches can be evaluated. Despite extensive interest in FTIR-ML workflows, existing studies typically optimize individual components, such as smoothing strategies, peak detection, classifier tuning, or dimensionality reduction without consolidating these elements into a fully transparent, modular, and deployment-ready pipeline. Moreover, most published FTIR datasets provide only a single spectrum per compound or operate at fixed concentration, limiting the ability to evaluate concentration robustness. To our knowledge, no prior work integrates controlled concentration variability, peak-sparse representation, PCA compression, classical and non-linear ML benchmarking, and a one-to-one PyQt5 implementation within a unified analytical workflow. This gap motivates the present study, which focuses on methodological reproducibility and practical deployability rather than marginal improvements in accuracy. In addition to benchmarking several classifiers, the present work contributes a practical FTIR chemometric workflow that integrates standardized preprocessing (SG smoothing, ALS correction, normalization), peak-sparse feature selection, and PCA compression into a compact spectral representation. The workflow is explicitly designed to operate robustly across multiple concentration levels, and uses a replicate-aware split to avoid spectral leakage, making the approach directly applicable to routine laboratory FTIR analysis. These aspects align with the applied focus of FTIR practice and form the main contribution of this study. 2. Methods 2.1. FTIR dataset FTIR spectra for 89 organic compounds with four different concentration each were obtained from the publicly available U.S. Environmental Protection Agency (EPA) FTIR reference library. All spectra were recorded in absorbance mode at 0.25 cm⁻¹ resolution. For each compound, four spectra corresponding to four different concentrations were selected, yielding a total of 356 spectra. Because all samples are single‑component, each spectrum can be interpreted as a “pure compound” fingerprint without the need for spectral unmixing. The 89 compounds included in this study span a wide range of functional groups and molecular classes, including aldehydes, ketones, aromatics, halogenated hydrocarbons, epoxides, nitriles, amines, nitro/nitroso species, esters, and sulfur-containing molecules. This chemical breadth provides a challenging spectral landscape with diverse vibrational motifs, reflecting real-world industrial and environmental FTIR use cases. The inclusion of four concentration replicates per compound introduces controlled intra-class variability in peak intensities and baseline characteristics, thereby providing a more rigorous test of concentration-invariant learning than a single-spectrum-per-class design. This structured variability mirrors the types of fluctuations commonly encountered in routine FTIR work-differences in concentration, optical path length, ATR contact pressure, or sample thickness while avoiding confounding factors such as uncontrolled noise or matrix effects. As a result, the dataset is small by high-throughput standards but rich in analytically meaningful variation, making it well suited for benchmarking machine-learning pipelines. The use of the EPA reference spectra is intentional: such publicly curated libraries provide standardized acquisition conditions and high spectral resolution, enabling reproducible benchmarking across studies. They also avoid uncontrolled variability arising from matrix effects or instrumental instability, allowing the present work to focus explicitly on the methodological aspects of preprocessing, feature extraction, and classification. Furthermore, the experimental setting reflects the classical chemometric N ≪ p regime, where the number of spectral variables exceeds the number of samples. This is typical for vibrational spectroscopy and motivates the use of dimensionality reduction (PCA) and moderately low-capacity classifiers (PLS-DA, RF, XGBoost, SVM) that are specifically designed to operate reliably under such conditions. The strong performance achieved across this concentration-varied, chemically diverse dataset provides confidence that the proposed preprocessing and modelling framework captures structural spectral signatures rather than overfitting to absorbance patterns. Overall, while the dataset is not large in absolute terms, its designed variability, chemical breadth, and controlled acquisition conditions make it a scientifically meaningful and stringent benchmark for evaluating concentration-invariant FTIR classification methods. The use of a relatively small but chemically diverse library is typical for vibrational spectroscopic chemometrics, where high-dimensional spectral variables are combined with limited but information-rich sample sets [14]. Recent reviews on FTIR-based authentication and classification in food and biological matrices highlight similar library sizes and emphasize the importance of carefully designed experimental variability rather than sheer sample count [1]. In this context, the present dataset of 89 structurally diverse organics with four concentration levels each, covering multiple functional-group families and hazard classes, represents a stringent yet realistic benchmark for evaluating concentration-invariant FTIR classification. The 89 class structure of the dataset represents a particularly challenging scenario for vibrational spectroscopy. Many compounds share overlapping functional groups and similar band patterns, such as substituted aromatics, halogenated aliphatics, or short-chain carbonyls resulting in high spectral entropy. The four concentration replicates further increase intra-class variability through controlled absorbance scaling. Together, these factors create a classification task far more demanding than typical binary or low-multiclass FTIR problems, underscoring the need for a robust and carefully designed preprocessing and ML workflow. A complete list of all 89 compounds together with their functional-group classifications is provided in Supplementary Table S1. 2.2. Preprocessing: smoothing, baseline correction and normalization Raw absorbance spectra exhibit both high‑frequency noise and low‑frequency baseline drift. To reduce noise while preserving peak morphology, we first apply Savitzky–Golay (SG) smoothing with a polynomial order of 3 and a window length of 151 points. These parameters might be questioned and the justification is given below. The Savitzky-Golay smoothing parameters (polynomial order = 3, window length = 151 points) were selected following standard chemometric practice for vibrational spectroscopy. A third-order polynomial provides sufficient flexibility to model curved peak shapes without introducing oscillatory artefacts associated with higher-order fits, while a 151-point window (≈ 38 cm⁻¹ at 0.25 cm⁻¹ resolution) effectively suppresses high-frequency noise without distorting the intrinsic widths of typical FTIR functional-group bands. Empirical tests on the full dataset confirmed that shorter windows under-filtered noise, whereas larger windows began to attenuate narrow diagnostic peaks. To ensure reproducibility, these SG parameters were confirmed via a simple grid search (polynomial orders 2–5; window lengths 51–251 points) on the training set, selecting the combination that maximized macro-F1 under replicate-stratified cross-validation. These parameters therefore represent an optimal balance between denoising and peak-shape preservation. Figures 2 – 5 illustrate each transformation step. The raw spectrum (blue) exhibits high-frequency noise and fine-scale fluctuations, while the filtered spectrum (orange), obtained using a third-order polynomial and a 151-point window, preserves peak shapes and relative intensities. The smoothing step enhances signal quality without distorting diagnostic vibrational features, forming the first stage of the chemometric preprocessing pipeline. This choice balances denoising and fidelity of narrow bands, consistent with established practice in vibrational spectroscopy preprocessing. Baseline drift is then removed using the asymmetric least‑squares (ALS) algorithm, which fits a smooth background by penalizing curvature while asymmetrically down‑weighting positive residuals so that peaks remain above the baseline. In this work we use a smoothing parameter λ = 10⁸ and asymmetry parameter p = 0.01, iterating the weighted least‑squares fit 10 times to ensure convergence. The asymmetric least-squares (ALS) baseline correction parameters were chosen following established guidelines for vibrational spectroscopy. The smoothing parameter was set to λ = 10⁸, which enforces a sufficiently smooth baseline to remove low-frequency instrumental drift without intruding into the peak envelope. The asymmetry parameter p = 0.01 strongly down-weights positive residuals, ensuring that true absorbance peaks are treated as outliers and the baseline is fitted primarily through valley points. The ALS-corrected spectrum is subsequently area‑normalized over the 500–3000 cm⁻¹ region to produce a concentration and path-length-invariant representation that emphasizes relative, rather than absolute, band intensities. Overall, the preprocessing strategy was selected to balance spectral fidelity with dimensional efficiency: (i) SG smoothing removes high-frequency noise while preserving vibrational morphology; (ii) ALS correction establishes a baseline-independent representation, crucial when comparing spectra across concentration levels; (iii) area normalization enforces path-length and concentration invariance; and (iv) percentile-based peak filtering focuses the representation on diagnostic bands while suppressing low-information regions. This modular design ensures that each transformation has a clear analytical purpose and remains fully auditable in deployment settings. 2.3. Percentile‑based peak selection and tolerance matching To obtain a compact, peak‑sparse representation, we retain only those spectral points whose normalized absorbance exceeds the 65th percentile for a given spectrum. This percentile‑based thresholding removes approximately 65% of low‑absorbance, low‑information points while preserving the major diagnostic bands. The 65% percentile threshold was selected empirically to balance sparsity with spectral completeness. Preliminary visual inspection across the 356 spectra showed that thresholds below ~ 60% retained large portions of low-absorbance regions that contributed noise but no diagnostic vibrational information, while thresholds above ~ 70% began suppressing weaker but chemically meaningful bands (e.g., aromatic overtone regions, C–Cl/C–Br stretches, or shoulders adjacent to strong carbonyl peaks). The 65% cutoff consistently preserved all primary functional-group bands across the 89 compounds C = O, aromatic C = C, nitrile, amine, epoxide, and halogen stretches while discarding most of the flat baseline segments. This threshold therefore represents a pragmatic trade-off: aggressive enough to achieve substantial dimensionality reduction (~ 65% of points removed), yet conservative enough to avoid loss of structural information required for high-entropy classification. A coarse grid search over percentile thresholds between 55% and 75% confirmed that 65% maximized macro-F1 on training folds while preserving all major functional-group bands. For each nominal peak wavenumber in the retained set, a tolerance‑based matching step assigns the absorbance at the nearest measured wavenumber within ± 10 cm⁻¹; if no point lies within this window, the feature is set to zero. This yields fixed‑length, resolution‑invariant feature vectors for all spectra. In addition to the peak-sparse representation, we also retained a full-resolution variant of the pipeline in which the classifiers are trained directly on the baseline-corrected, normalized spectra projected by PCA without percentile-based peak filtering. This dual setup allows a direct comparison between a conventional full-spectrum chemometric workflow and the proposed peak-sparse representation in terms of classification performance, dimensionality, model size, and latency (Section 3.4 ). 2.4. Principal component analysis Even after peak selection, the feature matrix remains high-dimensional and strongly collinear. Principal component analysis (PCA) was therefore used to decorrelate and compress the data. The sparse feature matrix was mean-centered and decomposed into orthogonal principal components ordered by decreasing variance. The first 60 components, explaining 99% of the total variance, were retained as inputs to all downstream classifiers, reducing the effective dimensionality by approximately 90% relative to the original peak-absorbance feature space. FTIR spectra are highly collinear because smooth vibrational bands and concentration-dependent scaling dominate the signal, so most chemically relevant information lies in a low-dimensional subspace. In preliminary experiments, we compared variance thresholds between 90% and 99% and found that retaining only 90–95% of the variance led to a small but systematic increase in confusions between spectrally similar compounds (e.g. closely related aromatics and short-chain carbonyls). Using a 99% threshold eliminated these errors without noticeably increasing computation time. The additional variance captured between 95% and 99% therefore appears to reflect weak yet diagnostic bands and subtle band-shape variations rather than pure noise, making 99% a pragmatic compromise between information preservation and model parsimony. For the full-spectrum variant, retaining 63 components was required to reach the same 99% variance threshold due to higher dimensionality Cumulative explained-variance curve for PCA computed from the preprocessed, peak-sparse FTIR feature matrix. The horizontal dashed line marks the 99% variance threshold, which is reached at 60 principal components. This knee in the curve indicates that the chosen number of components achieves substantial dimensionality reduction while preserving essentially all discriminative spectral variance. 2.5. Classification models and hyperparameter optimization Four supervised classifiers are benchmarked on the PCA scores: (i) partial least‑squares discriminant analysis (PLS‑DA), (ii) extreme gradient boosting (XGBoost), (iii) random forest (RF), and (iv) support vector machine (SVM) with radial‑basis‑function kernel. Hyperparameters for all models, as well as the number of PLS latent variables, are optimized via grid search using scikit‑learn. Model selection is based on a combination of discrete classification metrics (accuracy, macro‑precision, macro‑recall, macro‑F1) and continuous calibration metrics (coefficient of determination R² and mean absolute error, MAE, for predicted one‑hot class‑probability vectors). Detailed preprocessing parameters, PCA variance contributions, classifier hyperparameters, and prediction timing metrics are reported in Supplementary Tables S2–S5. 2.6. Data Splitting and Validation Strategy The dataset consists of 356 spectra derived from 89 compounds, each measured at four concentration levels. As spectra belonging to the same compound differ primarily in absorbance scaling, minor baseline variations and noise – while sharing nearly identical peak positions and overall vibrational patterns – the data exhibit strong intra-compound correlation. Under such conditions, naive random or k-fold cross-validation that ignores this structure would mix highly correlated replicate spectra across folds, leading to spectral leakage, overly optimistic validation scores, and inflated estimates of model generalization. To mitigate this issue, a replicate-stratified hold-out validation strategy was adopted. For each compound, its four spectra were partitioned into disjoint training and testing subsets at the replicate (concentration-level) level. In the implementation used here, two spectra per compound were assigned to the training set and one spectrum per compound was assigned to the test set, The fourth replicate was intentionally excluded from analysis to prevent leakage and to preserve an unbiased external validation point for future studies. This yields a training set of 178 spectra (2 × 89 compounds) and an independent test set of 89 spectra (1 × 89 compounds). No individual spectrum is ever shared between training and testing, and each compound contributes distinct concentration levels/replicates to the two subsets.The remaining replicate (89 spectra) was excluded from both training and testing and retained as an external validation subset not used in this study. This design provides a more stringent and chemically meaningful assessment than random fold-based resampling for small spectroscopic datasets with replicated or concentration-series measurements. The classifier is required to generalize from some concentration levels of each analyte to previously unseen concentration levels of the same analytes, which closely mimics the intended laboratory use case where the target compounds are known a priori but routine measurements are acquired under slightly varying conditions. All evaluation metrics reported in this study, classification accuracy, macro-F1 and weighted-F1 for classification tasks, as well as MAE and R² for regression tasks, thus reflect performance on unseen replicate spectra of known compounds, rather than on spectra that have been randomly split irrespective of their strong intra-compound correlation. This approach is consistent with best practices in chemometrics for handling structurally grouped spectroscopic data, and provides a conservative, leakage-aware estimate of the models’ true predictive performance under realistic deployment conditions. 2.7. Software implementation The full pipeline, including SG smoothing, ALS baseline correction, area normalization, percentile‑based peak selection, PCA projection and classification—is implemented in Python and serialized as a scikit‑learn compatible object. A lightweight PyQt5 graphical user interface (GUI) wraps this pipeline to allow non‑expert users to load spectra from CSV files, run predictions, and visualize either the raw or preprocessed spectra and predicted class probabilities. Typical end-to-end prediction latency on a standard laptop (Intel i5, 8 GB RAM) is on the order of a few hundred milliseconds per spectrum (≈ 0.2–0.4 s), enabling near real-time use at the spectrometer or in a quality-control laboratory. The complete analytical workflow can be summarized as a linear sequence of operations: raw absorbance → SG smoothing → ALS baseline correction → area normalization → percentile-based peak selection → PCA projection → classification. This fixed transformation path is preserved identically in both the training environment and the PyQt5 deployment tool, ensuring full methodological consistency and traceability. 3. Results and discussion The results below demonstrate that a compact, peak-sparse chemometric representation combined with standard preprocessing provides a robust and concentration-invariant basis for FTIR classification, which is of direct practical value for applied spectroscopic workflows. 3.1. Effect of preprocessing and dimensionality reduction To clarify the contribution of each preprocessing operation, Table 1 (conceptual summary) outlines the analytical purpose of SG smoothing, ALS correction, area normalization, percentile-based sparsification, and PCA compression. Although no additional experiments were performed, the qualitative effects noise suppression, baseline removal, absorbance normalization, sparsity enhancement, and dimensional decorrelation are directly visible in the transformed spectra shown in Figs. 2 – 5 . This structured decomposition underscores how each stage contributes distinct and complementary improvements to data quality. Table 1 Conceptual contribution of each preprocessing step Preprocessing step Analytical purpose Qualitative effect on spectra (Figs. 2 – 5 ) Contribution to ML pipeline Savitzky–Golay smoothing Suppress high-frequency noise while preserving peak shape and position. Reduces jagged fluctuations on band tops and in flat regions; band positions and widths remain unchanged. Improves SNR without distorting vibrational features; stabilizes peak detection and feature extraction. ALS baseline correction Remove slowly varying background and scattering contributions. Flattens broad baseline drifts and sloping backgrounds; bands are centred around a common baseline. Isolates true absorbance bands; reduces spurious variance unrelated to chemistry. Area normalization Compensate for overall absorbance / pathlength / concentration differences. Scales spectra to comparable total area; relative band patterns become visually comparable across samples. Makes models focus on relative peak patterns instead of absolute absorbance scale; improves transferability. Percentile-based sparsification Retain only the most informative peak intensities; enforce sparsity. Removes low-Absorbance, noise-dominated points; spectra become sparse sets of well-defined peaks. Reduces dimensionality and collinearity; concentrates information in a compact, interpretable feature set. PCA compression Decorrelate sparse features and project onto low-dimensional latent space. Cumulative variance curve shows rapid saturation; most variance captured by first tens of components. Further shrinks feature space, mitigates multicollinearity and overfitting, while preserving discriminatory variance. The combined SG-ALS-normalization–percentile pipeline substantially improves the quality and usability of the FTIR data. Savitzky-Golay smoothing reduces high-frequency noise while preserving peak morphology, consistent with its original formulation and widespread use in vibrational spectroscopic preprocessing [15, 16]. ALS baseline correction with λ = 10⁸ and p = 0.01 was used to suppress slowly varying backgrounds arising from instrumental response and sample-matrix effects, consistent with recommended parameter ranges for chromatographic and vibrational spectra [17, 18]. Area normalization was subsequently applied to map spectra acquired at different concentrations onto a common relative-absorbance scale. This step is essential for learning concentration-invariant decision boundaries and ensuring consistent chemometric interpretation across varying path lengths and sample loadings [3]. Percentile-based peak selection plays a central role in controlling model complexity. For the chosen 65th-percentile threshold, approximately two-thirds of the original data points are discarded, yet visual inspection confirms that all major functional-group bands remain. This simple, absorbance-driven feature selector improves signal-to-noise ratio and sparsifies the input without requiring explicit peak fitting, echoing results from recent IR-based gas-sensing and food-authenticity workflows that exploit sparse or band-focused representations [10]. The subsequent PCA step further reduces the dimensionality by approximately 90%, retaining 99% of the variance in only 60 components. This level of compression is consistent with best practice in vibrational chemometrics, where PCA is routinely used to decorrelate and denoise FTIR and NIR spectra before classification [10, 14]. 3.2. Classification performance of PLS‑DA, XGBoost, RF and SVM Replicate-stratified hold-out validation was used to evaluate model performance (Table 2 ). For each compound, two of the four concentration replicates were assigned to the training set and one replicate to the test set, while the remaining replicate was reserved for potential future external validation. This design ensures that the classifier is always tested on concentration levels not seen during training, while avoiding spectral leakage between training and test spectra from the same compound. This approach avoids spectral leakage and provides a more rigorous estimate of generalization than classical k-fold cross-validation for small, highly correlated spectroscopic datasets. Table 2 summarizes the classification metrics obtained on the held-out test set. All four models achieve overall accuracy ≥ 0.99 and macro-F1 scores between 0.99 and 1.00 across the 89-class problem, indicating that the preprocessing and PCA steps preserve essentially all discriminatory information needed for compound identification. XGBoost and Random Forest reach macro-F1 = 1.00 (perfect classification), while PLS-DA and SVM achieve macro-F1 ≈ 0.99 with only isolated single-sample errors visible in the confusion matrices. The very small gaps between macro and weighted scores (0.99-1.00 in all cases) suggest that performance is consistent across both abundant and rare classes. Comparable or slightly lower figures have been reported for FTIR-based classification of serum samples, honey and fruit products, and illicit drugs, usually in lower-dimensional or binary/multiclass settings [6–10]. To probe calibration, we treat the class-probability vectors as continuous regressands against ideal one-hot labels. PLS-DA, XGBoost and RF achieve R² values up to 0.97–0.98 with MAE ≲ 0.03, indicating that probability mass is concentrated on the correct class and that the models exhibit high confidence when they are correct. This focus on probabilistic calibration is in line with emerging recommendations for analytical ML in regulated environments, where confidence estimates and model lifecycle management are as important as raw accuracy [3, 5]. SVM, despite already achieving > 0.99 accuracy on this test set, still provides well-behaved probability vectors, which is important for tasks such as rejecting low-confidence predictions or enabling active learning. Table 2 Classification performance and training times for the four models (sparse features). Model Train time (s) Accuracy Macro Recall Macro F1 Weighted Recall Weighted F1 PLS-DA 0.57 0.99 0.99 0.99 0.99 0.99 XGBoost 0.96 1.00 1.00 1.00 1.00 1.00 Random Forest 0.30 1.00 1.00 1.00 1.00 1.00 SVM 0.11 0.99 0.99 0.99 0.99 0.99 A closer inspection of the confusion matrices (Fig. 6 ) shows that misclassifications are extremely rare and chemically structured. For PLS-DA, a single compound, Ethylbenzene, is misclassified once (precision = recall = 0), with its spectrum being confused with Cumene, which accordingly exhibits precision = 0.5 and recall = 1.0. XGBoost and Random Forest classify all 89 compounds perfectly. For the SVM model, one highly chlorinated cyclic compound, Hexachlorocyclopentadiene, is misassigned to Aniline (Hexachlorocyclopentadiene: precision = recall = 0; Aniline: precision = 0.5, recall = 1.0), consistent with the overall SVM accuracy of 0.99. All remaining classes are classified perfectly by PLS-DA, RF and SVM. These error patterns are chemically plausible: the affected species are either substituted aromatic hydrocarbons (Ethylbenzene, Cumene), an aromatic amine (Aniline), or a highly chlorinated cyclic compound (Hexachlorocyclopentadiene), all of which exhibit FTIR spectra with partially overlapping band positions and similar absorbance distributions to structurally related neighbours. No random or chemically implausible confusions across distant functional-group families were observed, indicating that the classifiers rely on meaningful vibrational signatures rather than spurious noise. The strong performance across such a chemically diverse 89-compound library therefore suggests that the learned latent representations generalize well across both structurally and vibrationally distinct molecules, with residual errors confined to a handful of borderline cases. It is important to note that this dimensionality reduction refers to the number of wavenumber features retained, whereas the subsequent PCA step operates in latent space; thus, the number of principal components required to reach 99% explained variance (≈ 60 PCs for sparse spectra and ≈ 63 PCs for full spectra) is independent of the 65% reduction in raw spectral points. 3.3. Comparison between PLS-DA and Non-linear ML Models. PLS-DA, representing the classical chemometric baseline, already achieved very strong performance on the sparse-peak representation (accuracy ≈ 0.99, misclassification ≈ 1.1%), confirming that the combination of peak-based features and PCA yields a highly informative latent space. This indicates that a relatively simple linear model is already sufficient to separate most compounds when appropriate preprocessing is applied. The non-linear models, in particular Random Forest and XGBoost, matched and slightly surpassed this baseline. Both tree ensembles reached perfect classification on the held-out replicates (accuracy = 1.00, macro-F1 ≈ 0.99–1.00 across all models.), eliminating the residual errors observed with PLS-DA. The SVM with an RBF kernel performed similarly to PLS-DA (accuracy ≈ 0.99), suggesting that most of the remaining difficulty lies in a small number of borderline spectra rather than in a fundamentally non-linear decision boundary across the entire chemical space. Taken together, these results show that non-linear methods can provide small but measurable gains over a well-tuned linear baseline on this dataset. In terms of complexity and deployability, the linear models (PLS-DA and SVM) remain extremely compact, with serialized sizes on the order of 0.65–0.75 MB, whereas XGBoost and Random Forest occupy ≈ 6.5 MB and ≈ 7.7 MB, respectively. Despite this 1-order-of-magnitude increase in model size, all approaches remain lightweight by modern standards. In a benchmark script including CSV parsing, sparse feature construction, PCA projection, and classification repeated over 50 runs, PLS-DA averaged ≈ 0.31 s per prediction, while XGBoost, Random Forest, and SVM required ≈ 0.40–0.43 s. These modest differences indicate that, in practice, preprocessing dominates the latency budget and that swapping PLS-DA for a non-linear classifier does not compromise real-time usability. By jointly reporting PLS-DA and ML results on the same sparse-PCA representation, we demonstrate that (i) the pipeline is already highly effective with a traditional linear chemometric method, and (ii) non-linear models offer incremental improvements on difficult cases without losing interpretability. Because all models operate on the same reduced feature space, tree-based feature importance profiles and SVM decision regions can be mapped back through the PCA loadings to specific wavenumber intervals and functional-group regions, preserving a direct link between predictive performance and underlying vibrational chemistry. 3.4 Feature Reduction and Preservation of Diagnostic Information. Beyond qualitative inspection, we quantitatively compared models trained on the peak-sparse representation with models trained on the full preprocessed spectrum. For PLS-DA, both variants achieved essentially identical performance on the 89-class task (accuracy and macro-F1 ≈ 0.99), indicating that removing low-absorbance regions does not degrade compound discrimination. However, the sparse representation reduced the number of input features by approximately an order of magnitude and yielded smaller, faster models: in the PyQt5 implementation, the full-spectrum PLS-DA model reaches mean prediction times of ~ 0.21 s per spectrum, whereas the peak-sparse-based PLS-DA model runs at ~ 0.35 s per spectrum. Given that both latencies are negligible relative to typical FTIR acquisition times, this result confirms that peak sparsification offers substantial dimensionality and interpretability gains with no practical loss in accuracy and only a modest change in runtime behaviour. The slight increase in latency for the sparse model reflects the overhead of constructing the peak-sparse feature matrix at inference time. The corresponding PCA spaces also differ in compactness: the full-resolution workflow uses 63 principal components, whereas the sparse representation attains comparable performance with 60 components and a model size on the order of ~ 0.7 MB for PLS-DA, compared with several megabytes for tree-based ensembles. Near-perfect macro-F1 scores obtained with PCA retaining 99% of the variance using only 60 components further confirm that the residual 1% primarily reflects noise, whereas the variance preserved above the more conventional 95% threshold still carries useful discriminative structure for borderline classes. The percentile-based peak-sparse representation removes approximately 65% of the lowest-absorbance data points, but it is not a random or blind compression. Visual inspection confirmed that all major diagnostic bands (C = O, aromatic C = C, C ≡ N, C–O/C–N, C–Cl/C–Br) are preserved after thresholding, while the discarded regions correspond primarily to flat baseline segments and low-level residual noise. PCA applied to the sparse representation still retains 99% of the total variance within 60 components, indicating that the essential spectral structure is maintained. The fact that all models achieve macro-F1 scores near 0.99 over 89 structurally diverse compounds and four concentration levels strongly suggests that no crucial chemical information has been removed. Furthermore, the PCA loadings and feature-importance analysis show that the classifier relies on canonical FTIR regions rather than on discarded low-absorbance segments, demonstrating that the reduced feature set retains the relevant diagnostic signatures. We also observed that models trained on the full preprocessed spectrum did not outperform those trained on the peak-sparse representation, confirming that the removed features do not contribute positively to classification performance. 3.5. Comparison with recent FTIR–ML studies Recent FTIR and ATR-FTIR studies combining spectroscopy with ML have reported excellent classification performance in diverse domains [6–11]. Many of these works employ similar classifiers (SVM, RF, gradient boosting) and relatively standard preprocessing, and they demonstrate that classical ML can compete with or outperform purely rule-based interpretation. In parallel, deep-learning architectures such as 1D-CNNs and transformer-based models have achieved state-of-the-art accuracy for gas sensing and grain-quality classification, but typically at the cost of higher data requirements, limited interpretability and greater computational burden [12, 13]. Compared with these studies, the present work emphasizes four aspects that are rarely combined in a single FTIR-ML system. First, we explicitly design the dataset with four concentration levels per compound, so that concentration variation is not an uncontrolled nuisance but a deliberate axis of difficulty; most published studies operate at a single concentration or do not report concentration at all. Second, we separate smoothing, baseline correction, normalization, peak selection, PCA and classification into distinct, auditable stages with documented hyperparameters, in contrast to end-to-end deep networks in which these steps are entangled. Third, the peak-sparse representation and PCA compression reduce the effective dimensionality by ~ 90%, yet still deliver macro-F1 ≈ 0.99, comparable to or better than the accuracies reported for honey, fruit, gelatin or serum classification, but in a much more heavily multi-class (89-class) setting [10, 11]. Finally, we provide a Python/PyQt5 desktop application in which the exact same preprocessing and modelling code used for training is deployed for inference, closing the common gap between “research-grade” models and practical, user-facing tools in the FTIR domain. Although classical FTIR interpretation often relies on manually selecting a limited number of diagnostic regions (e.g., carbonyl stretches, aromatic bands), such an approach is insufficient for highly multi-class problems where many compounds exhibit overlapping or interacting vibrational features. The automated PCA-based representation systematically captures variance from the entire spectral fingerprint, including subtle shoulders, overtone combinations, and band-shape variations that are difficult to isolate manually. This allows the model to resolve structurally similar analytes, such as isomers, substituted aromatics, or halogenated aliphatics—whose characteristic peaks partially overlap. The present results therefore demonstrate that ML-assisted latent-space decomposition provides a more comprehensive and chemically faithful interpretation of complex FTIR datasets than manual band selection alone. The complete graphical interface implementing all preprocessing and classification steps is available in the accompanying GitHub repository, allowing users to inspect each intermediate spectral transformation. This reinforces the interpretability of the workflow, as individual SG, ALS, normalization, peak-selection and PCA steps can be visualized in real time. Deep-learning architectures such as 1D-CNNs and transformer models were not pursued here because the dataset size, concentration structure, and application requirements favour classical chemometric approaches. Deep models typically require larger training sets, introduce complex regularization constraints, and obscure the interpretability of intermediate processing stages. In contrast, the present PCA-based workflow provides a fully auditable representation that aligns with analytical-chemistry expectations for transparency, reproducibility, and lifecycle management. 3.6. Graphical user interaction To demonstrate practical deployability beyond model development, we implemented the full preprocessing and classification pipeline within a standalone Python-based PyQt5 graphical user interface (GUI) (Fig. 7 ). The interface and backend execute entirely within a single Python environment, eliminating cross-language overhead and reducing latency. On standard CPU hardware, the system achieves end-to-end prediction times of ≈ 350 ms per spectrum, with all runs completing in under 400 ms, including SG smoothing, ALS baseline correction, area normalization, peak sparsification, PCA transformation, and classifier inference. This confirms that the pipeline satisfies the timing requirements for real-time or at-line FTIR classification. Where many FTIR–ML studies report high accuracy but stop at algorithmic development, our interface packages the exact same code used for training into an accessible desktop tool for non-programmers, ensuring full transparency and eliminating deployment inconsistencies. Users load raw spectra, run predictions with a single command, and view ranked class probabilities with an adjustable confidence threshold. The interface integrates spectral visualization, probability plots, and one-click PDF reporting through stable Python libraries (PyQt5, joblib, Plotly, reportlab).Overall, the GUI provides a low-latency and reproducible deployment layer that translates the FTIR–ML workflow from a research prototype into an operational tool suitable for laboratory and process environments. The complete interface is available in the accompanying GitHub repository. 3.7. Limitations The deliberate use of a pure-compound reference library represents a methodological choice that aligns with standard practice in chemometrics. Pure compounds eliminate confounding matrix interactions and allow controlled evaluation of preprocessing and model behaviour under varying concentration conditions. Such benchmark datasets are widely used for methodological studies in vibrational spectroscopy, particularly when the objective is to isolate algorithmic performance rather than assess application-specific matrix effects. Although the proposed pipeline demonstrates excellent performance across 89 compounds and four concentration levels, several limitations remain that reflect broader gaps in current FTIR–ML research. First, the present study focuses exclusively on pure compounds under controlled laboratory acquisition, whereas the majority of recent FTIR–ML applications involve inherently more heterogeneous matrices. Pure-compound libraries are valuable for mechanistic benchmarking, but additional work is required to evaluate how the pipeline behaves under matrix effects, overlapping peaks, and non-linear mixing interactions. Second, although deliberate concentration variability was introduced here, other sources of real-world variation—instrumental drift, temperature and humidity fluctuations, ATR-pressure effects, and inter-instrument spectral shifts—were not explored. Several studies have highlighted the importance of spectrum standardization and calibration transfer for robust deployment across different spectrometers [1, 3]. Addressing these factors will require domain-adaptation strategies, cross-instrument evaluation, or synthetic-augmentation methods. Third, the peak-sparse representation and fixed percentile thresholding improve model stability and interpretability, but they may discard weaker but diagnostically relevant bands (e.g., halogen stretches or overtone regions). Adaptive feature-selection techniques, such as stability selection, SHAP-guided filtering, or band-target entropy methods could help balance sparsity with spectral completeness. Finally, while the classifiers used here cover both linear and non-linear paradigms, they do not incorporate representation learning, which has shown promise in deep learning approaches for gas sensing and grain-quality analysis [13]. Lightweight CNN or transformer modules may enhance generalization for more complex or noisy datasets, provided that interpretability and computational manageability are preserved. While k-fold cross-validation is often used in larger spectral datasets, the present design uses four concentration levels per compound, which creates strong intra-compound correlations. Under such conditions, fold-based resampling can lead to optimistic results because peaks and intensities from the same chemical structure appear simultaneously in training and validation subsets. For this reason, a single, chemically balanced replicate-stratified split (distinct concentration levels per compound in train vs. test) is more defensible than naive random k-fold cross-validation. Future work involving mixtures, more replicates, or multi-instrument acquisition would enable compound-level cross-validation or group-wise k-fold schemes. Overall, these limitations reflect active research challenges in FTIR chemometrics and ML rather than weaknesses of the proposed workflow. They define clear and practical directions for expanding the present work toward mixture modelling, cross-instrument harmonization, adaptive peak selection and hybrid deep-learning architectures. Importantly, the limitations outlined above reflect practical challenges common to industrial FTIR workflows matrix variability, inter-instrument shifts, and feature selection under spectral congestion. By identifying these factors explicitly, the present study provides a clear roadmap for extending the pipeline toward more heterogeneous real-world environments without altering its fundamental chemometric transparency. Finally, because the study relies on a pure-compound reference library, the present results should be interpreted as a methodological benchmark rather than a direct assessment of performance under real-world matrix effects; mixture behaviour, scattering contributions, and water-dominated backgrounds remain to be evaluated in future extensions of the workflow. 4. Conclusion This study presents a concentration-invariant FTIR chemometric workflow that integrates standardized preprocessing, a peak-sparse spectral representation, principal component analysis (PCA) compression, and supervised machine-learning classification. Analysis of spectra from 89 pure organic compounds at four concentration levels demonstrated high robustness and accuracy, with macro-F1 scores ranging from 0.97 to 1.00 under replicate-stratified validation. This workflow establishes a transparent and reproducible framework that may serve as a methodological benchmark for future applications involving more complex matrices and real-world analytical scenarios. In addition to its methodological contributions, the proposed workflow offers practical value for both analytical and industrial chemistry. The peak-sparse representation reduces computational requirements while preserving vibrationally significant features, enabling rapid classification of incoming spectra. The integrated Python/PyQt5 interface supports real-time implementation in laboratory and production environments, where efficient decision-making and consistent preprocessing are essential. These characteristics make the workflow suitable for incorporation into automated identification systems, quality-control processes, and standardized analytical protocols. Abbreviations FTIR Fourier–Transform Infrared (spectroscopy) ATR FTIR –Attenuated Total Reflection Fourier–Transform Infrared SG Savitzky–Golay (smoothing) ALS Asymmetric Least Squares (baseline correction) PCA Principal Component Analysis PLS Partial Least Squares PLS DA –Partial Least Squares Discriminant Analysis ML Machine Learning SVM Support Vector Machine RF Random Forest XGBoost Extreme Gradient Boosting R² Coefficient of Determination MAE Mean Absolute Error PAT Process Analytical Technology CNN / 1D CNN –Convolutional Neural Network / One–Dimensional Convolutional Neural Network GUI Graphical User Interface CPU Central Processing Unit Declarations Declaration of Conflict of Interest The concept described in this manuscript is covered by a patent application currently under review by the Intellectual Property Agency of the Republic of Uzbekistan (Ref: DT 202509952). Funding This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors. Data availability statement All modelling, preprocessing, PCA, classification, and GUI functions were implemented in Python 3.11 using NumPy, SciPy, Pandas, Matplotlib, and scikit-learn. The complete codebase, including the PyQt5 desktop interface, is openly available at https://github.com/0221eng/FTIR-ML-Pipeline/blob/main/README.md Declaration of Artificial Intelligence Use The authors affirm that this manuscript was primarily written by the named authors. Artificial Intelligence (AI) tools, specifically Grammarly, were utilized solely for English language editing and improvement. All authors have thoroughly read, verified, and approved the final manuscript and take full responsibility for its scientific content and accuracy. Author Contribution Moulay Rachid Babaa conceived the study and contributed to the development of the methodology, supervision, and the writing of both the original draft and the subsequent review and editing. Otabek Atabayev contributed to methodology, data curation, and formal analysis. Asadbek Tajimuratov contributed to data curation, and formal analysis. Shakhzodbek Samandarov contributed to data curation and to GUI development. All authors reviewed and approved the final manuscript. References J. Workman, Spectrosc. 39, 22–28 (2024). https://doi.org/10.56530/spectroscopy.ak9689m8 A. Takamura, T. Ozawa, Analyst 146, 7431–7449 (2021). https://doi.org/10.1039/D1AN01637G M. D. Peris-Díaz, A. Krężel, TrAC-Trends Anal. Chem. 135, 116157 (2021). DOI: 10.1016/j.trac.2020.116157 D. J. da Silva, H. Wiebeck, J. Polym. Environ. 30, 3031–3044 (2022). DOI: 10.1007/s10924-022-02396-3 L. McDermott, Spectrosc. Suppl. 38, 9–13 (2023). DOI: 10.56530/spectroscopy.pk3974j5 E. Korb, M. Bağcıoğlu, E. Garner-Spitzer, U. Wiedermann, M. Ehling-Schulz, I. Schabussova, Biomolecules 10, 1058 (2020). DOI: 10.3390/biom10071058 A. Fadlelmoula, S. O. Catarino, G. Minas, V. Carvalho, Micromachines 14, 1145 (2023). DOI: 10.3390/mi14061145 Y. Du, Z. Hua, C. Liu, R. Lv, W. Jia, M. Su, Forensic Sci. Int. 349, 111761 (2023). DOI: 10.1016/j.forsciint.2023.111761 I.-F. Darie, S. R. Anton, M. Praisler, Inventions 8, 56 (2023). DOI: 10.3390/inventions8020056 D. Dimakopoulou-Papazoglou, S. Serrano, I. Rodríguez, N. Ploskas, K. Koutsoumanis, E. Katsanidis, J. Food Compos. Anal. 144, 107778 (2025). DOI: 10.1016/j.jfca.2025.107778 J. Rincón-López, et al., Discov. Sustain. 6, 536 (2025). DOI: 10.1007/s43621-025-01146-4 L. Song, H. Wu, Y. Yang, Q. Guo, J. Li, Appl. Opt. 59, E9–E16 (2020). DOI: 10.1364/AO.59.000E9 Z. Chen, R. Zhou, P. Ren, RSC Adv. 14, 8053–8066 (2024). DOI: 10.1039/D3RA07708J Y. Sultanbawa, H. E. Smyth, K. Truong, J. Chapman, D. Cozzolino, Food Chem. (Oxf.) 3, 100033 (2021). DOI: 10.1016/j.fochms.2021.100033 A. Savitzky, M. J. E. Golay, Anal. Chem. 36, 1627–1639 (1964). DOI: 10.1021/ac60214a047 R. C. Marcone, L. M. S. C. C. M. Miranda, J. M. F. C. Marcone, Appl. Spectrosc. Rev. 55, 931–950 (2020). DOI: 10.1080/05704928.2019.1708406 S. J. Baek, A. Park, Y. J. Ahn, J. Choo, Analyst 140, 250–257 (2015). DOI: 10.1039/C4AN01061B S. Oller-Moreno, A. Pardo, J. M. Jiménez-Soto, J. Samitier, S. Marco, 2014 IEEE 11th International Multi-Conference on Systems, Signals & Devices (SSD14), 1–5 (2014). Additional Declarations Competing interest reported. The concept described in this manuscript is covered by a patent application currently under review by the Intellectual Property Agency of the Republic of Uzbekistan (Ref: DT 202509952). Cite Share Download PDF Status: Published Journal Publication published 03 Apr, 2026 Read the published version in Chemical Papers → Version 1 posted Editorial decision: Revision requested 09 Jan, 2026 Reviews received at journal 05 Jan, 2026 Reviewers agreed at journal 05 Jan, 2026 Reviewers agreed at journal 20 Dec, 2025 Reviewers invited by journal 10 Dec, 2025 Editor assigned by journal 10 Dec, 2025 Submission checks completed at journal 09 Dec, 2025 First submitted to journal 08 Dec, 2025 You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-8310607","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":558382797,"identity":"ba324f55-8331-40d8-be0d-751a276e1847","order_by":0,"name":"Otabek Atabaev","email":"","orcid":"","institution":"New Uzbekistan University","correspondingAuthor":false,"prefix":"","firstName":"Otabek","middleName":"","lastName":"Atabaev","suffix":""},{"id":558382799,"identity":"7ac773b3-5daf-4ce1-8ab7-1a21b7a18d6e","order_by":1,"name":"Moulay Rachid Babaa","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAq0lEQVRIiWNgGAWjYFACHgZmIClHuhZj0rUkNhCtQbeB9+Dnghq79O3sPWbSPAyH7QlqMTvAlyw941hy7s6eM2AtzERo4TGQ5mFjzt1wI3cbSAsbMVqMf/P8q083uP8WrIWHGC1m0rxthxMMbvCCtUgQ1nKYL816Zt9xww1n8j9bzjFINyCs5Xjv4dsF36rlDY4fS7zxpsKacIgxoIYQYTtGwSgYBaNgFBADAP9kNGTF/eDyAAAAAElFTkSuQmCC","orcid":"","institution":"New Uzbekistan University","correspondingAuthor":true,"prefix":"","firstName":"Moulay","middleName":"Rachid","lastName":"Babaa","suffix":""},{"id":558382801,"identity":"d7272bf0-63b7-4de4-b5fb-4f03568b37f5","order_by":2,"name":"Shakhzodbek Samandarov","email":"","orcid":"","institution":"New Uzbekistan University","correspondingAuthor":false,"prefix":"","firstName":"Shakhzodbek","middleName":"","lastName":"Samandarov","suffix":""},{"id":558382803,"identity":"a40bcadb-ad5d-48e0-b536-812e8859485c","order_by":3,"name":"Asadbek Tajimuratov","email":"","orcid":"","institution":"New Uzbekistan University","correspondingAuthor":false,"prefix":"","firstName":"Asadbek","middleName":"","lastName":"Tajimuratov","suffix":""}],"badges":[],"createdAt":"2025-12-08 19:08:22","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8310607/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8310607/v1","draftVersion":[],"editorialEvents":[{"content":"https://doi.org/10.1007/s11696-026-04796-4","type":"published","date":"2026-04-03T15:58:15+00:00"}],"editorialNote":"","failedWorkflow":false,"files":[{"id":98422335,"identity":"4909be66-735c-4715-839c-c410637f8d7f","added_by":"auto","created_at":"2025-12-17 16:30:53","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1313557,"visible":true,"origin":"","legend":"","description":"","filename":"BabaaCPML0212.docx","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/f600aee0f5330110a408fb62.docx"},{"id":97949823,"identity":"95013e36-628d-43e4-92c4-d5653a93ec4b","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"json","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":6346,"visible":true,"origin":"","legend":"","description":"","filename":"8aefedbe956341bba1e290e8302664d2.json","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/3409e4fe2fcd99b35423be68.json"},{"id":97949819,"identity":"982b9963-d723-487b-8593-af4234f8a2a0","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"xml","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":83441,"visible":true,"origin":"","legend":"","description":"","filename":"8aefedbe956341bba1e290e8302664d21enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/862aeb801c5d6c96e2c51fb5.xml"},{"id":98421950,"identity":"d091e38b-91ad-422c-b40a-e355aed8b419","added_by":"auto","created_at":"2025-12-17 16:30:02","extension":"wmf","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":2135686,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.wmf","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/59a5bacd2b592f31776cffaf.wmf"},{"id":98422542,"identity":"198265d2-705b-4e3c-bcea-a9b2c4c82fc6","added_by":"auto","created_at":"2025-12-17 16:31:11","extension":"jpeg","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":155197,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage2.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/859109e2bb9423214a6a702a.jpeg"},{"id":98422296,"identity":"7c760f6e-60e0-4458-8c14-a92732c73c5c","added_by":"auto","created_at":"2025-12-17 16:30:48","extension":"wmf","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1912958,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage3.wmf","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/c8a2d2d8aae94b7c5a5ee80a.wmf"},{"id":97949826,"identity":"3cfbf817-5ef1-4cd2-9dc8-edf988294a68","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"png","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":70245,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/d3d349303a558362e3dce19d.png"},{"id":98422343,"identity":"37ab3b77-bca8-4d1a-b657-6edf534456c6","added_by":"auto","created_at":"2025-12-17 16:30:53","extension":"png","order_by":7,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":29806,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage5.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/2c00bac4516a386f397e5b28.png"},{"id":98421832,"identity":"80a98d34-58b3-433e-902d-ac414e11b01a","added_by":"auto","created_at":"2025-12-17 16:29:35","extension":"jpeg","order_by":8,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1292208,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage6.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/9ddcf94fc086bd8e77d530cf.jpeg"},{"id":97949839,"identity":"08ee0a57-b47f-4706-8427-2ae17872656a","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"jpeg","order_by":9,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":493576,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage7.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/b5b8cc1d16f9a4ce208f6949.jpeg"},{"id":98422212,"identity":"966e9e67-d5b7-4b5b-b78f-d196a4251948","added_by":"auto","created_at":"2025-12-17 16:30:40","extension":"wmf","order_by":10,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":2135686,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.wmf","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/af4ec0e47eeaff891d394d98.wmf"},{"id":97949837,"identity":"2cf0db2f-4a58-4403-9758-cde4e5816369","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"wmf","order_by":11,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1912958,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage3.wmf","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/5a6da0ad43613317e9f194bb.wmf"},{"id":98423792,"identity":"91dc1ee0-841d-4000-b62e-474f16212d30","added_by":"auto","created_at":"2025-12-17 16:32:38","extension":"png","order_by":12,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":62069,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/f85a0d7660d82e222531ad05.png"},{"id":97949827,"identity":"f72f2b17-c82c-4b85-8cf7-d26e12eee4a5","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"png","order_by":13,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":37584,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/f54551904c6af49c6163a945.png"},{"id":98422242,"identity":"0f18bc7c-ccfd-403b-8ee5-4196b7dc6756","added_by":"auto","created_at":"2025-12-17 16:30:42","extension":"png","order_by":14,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":43645,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/9081c29d2d6026963dc09ff9.png"},{"id":97949830,"identity":"a3632c91-6a2a-4fdd-9d53-4d4d60160103","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"png","order_by":15,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":25775,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/f8518aed21ef606f7f1b9b03.png"},{"id":98421900,"identity":"4ea8e76a-5d9a-4455-9507-b08bbe080446","added_by":"auto","created_at":"2025-12-17 16:29:54","extension":"png","order_by":16,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":10334,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage5.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/672bd20b01d97725ae36fb6c.png"},{"id":98422561,"identity":"a7b2c844-6e64-4d85-8516-1b47e2ce6016","added_by":"auto","created_at":"2025-12-17 16:31:12","extension":"png","order_by":17,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":201863,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage6.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/7dde5c8a98687d9473471183.png"},{"id":97949842,"identity":"a697f220-a17b-421f-93bd-97b3ce3adc00","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"png","order_by":18,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":68250,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage7.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/a7c41b837dd52872fc03dd29.png"},{"id":97949833,"identity":"d96ec52c-af0a-4c56-8788-d9e32d107cff","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"png","order_by":19,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":62069,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/7a56b2cbad0748b8ce2221fb.png"},{"id":98422203,"identity":"0c9c5e45-41fe-4fd7-a558-f50120c86751","added_by":"auto","created_at":"2025-12-17 16:30:38","extension":"png","order_by":20,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":43645,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/befd92494b5c9324163c8017.png"},{"id":97949845,"identity":"ce42abce-d500-46e3-8397-175279f5df16","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"xml","order_by":21,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":81519,"visible":true,"origin":"","legend":"","description":"","filename":"8aefedbe956341bba1e290e8302664d21structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/e32092165c8f0d7670f30b56.xml"},{"id":97949841,"identity":"53c3291e-9366-4914-8ab6-5298b6530154","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"html","order_by":22,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":87858,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/ebea7ce905bb49f16c975acc.html"},{"id":97949815,"identity":"236252a4-e471-4157-9770-644d65571313","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"jpg","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":93280,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cem\u003eRepresentative raw FTIR absorbance spectra from two chemically distinct compounds in the training library, (a) aniline (99.1 ppm) and (b) bromomethane (100.1 ppm). These examples highlight the resolution of the spectrum and the broad structural and functional-group diversity included in the dataset of 89 pure organic compounds, which underpins the robustness of the classification task.\u003c/em\u003e\u003c/p\u003e","description":"","filename":"1.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/3103276a4c31e74bba2b59c6.jpg"},{"id":98422282,"identity":"505866f3-f779-4aea-8dcc-c6583cc48be4","added_by":"auto","created_at":"2025-12-17 16:30:47","extension":"jpg","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":60531,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eOriginal and Savitzky–Golay-filtered FTIR absorbance spectra for a representative compound.\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"2.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/8098bceaf9bba686acedab94.jpg"},{"id":97949816,"identity":"e17c84fd-f916-40fb-a56b-f2942557a700","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"jpg","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":52045,"visible":true,"origin":"","legend":"\u003cp\u003eAsymmetric least-squares (ALS) baseline correction applied to a representative FTIR spectrum. The estimated baseline (blue) captures low-frequency drift, enabling subtraction from the smoothed spectrum (red) to yield the corrected absorbance (green) with restored band shapes and improved quantification.\u003c/p\u003e","description":"","filename":"3.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/5bb619fe220d2add26629d8c.jpg"},{"id":97949818,"identity":"87ad02e2-8e75-4755-9b9c-974716e57023","added_by":"auto","created_at":"2025-12-11 06:45:27","extension":"jpg","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":86684,"visible":true,"origin":"","legend":"\u003cp\u003eCorrected and normalized FTIR absorbance spectrum (green) with detected peaks. Initial peak candidates (yellow) are filtered by an absorbance-based percentile threshold, retaining only the top 65th-percentile peaks (red) to produce a sparse, chemically informative feature set for downstream PCA-ML analysis.\u003c/p\u003e","description":"","filename":"4.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/264b5a6addfc8d517df82cee.jpg"},{"id":98422577,"identity":"c1282c3c-d261-48eb-9798-5aed5efd22f9","added_by":"auto","created_at":"2025-12-17 16:31:13","extension":"jpg","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":52670,"visible":true,"origin":"","legend":"\u003cp\u003eCumulative variance captured by successive principal components.\u003c/p\u003e\n\u003cp\u003eCumulative explained-variance curve for PCA computed from the preprocessed, peak-sparse FTIR feature matrix. The horizontal dashed line marks the \u003cstrong\u003e99 %\u003c/strong\u003e variance threshold, which is reached at \u003cstrong\u003e60\u003c/strong\u003eprincipal components. This knee in the curve indicates that the chosen number of components achieves substantial dimensionality reduction while preserving essentially all discriminative spectral variance.\u003c/p\u003e","description":"","filename":"5.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/0974f2277b632156eff6f51e.jpg"},{"id":98422228,"identity":"efd626fd-23ce-4f1e-a39f-6ea81939aec4","added_by":"auto","created_at":"2025-12-17 16:30:41","extension":"jpg","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":371778,"visible":true,"origin":"","legend":"\u003cp\u003eConfusion matrices for PLS-DA, XGBoost, Random Forest, and SVM evaluated on the held-out test set (89 compounds, one spectrum per compound). For clarity, each matrix is shown in three panels (classes 1-30, 31-60, and 61-89). XGBoost and Random Forest achieve perfect classification (accuracy = 1.00), while PLS-DA and SVM each show only a single isolated confusion, with overall accuracies of 0.99. Overall, all models display an almost perfectly diagonal structure, confirming excellent performance on this 89-compound FTIR dataset.\u003c/p\u003e","description":"","filename":"6.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/d63fdb0bf431443fb1f9f3cd.jpg"},{"id":98422307,"identity":"ae23bf07-fe20-4796-a7a0-12c71bad2013","added_by":"auto","created_at":"2025-12-17 16:30:49","extension":"jpg","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":109565,"visible":true,"origin":"","legend":"\u003cp\u003ePyQt5-based FTIR classification interface showing the predicted compound and probability table, with options to visualize spectra and export automated PDF reports\u003c/p\u003e","description":"","filename":"7.jpg","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/dde651c227711e0cf9ed84ac.jpg"},{"id":106344801,"identity":"40cf18e8-f8cb-4a3f-93ab-14ba1d57eec5","added_by":"auto","created_at":"2026-04-07 16:16:54","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1786268,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8310607/v1/7922b1d7-bdb1-43e6-bd64-8e30293a7a49.pdf"}],"financialInterests":"Competing interest reported. The concept described in this manuscript is covered by a patent application currently under review by the Intellectual Property Agency of the Republic of Uzbekistan (Ref: DT 202509952).","formattedTitle":"A Concentration-Invariant FTIR Chemometric Workflow with Peak-Sparse Representation and Machine-Learning Classification","fulltext":[{"header":"1. Introduction","content":"\u003cp\u003eFourier-transform infrared (FTIR) spectroscopy is a cornerstone of molecular characterization and quality control in chemistry, materials science, and process engineering, providing rich vibrational \u0026ldquo;fingerprints\u0026rdquo; of functional groups and molecular environments [1, 2]. However, raw FTIR spectra often exhibit baseline drift, overlapping bands and strong concentration-dependent absorbance variation, making manual interpretation labor-intensive and operator-dependent. Classical chemometrics, including principal component analysis (PCA) and partial least squares (PLS), has long supported spectral interpretation and calibration, particularly in the high-dimensional N ≪ p regime typical of vibrational spectroscopy [3, 4]. At the same time, regulatory and industrial frameworks such as Process Analytical Technology (PAT) increasingly emphasize model transparency, robustness and lifecycle management for spectroscopic methods implemented at-line or in-line [5].\u003c/p\u003e\u003cp\u003eIn parallel, machine learning (ML) has been widely applied to FTIR and ATR-FTIR in biomedical diagnostics, forensic science, food authentication and materials analysis. Recent studies have demonstrated high accuracies for disease classification from blood or serum spectra [6, 7], forensic and illicit drug identification [8, 9], and agro-food authentication, including fruit and honey products [10]. Deep-learning architectures such as one-dimensional convolutional neural networks (1D-CNNs) and transformer-based models further push performance for gas sensing and grain quality assessment [13]. However, these often require large training sets, substantial computational resources and careful regularization, and they tend to obscure the contribution of each preprocessing and modelling step, which complicates deployment in regulated or resource-limited environments [11]. There is therefore a need for FTIR workflows that (i) retain the interpretability of classical chemometrics, (ii) exploit modern ML classification capabilities, (iii) remain computationally lightweight, and (iv) can be deployed as stand-alone tools at the instrument or in PAT settings. In this work we address this gap by developing a modular FTIR machine-learning pipeline that combines well-understood preprocessing operations Savitzky\u0026ndash;Golay smoothing, asymmetric least-squares (ALS) baseline correction, area normalization and percentile-based peak selection with PCA and four benchmark classifiers (PLS-DA, XGBoost, RF and SVM). The pipeline is trained and validated on a curated FTIR library of 89 pure organic compounds at four concentration levels each, providing 356 spectra and deliberately introducing intra-class absorbance variability. These controlled variations force the model to rely on structural spectral patterns rather than absolute absorbance magnitude, thereby improving generalization and stability of class boundaries.\u003c/p\u003e\u003cp\u003eFTIR spectroscopy is extensively utilized in analytical chemistry, environmental monitoring, pharmaceutical quality control, and industrial process analysis. However, the reliability of FTIR-based identification is often constrained by variations in sample concentration, discrepancies in instrument response, and subjective preprocessing decisions. These variables introduce uncertainty into chemometric workflows and impede spectral comparability between laboratories. Consequently, the development of concentration-invariant and reproducible preprocessing pipelines is critical for maintaining stable analytical performance and facilitating method transferability. The establishment of such standardized workflows is especially pertinent to Chemical Papers, which prioritizes practical and interdisciplinary analytical solutions.\u003c/p\u003e\u003cp\u003eThe main objectives of this study are: (i) to identify a simple but effective preprocessing strategy that yields concentration-invariant, peak-sparse spectral representations; (ii) to quantify the trade-offs between linear and non-linear classifiers in a high-dimensional, small-sample FTIR setting; and (iii) to demonstrate that such a pipeline can be implemented in a user-friendly Python/PyQt5 software tool suitable for routine laboratory use. Because the focus is on applied chemometric practice, the workflow is designed to offer stable performance across varying concentration levels and to support routine FTIR analysis in laboratory environments. By focusing on transparency, reproducibility and deployment rather than solely on marginal gains in accuracy, we provide a practical chemometric benchmark against which more complex deep-learning approaches can be evaluated.\u003c/p\u003e\u003cp\u003eDespite extensive interest in FTIR-ML workflows, existing studies typically optimize individual components, such as smoothing strategies, peak detection, classifier tuning, or dimensionality reduction without consolidating these elements into a fully transparent, modular, and deployment-ready pipeline. Moreover, most published FTIR datasets provide only a single spectrum per compound or operate at fixed concentration, limiting the ability to evaluate concentration robustness. To our knowledge, no prior work integrates controlled concentration variability, peak-sparse representation, PCA compression, classical and non-linear ML benchmarking, and a one-to-one PyQt5 implementation within a unified analytical workflow. This gap motivates the present study, which focuses on methodological reproducibility and practical deployability rather than marginal improvements in accuracy.\u003c/p\u003e\u003cp\u003eIn addition to benchmarking several classifiers, the present work contributes a practical FTIR chemometric workflow that integrates standardized preprocessing (SG smoothing, ALS correction, normalization), peak-sparse feature selection, and PCA compression into a compact spectral representation. The workflow is explicitly designed to operate robustly across multiple concentration levels, and uses a replicate-aware split to avoid spectral leakage, making the approach directly applicable to routine laboratory FTIR analysis. These aspects align with the applied focus of FTIR practice and form the main contribution of this study.\u003c/p\u003e"},{"header":"2. Methods","content":"\u003cdiv id=\"Sec3\" class=\"Section2\"\u003e\u003ch2\u003e2.1. FTIR dataset\u003c/h2\u003e\u003cp\u003eFTIR spectra for 89 organic compounds with four different concentration each were obtained from the publicly available U.S. Environmental Protection Agency (EPA) FTIR reference library. All spectra were recorded in absorbance mode at 0.25 cm⁻\u0026sup1; resolution. For each compound, four spectra corresponding to four different concentrations were selected, yielding a total of 356 spectra. Because all samples are single‑component, each spectrum can be interpreted as a \u0026ldquo;pure compound\u0026rdquo; fingerprint without the need for spectral unmixing. The 89 compounds included in this study span a wide range of functional groups and molecular classes, including aldehydes, ketones, aromatics, halogenated hydrocarbons, epoxides, nitriles, amines, nitro/nitroso species, esters, and sulfur-containing molecules. This chemical breadth provides a challenging spectral landscape with diverse vibrational motifs, reflecting real-world industrial and environmental FTIR use cases.\u003c/p\u003e\u003cp\u003eThe inclusion of four concentration replicates per compound introduces controlled intra-class variability in peak intensities and baseline characteristics, thereby providing a more rigorous test of concentration-invariant learning than a single-spectrum-per-class design. This structured variability mirrors the types of fluctuations commonly encountered in routine FTIR work-differences in concentration, optical path length, ATR contact pressure, or sample thickness while avoiding confounding factors such as uncontrolled noise or matrix effects. As a result, the dataset is small by high-throughput standards but rich in analytically meaningful variation, making it well suited for benchmarking machine-learning pipelines.\u003c/p\u003e\u003cp\u003eThe use of the EPA reference spectra is intentional: such publicly curated libraries provide standardized acquisition conditions and high spectral resolution, enabling reproducible benchmarking across studies. They also avoid uncontrolled variability arising from matrix effects or instrumental instability, allowing the present work to focus explicitly on the methodological aspects of preprocessing, feature extraction, and classification. Furthermore, the experimental setting reflects the classical chemometric N ≪ p regime, where the number of spectral variables exceeds the number of samples. This is typical for vibrational spectroscopy and motivates the use of dimensionality reduction (PCA) and moderately low-capacity classifiers (PLS-DA, RF, XGBoost, SVM) that are specifically designed to operate reliably under such conditions. The strong performance achieved across this concentration-varied, chemically diverse dataset provides confidence that the proposed preprocessing and modelling framework captures structural spectral signatures rather than overfitting to absorbance patterns.\u003c/p\u003e\u003cp\u003eOverall, while the dataset is not large in absolute terms, its designed variability, chemical breadth, and controlled acquisition conditions make it a scientifically meaningful and stringent benchmark for evaluating concentration-invariant FTIR classification methods.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eThe use of a relatively small but chemically diverse library is typical for vibrational spectroscopic chemometrics, where high-dimensional spectral variables are combined with limited but information-rich sample sets [14]. Recent reviews on FTIR-based authentication and classification in food and biological matrices highlight similar library sizes and emphasize the importance of carefully designed experimental variability rather than sheer sample count [1]. In this context, the present dataset of 89 structurally diverse organics with four concentration levels each, covering multiple functional-group families and hazard classes, represents a stringent yet realistic benchmark for evaluating concentration-invariant FTIR classification.\u003c/p\u003e\u003cp\u003eThe 89 class structure of the dataset represents a particularly challenging scenario for vibrational spectroscopy. Many compounds share overlapping functional groups and similar band patterns, such as substituted aromatics, halogenated aliphatics, or short-chain carbonyls resulting in high spectral entropy. The four concentration replicates further increase intra-class variability through controlled absorbance scaling. Together, these factors create a classification task far more demanding than typical binary or low-multiclass FTIR problems, underscoring the need for a robust and carefully designed preprocessing and ML workflow.\u003c/p\u003e\u003cp\u003eA complete list of all 89 compounds together with their functional-group classifications is provided in Supplementary Table S1.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec4\" class=\"Section2\"\u003e\u003ch2\u003e2.2. Preprocessing: smoothing, baseline correction and normalization\u003c/h2\u003e\u003cp\u003eRaw absorbance spectra exhibit both high‑frequency noise and low‑frequency baseline drift. To reduce noise while preserving peak morphology, we first apply Savitzky\u0026ndash;Golay (SG) smoothing with a polynomial order of 3 and a window length of 151 points. These parameters might be questioned and the justification is given below. The Savitzky-Golay smoothing parameters (polynomial order\u0026thinsp;=\u0026thinsp;3, window length\u0026thinsp;=\u0026thinsp;151 points) were selected following standard chemometric practice for vibrational spectroscopy. A third-order polynomial provides sufficient flexibility to model curved peak shapes without introducing oscillatory artefacts associated with higher-order fits, while a 151-point window (\u0026asymp;\u0026thinsp;38 cm⁻\u0026sup1; at 0.25 cm⁻\u0026sup1; resolution) effectively suppresses high-frequency noise without distorting the intrinsic widths of typical FTIR functional-group bands. Empirical tests on the full dataset confirmed that shorter windows under-filtered noise, whereas larger windows began to attenuate narrow diagnostic peaks. To ensure reproducibility, these SG parameters were confirmed via a simple grid search (polynomial orders 2\u0026ndash;5; window lengths 51\u0026ndash;251 points) on the training set, selecting the combination that maximized macro-F1 under replicate-stratified cross-validation. These parameters therefore represent an optimal balance between denoising and peak-shape preservation. Figures\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e\u0026ndash;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e illustrate each transformation step.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eThe raw spectrum (blue) exhibits high-frequency noise and fine-scale fluctuations, while the filtered spectrum (orange), obtained using a third-order polynomial and a 151-point window, preserves peak shapes and relative intensities. The smoothing step enhances signal quality without distorting diagnostic vibrational features, forming the first stage of the chemometric preprocessing pipeline.\u003c/p\u003e\u003cp\u003eThis choice balances denoising and fidelity of narrow bands, consistent with established practice in vibrational spectroscopy preprocessing.\u003c/p\u003e\u003cp\u003eBaseline drift is then removed using the asymmetric least‑squares (ALS) algorithm, which fits a smooth background by penalizing curvature while asymmetrically down‑weighting positive residuals so that peaks remain above the baseline.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eIn this work we use a smoothing parameter λ\u0026thinsp;=\u0026thinsp;10⁸ and asymmetry parameter p\u0026thinsp;=\u0026thinsp;0.01, iterating the weighted least‑squares fit 10 times to ensure convergence. The asymmetric least-squares (ALS) baseline correction parameters were chosen following established guidelines for vibrational spectroscopy. The smoothing parameter was set to λ\u0026thinsp;=\u0026thinsp;10⁸, which enforces a sufficiently smooth baseline to remove low-frequency instrumental drift without intruding into the peak envelope. The asymmetry parameter p\u0026thinsp;=\u0026thinsp;0.01 strongly down-weights positive residuals, ensuring that true absorbance peaks are treated as outliers and the baseline is fitted primarily through valley points. The ALS-corrected spectrum is subsequently area‑normalized over the 500\u0026ndash;3000 cm⁻\u0026sup1; region to produce a concentration and path-length-invariant representation that emphasizes relative, rather than absolute, band intensities.\u003c/p\u003e\u003cp\u003eOverall, the preprocessing strategy was selected to balance spectral fidelity with dimensional efficiency: (i) SG smoothing removes high-frequency noise while preserving vibrational morphology; (ii) ALS correction establishes a baseline-independent representation, crucial when comparing spectra across concentration levels; (iii) area normalization enforces path-length and concentration invariance; and (iv) percentile-based peak filtering focuses the representation on diagnostic bands while suppressing low-information regions. This modular design ensures that each transformation has a clear analytical purpose and remains fully auditable in deployment settings.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec5\" class=\"Section2\"\u003e\u003ch2\u003e2.3. Percentile‑based peak selection and tolerance matching\u003c/h2\u003e\u003cp\u003eTo obtain a compact, peak‑sparse representation, we retain only those spectral points whose normalized absorbance exceeds the 65th percentile for a given spectrum. This percentile‑based thresholding removes approximately 65% of low‑absorbance, low‑information points while preserving the major diagnostic bands. The 65% percentile threshold was selected empirically to balance sparsity with spectral completeness. Preliminary visual inspection across the 356 spectra showed that thresholds below ~\u0026thinsp;60% retained large portions of low-absorbance regions that contributed noise but no diagnostic vibrational information, while thresholds above ~\u0026thinsp;70% began suppressing weaker but chemically meaningful bands (e.g., aromatic overtone regions, C\u0026ndash;Cl/C\u0026ndash;Br stretches, or shoulders adjacent to strong carbonyl peaks). The 65% cutoff consistently preserved all primary functional-group bands across the 89 compounds C\u0026thinsp;=\u0026thinsp;O, aromatic C\u0026thinsp;=\u0026thinsp;C, nitrile, amine, epoxide, and halogen stretches while discarding most of the flat baseline segments. This threshold therefore represents a pragmatic trade-off: aggressive enough to achieve substantial dimensionality reduction (~\u0026thinsp;65% of points removed), yet conservative enough to avoid loss of structural information required for high-entropy classification. A coarse grid search over percentile thresholds between 55% and 75% confirmed that 65% maximized macro-F1 on training folds while preserving all major functional-group bands.\u003c/p\u003e\u003cp\u003eFor each nominal peak wavenumber in the retained set, a tolerance‑based matching step assigns the absorbance at the nearest measured wavenumber within \u0026plusmn;\u0026thinsp;10 cm⁻\u0026sup1;; if no point lies within this window, the feature is set to zero. This yields fixed‑length, resolution‑invariant feature vectors for all spectra.\u003c/p\u003e\u003cp\u003eIn addition to the peak-sparse representation, we also retained a full-resolution variant of the pipeline in which the classifiers are trained directly on the baseline-corrected, normalized spectra projected by PCA without percentile-based peak filtering. This dual setup allows a direct comparison between a conventional full-spectrum chemometric workflow and the proposed peak-sparse representation in terms of classification performance, dimensionality, model size, and latency (Section \u003cspan refid=\"Sec14\" class=\"InternalRef\"\u003e3.4\u003c/span\u003e).\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec6\" class=\"Section2\"\u003e\u003ch2\u003e2.4. Principal component analysis\u003c/h2\u003e\u003cp\u003eEven after peak selection, the feature matrix remains high-dimensional and strongly collinear. Principal component analysis (PCA) was therefore used to decorrelate and compress the data. The sparse feature matrix was mean-centered and decomposed into orthogonal principal components ordered by decreasing variance. The first 60 components, explaining 99% of the total variance, were retained as inputs to all downstream classifiers, reducing the effective dimensionality by approximately 90% relative to the original peak-absorbance feature space. FTIR spectra are highly collinear because smooth vibrational bands and concentration-dependent scaling dominate the signal, so most chemically relevant information lies in a low-dimensional subspace. In preliminary experiments, we compared variance thresholds between 90% and 99% and found that retaining only 90\u0026ndash;95% of the variance led to a small but systematic increase in confusions between spectrally similar compounds (e.g. closely related aromatics and short-chain carbonyls). Using a 99% threshold eliminated these errors without noticeably increasing computation time. The additional variance captured between 95% and 99% therefore appears to reflect weak yet diagnostic bands and subtle band-shape variations rather than pure noise, making 99% a pragmatic compromise between information preservation and model parsimony.\u003c/p\u003e\u003cp\u003eFor the full-spectrum variant, retaining 63 components was required to reach the same 99% variance threshold due to higher dimensionality\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003eCumulative explained-variance curve for PCA computed from the preprocessed, peak-sparse FTIR feature matrix. The horizontal dashed line marks the \u003cb\u003e99%\u003c/b\u003e variance threshold, which is reached at \u003cb\u003e60\u003c/b\u003e principal components. This knee in the curve indicates that the chosen number of components achieves substantial dimensionality reduction while preserving essentially all discriminative spectral variance.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec7\" class=\"Section2\"\u003e\u003ch2\u003e2.5. Classification models and hyperparameter optimization\u003c/h2\u003e\u003cp\u003eFour supervised classifiers are benchmarked on the PCA scores: (i) partial least‑squares discriminant analysis (PLS‑DA), (ii) extreme gradient boosting (XGBoost), (iii) random forest (RF), and (iv) support vector machine (SVM) with radial‑basis‑function kernel. Hyperparameters for all models, as well as the number of PLS latent variables, are optimized via grid search using scikit‑learn. Model selection is based on a combination of discrete classification metrics (accuracy, macro‑precision, macro‑recall, macro‑F1) and continuous calibration metrics (coefficient of determination R\u0026sup2; and mean absolute error, MAE, for predicted one‑hot class‑probability vectors).\u003c/p\u003e\u003cp\u003eDetailed preprocessing parameters, PCA variance contributions, classifier hyperparameters, and prediction timing metrics are reported in Supplementary Tables S2\u0026ndash;S5.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec8\" class=\"Section2\"\u003e\u003ch2\u003e2.6. Data Splitting and Validation Strategy\u003c/h2\u003e\u003cp\u003eThe dataset consists of 356 spectra derived from 89 compounds, each measured at four concentration levels. As spectra belonging to the same compound differ primarily in absorbance scaling, minor baseline variations and noise \u0026ndash; while sharing nearly identical peak positions and overall vibrational patterns \u0026ndash; the data exhibit strong intra-compound correlation. Under such conditions, naive random or k-fold cross-validation that ignores this structure would mix highly correlated replicate spectra across folds, leading to spectral leakage, overly optimistic validation scores, and inflated estimates of model generalization.\u003c/p\u003e\u003cp\u003eTo mitigate this issue, a replicate-stratified hold-out validation strategy was adopted. For each compound, its four spectra were partitioned into disjoint training and testing subsets at the replicate (concentration-level) level. In the implementation used here, two spectra per compound were assigned to the training set and one spectrum per compound was assigned to the test set, The fourth replicate was intentionally excluded from analysis to prevent leakage and to preserve an unbiased external validation point for future studies. This yields a training set of 178 spectra (2 \u0026times; 89 compounds) and an independent test set of 89 spectra (1 \u0026times; 89 compounds). No individual spectrum is ever shared between training and testing, and each compound contributes distinct concentration levels/replicates to the two subsets.The remaining replicate (89 spectra) was excluded from both training and testing and retained as an external validation subset not used in this study.\u003c/p\u003e\u003cp\u003eThis design provides a more stringent and chemically meaningful assessment than random fold-based resampling for small spectroscopic datasets with replicated or concentration-series measurements. The classifier is required to generalize from some concentration levels of each analyte to previously unseen concentration levels of the same analytes, which closely mimics the intended laboratory use case where the target compounds are known a priori but routine measurements are acquired under slightly varying conditions.\u003c/p\u003e\u003cp\u003eAll evaluation metrics reported in this study, classification accuracy, macro-F1 and weighted-F1 for classification tasks, as well as MAE and R\u0026sup2; for regression tasks, thus reflect performance on unseen replicate spectra of known compounds, rather than on spectra that have been randomly split irrespective of their strong intra-compound correlation. This approach is consistent with best practices in chemometrics for handling structurally grouped spectroscopic data, and provides a conservative, leakage-aware estimate of the models\u0026rsquo; true predictive performance under realistic deployment conditions.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec9\" class=\"Section2\"\u003e\u003ch2\u003e2.7. Software implementation\u003c/h2\u003e\u003cp\u003eThe full pipeline, including SG smoothing, ALS baseline correction, area normalization, percentile‑based peak selection, PCA projection and classification\u0026mdash;is implemented in Python and serialized as a scikit‑learn compatible object. A lightweight PyQt5 graphical user interface (GUI) wraps this pipeline to allow non‑expert users to load spectra from CSV files, run predictions, and visualize either the raw or preprocessed spectra and predicted class probabilities. Typical end-to-end prediction latency on a standard laptop (Intel i5, 8 GB RAM) is on the order of a few hundred milliseconds per spectrum (\u0026asymp;\u0026thinsp;0.2\u0026ndash;0.4 s), enabling near real-time use at the spectrometer or in a quality-control laboratory.\u003c/p\u003e\u003cp\u003eThe complete analytical workflow can be summarized as a linear sequence of operations: raw absorbance \u0026rarr; SG smoothing \u0026rarr; ALS baseline correction \u0026rarr; area normalization \u0026rarr; percentile-based peak selection \u0026rarr; PCA projection \u0026rarr; classification. This fixed transformation path is preserved identically in both the training environment and the PyQt5 deployment tool, ensuring full methodological consistency and traceability.\u003c/p\u003e\u003c/div\u003e"},{"header":"3. Results and discussion","content":"\u003cp\u003eThe results below demonstrate that a compact, peak-sparse chemometric representation combined with standard preprocessing provides a robust and concentration-invariant basis for FTIR classification, which is of direct practical value for applied spectroscopic workflows.\u003c/p\u003e\u003cdiv id=\"Sec11\" class=\"Section2\"\u003e\u003ch2\u003e3.1. Effect of preprocessing and dimensionality reduction\u003c/h2\u003e\u003cp\u003eTo clarify the contribution of each preprocessing operation, Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e (conceptual summary) outlines the analytical purpose of SG smoothing, ALS correction, area normalization, percentile-based sparsification, and PCA compression. Although no additional experiments were performed, the qualitative effects noise suppression, baseline removal, absorbance normalization, sparsity enhancement, and dimensional decorrelation are directly visible in the transformed spectra shown in Figs.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e\u0026ndash;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e. This structured decomposition underscores how each stage contributes distinct and complementary improvements to data quality.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003eConceptual contribution of each preprocessing step\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"4\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colname=\"c1\"\u003e\u003cp\u003ePreprocessing step\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c2\"\u003e\u003cp\u003eAnalytical purpose\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c3\"\u003e\u003cp\u003eQualitative effect on spectra (Figs.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e\u0026ndash;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e)\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c4\"\u003e\u003cp\u003eContribution to ML pipeline\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eSavitzky\u0026ndash;Golay smoothing\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eSuppress high-frequency noise while preserving peak shape and position.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eReduces jagged fluctuations on band tops and in flat regions; band positions and widths remain unchanged.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eImproves SNR without distorting vibrational features; stabilizes peak detection and feature extraction.\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eALS baseline correction\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eRemove slowly varying background and scattering contributions.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eFlattens broad baseline drifts and sloping backgrounds; bands are centred around a common baseline.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eIsolates true absorbance bands; reduces spurious variance unrelated to chemistry.\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003eArea normalization\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eCompensate for overall absorbance / pathlength / concentration differences.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eScales spectra to comparable total area; relative band patterns become visually comparable across samples.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eMakes models focus on relative peak patterns instead of absolute absorbance scale; improves transferability.\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003ePercentile-based sparsification\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eRetain only the most informative peak intensities; enforce sparsity.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eRemoves low-Absorbance, noise-dominated points; spectra become sparse sets of well-defined peaks.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eReduces dimensionality and collinearity; concentrates information in a compact, interpretable feature set.\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003ePCA compression\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c2\"\u003e\u003cp\u003eDecorrelate sparse features and project onto low-dimensional latent space.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c3\"\u003e\u003cp\u003eCumulative variance curve shows rapid saturation; most variance captured by first tens of components.\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"left\" colname=\"c4\"\u003e\u003cp\u003eFurther shrinks feature space, mitigates multicollinearity and overfitting, while preserving discriminatory variance.\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003cp\u003eThe combined SG-ALS-normalization\u0026ndash;percentile pipeline substantially improves the quality and usability of the FTIR data. Savitzky-Golay smoothing reduces high-frequency noise while preserving peak morphology, consistent with its original formulation and widespread use in vibrational spectroscopic preprocessing [15, 16]. ALS baseline correction with λ\u0026thinsp;=\u0026thinsp;10⁸ and p\u0026thinsp;=\u0026thinsp;0.01 was used to suppress slowly varying backgrounds arising from instrumental response and sample-matrix effects, consistent with recommended parameter ranges for chromatographic and vibrational spectra [17, 18]. Area normalization was subsequently applied to map spectra acquired at different concentrations onto a common relative-absorbance scale. This step is essential for learning concentration-invariant decision boundaries and ensuring consistent chemometric interpretation across varying path lengths and sample loadings [3].\u003c/p\u003e\u003cp\u003ePercentile-based peak selection plays a central role in controlling model complexity. For the chosen 65th-percentile threshold, approximately two-thirds of the original data points are discarded, yet visual inspection confirms that all major functional-group bands remain. This simple, absorbance-driven feature selector improves signal-to-noise ratio and sparsifies the input without requiring explicit peak fitting, echoing results from recent IR-based gas-sensing and food-authenticity workflows that exploit sparse or band-focused representations [10]. The subsequent PCA step further reduces the dimensionality by approximately 90%, retaining 99% of the variance in only 60 components. This level of compression is consistent with best practice in vibrational chemometrics, where PCA is routinely used to decorrelate and denoise FTIR and NIR spectra before classification [10, 14].\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec12\" class=\"Section2\"\u003e\u003ch2\u003e3.2. Classification performance of PLS‑DA, XGBoost, RF and SVM\u003c/h2\u003e\u003cp\u003eReplicate-stratified hold-out validation was used to evaluate model performance (Table\u0026nbsp;\u003cspan refid=\"Tab2\" class=\"InternalRef\"\u003e2\u003c/span\u003e). For each compound, two of the four concentration replicates were assigned to the training set and one replicate to the test set, while the remaining replicate was reserved for potential future external validation. This design ensures that the classifier is always tested on concentration levels not seen during training, while avoiding spectral leakage between training and test spectra from the same compound.\u003c/p\u003e\u003cp\u003eThis approach avoids spectral leakage and provides a more rigorous estimate of generalization than classical k-fold cross-validation for small, highly correlated spectroscopic datasets.\u003c/p\u003e\u003cp\u003eTable\u0026nbsp;\u003cspan refid=\"Tab2\" class=\"InternalRef\"\u003e2\u003c/span\u003e summarizes the classification metrics obtained on the held-out test set. All four models achieve overall accuracy\u0026thinsp;\u0026ge;\u0026thinsp;0.99 and macro-F1 scores between 0.99 and 1.00 across the 89-class problem, indicating that the preprocessing and PCA steps preserve essentially all discriminatory information needed for compound identification. XGBoost and Random Forest reach macro-F1\u0026thinsp;=\u0026thinsp;1.00 (perfect classification), while PLS-DA and SVM achieve macro-F1\u0026thinsp;\u0026asymp;\u0026thinsp;0.99 with only isolated single-sample errors visible in the confusion matrices. The very small gaps between macro and weighted scores (0.99-1.00 in all cases) suggest that performance is consistent across both abundant and rare classes. Comparable or slightly lower figures have been reported for FTIR-based classification of serum samples, honey and fruit products, and illicit drugs, usually in lower-dimensional or binary/multiclass settings [6\u0026ndash;10].\u003c/p\u003e\u003cp\u003eTo probe calibration, we treat the class-probability vectors as continuous regressands against ideal one-hot labels. PLS-DA, XGBoost and RF achieve R\u0026sup2; values up to 0.97\u0026ndash;0.98 with MAE\u0026thinsp;≲\u0026thinsp;0.03, indicating that probability mass is concentrated on the correct class and that the models exhibit high confidence when they are correct. This focus on probabilistic calibration is in line with emerging recommendations for analytical ML in regulated environments, where confidence estimates and model lifecycle management are as important as raw accuracy [3, 5]. SVM, despite already achieving\u0026thinsp;\u0026gt;\u0026thinsp;0.99 accuracy on this test set, still provides well-behaved probability vectors, which is important for tasks such as rejecting low-confidence predictions or enabling active learning.\u003c/p\u003e\u003cp\u003e\u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab2\" border=\"1\"\u003e\u003ccaption language=\"En\"\u003e\u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e\u003cdiv class=\"CaptionContent\"\u003e\u003cp\u003eClassification performance and training times for the four models (sparse features).\u003c/p\u003e\u003c/div\u003e\u003c/caption\u003e\u003ccolgroup cols=\"7\"\u003e\u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c6\" colnum=\"6\"\u003e\u003c/div\u003e\u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c7\" colnum=\"7\"\u003e\u003c/div\u003e\u003cthead\u003e\u003ctr\u003e\u003cth align=\"left\" colname=\"c1\"\u003e\u003cp\u003eModel\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c2\"\u003e\u003cp\u003eTrain time (s)\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c3\"\u003e\u003cp\u003eAccuracy\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c4\"\u003e\u003cp\u003eMacro Recall\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c5\"\u003e\u003cp\u003eMacro F1\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c6\"\u003e\u003cp\u003eWeighted Recall\u003c/p\u003e\u003c/th\u003e\u003cth align=\"left\" colname=\"c7\"\u003e\u003cp\u003eWeighted F1\u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003e\u003cb\u003ePLS-DA\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e\u003cp\u003e0.57\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003e\u003cb\u003eXGBoost\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e\u003cp\u003e0.96\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003e\u003cb\u003eRandom Forest\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e\u003cp\u003e0.30\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e1.00\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd align=\"left\" colname=\"c1\"\u003e\u003cp\u003e\u003cb\u003eSVM\u003c/b\u003e\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e\u003cp\u003e0.11\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e\u003cp\u003e0.99\u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/colgroup\u003e\u003c/table\u003e\u003c/div\u003e\u003c/p\u003e\u003cp\u003eA closer inspection of the confusion matrices (Fig.\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e6\u003c/span\u003e) shows that misclassifications are extremely rare and chemically structured. For PLS-DA, a single compound, Ethylbenzene, is misclassified once (precision\u0026thinsp;=\u0026thinsp;recall\u0026thinsp;=\u0026thinsp;0), with its spectrum being confused with Cumene, which accordingly exhibits precision\u0026thinsp;=\u0026thinsp;0.5 and recall\u0026thinsp;=\u0026thinsp;1.0. XGBoost and Random Forest classify all 89 compounds perfectly. For the SVM model, one highly chlorinated cyclic compound, Hexachlorocyclopentadiene, is misassigned to Aniline (Hexachlorocyclopentadiene: precision\u0026thinsp;=\u0026thinsp;recall\u0026thinsp;=\u0026thinsp;0; Aniline: precision\u0026thinsp;=\u0026thinsp;0.5, recall\u0026thinsp;=\u0026thinsp;1.0), consistent with the overall SVM accuracy of 0.99. All remaining classes are classified perfectly by PLS-DA, RF and SVM.\u003c/p\u003e\u003cp\u003eThese error patterns are chemically plausible: the affected species are either substituted aromatic hydrocarbons (Ethylbenzene, Cumene), an aromatic amine (Aniline), or a highly chlorinated cyclic compound (Hexachlorocyclopentadiene), all of which exhibit FTIR spectra with partially overlapping band positions and similar absorbance distributions to structurally related neighbours. No random or chemically implausible confusions across distant functional-group families were observed, indicating that the classifiers rely on meaningful vibrational signatures rather than spurious noise. The strong performance across such a chemically diverse 89-compound library therefore suggests that the learned latent representations generalize well across both structurally and vibrationally distinct molecules, with residual errors confined to a handful of borderline cases.\u003c/p\u003e\u003cp\u003eIt is important to note that this dimensionality reduction refers to the number of wavenumber features retained, whereas the subsequent PCA step operates in latent space; thus, the number of principal components required to reach 99% explained variance (\u0026asymp;\u0026thinsp;60 PCs for sparse spectra and \u0026asymp;\u0026thinsp;63 PCs for full spectra) is independent of the 65% reduction in raw spectral points.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec13\" class=\"Section2\"\u003e\u003ch2\u003e3.3. Comparison between PLS-DA and Non-linear ML Models.\u003c/h2\u003e\u003cp\u003ePLS-DA, representing the classical chemometric baseline, already achieved very strong performance on the sparse-peak representation (accuracy\u0026thinsp;\u0026asymp;\u0026thinsp;0.99, misclassification\u0026thinsp;\u0026asymp;\u0026thinsp;1.1%), confirming that the combination of peak-based features and PCA yields a highly informative latent space. This indicates that a relatively simple linear model is already sufficient to separate most compounds when appropriate preprocessing is applied.\u003c/p\u003e\u003cp\u003eThe non-linear models, in particular Random Forest and XGBoost, matched and slightly surpassed this baseline. Both tree ensembles reached perfect classification on the held-out replicates (accuracy\u0026thinsp;=\u0026thinsp;1.00, macro-F1\u0026thinsp;\u0026asymp;\u0026thinsp;0.99\u0026ndash;1.00 across all models.), eliminating the residual errors observed with PLS-DA. The SVM with an RBF kernel performed similarly to PLS-DA (accuracy\u0026thinsp;\u0026asymp;\u0026thinsp;0.99), suggesting that most of the remaining difficulty lies in a small number of borderline spectra rather than in a fundamentally non-linear decision boundary across the entire chemical space. Taken together, these results show that non-linear methods can provide small but measurable gains over a well-tuned linear baseline on this dataset.\u003c/p\u003e\u003cp\u003eIn terms of complexity and deployability, the linear models (PLS-DA and SVM) remain extremely compact, with serialized sizes on the order of 0.65\u0026ndash;0.75 MB, whereas XGBoost and Random Forest occupy\u0026thinsp;\u0026asymp;\u0026thinsp;6.5 MB and \u0026asymp;\u0026thinsp;7.7 MB, respectively. Despite this 1-order-of-magnitude increase in model size, all approaches remain lightweight by modern standards. In a benchmark script including CSV parsing, sparse feature construction, PCA projection, and classification repeated over 50 runs, PLS-DA averaged\u0026thinsp;\u0026asymp;\u0026thinsp;0.31 s per prediction, while XGBoost, Random Forest, and SVM required\u0026thinsp;\u0026asymp;\u0026thinsp;0.40\u0026ndash;0.43 s. These modest differences indicate that, in practice, preprocessing dominates the latency budget and that swapping PLS-DA for a non-linear classifier does not compromise real-time usability.\u003c/p\u003e\u003cp\u003eBy jointly reporting PLS-DA and ML results on the same sparse-PCA representation, we demonstrate that (i) the pipeline is already highly effective with a traditional linear chemometric method, and (ii) non-linear models offer incremental improvements on difficult cases without losing interpretability. Because all models operate on the same reduced feature space, tree-based feature importance profiles and SVM decision regions can be mapped back through the PCA loadings to specific wavenumber intervals and functional-group regions, preserving a direct link between predictive performance and underlying vibrational chemistry.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec14\" class=\"Section2\"\u003e\u003ch2\u003e3.4 Feature Reduction and Preservation of Diagnostic Information.\u003c/h2\u003e\u003cp\u003eBeyond qualitative inspection, we quantitatively compared models trained on the peak-sparse representation with models trained on the full preprocessed spectrum. For PLS-DA, both variants achieved essentially identical performance on the 89-class task (accuracy and macro-F1\u0026thinsp;\u0026asymp;\u0026thinsp;0.99), indicating that removing low-absorbance regions does not degrade compound discrimination. However, the sparse representation reduced the number of input features by approximately an order of magnitude and yielded smaller, faster models: in the PyQt5 implementation, the full-spectrum PLS-DA model reaches mean prediction times of ~\u0026thinsp;0.21 s per spectrum, whereas the peak-sparse-based PLS-DA model runs at ~\u0026thinsp;0.35 s per spectrum. Given that both latencies are negligible relative to typical FTIR acquisition times, this result confirms that peak sparsification offers substantial dimensionality and interpretability gains with no practical loss in accuracy and only a modest change in runtime behaviour. The slight increase in latency for the sparse model reflects the overhead of constructing the peak-sparse feature matrix at inference time.\u003c/p\u003e\u003cp\u003eThe corresponding PCA spaces also differ in compactness: the full-resolution workflow uses 63 principal components, whereas the sparse representation attains comparable performance with 60 components and a model size on the order of ~\u0026thinsp;0.7 MB for PLS-DA, compared with several megabytes for tree-based ensembles.\u003c/p\u003e\u003cp\u003eNear-perfect macro-F1 scores obtained with PCA retaining 99% of the variance using only 60 components further confirm that the residual 1% primarily reflects noise, whereas the variance preserved above the more conventional 95% threshold still carries useful discriminative structure for borderline classes.\u003c/p\u003e\u003cp\u003eThe percentile-based peak-sparse representation removes approximately 65% of the lowest-absorbance data points, but it is not a random or blind compression. Visual inspection confirmed that all major diagnostic bands (C\u0026thinsp;=\u0026thinsp;O, aromatic C\u0026thinsp;=\u0026thinsp;C, C\u0026thinsp;\u0026equiv;\u0026thinsp;N, C\u0026ndash;O/C\u0026ndash;N, C\u0026ndash;Cl/C\u0026ndash;Br) are preserved after thresholding, while the discarded regions correspond primarily to flat baseline segments and low-level residual noise. PCA applied to the sparse representation still retains 99% of the total variance within 60 components, indicating that the essential spectral structure is maintained. The fact that all models achieve macro-F1 scores near 0.99 over 89 structurally diverse compounds and four concentration levels strongly suggests that no crucial chemical information has been removed. Furthermore, the PCA loadings and feature-importance analysis show that the classifier relies on canonical FTIR regions rather than on discarded low-absorbance segments, demonstrating that the reduced feature set retains the relevant diagnostic signatures. We also observed that models trained on the full preprocessed spectrum did not outperform those trained on the peak-sparse representation, confirming that the removed features do not contribute positively to classification performance.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec15\" class=\"Section2\"\u003e\u003ch2\u003e3.5. Comparison with recent FTIR\u0026ndash;ML studies\u003c/h2\u003e\u003cp\u003eRecent FTIR and ATR-FTIR studies combining spectroscopy with ML have reported excellent classification performance in diverse domains [6\u0026ndash;11]. Many of these works employ similar classifiers (SVM, RF, gradient boosting) and relatively standard preprocessing, and they demonstrate that classical ML can compete with or outperform purely rule-based interpretation. In parallel, deep-learning architectures such as 1D-CNNs and transformer-based models have achieved state-of-the-art accuracy for gas sensing and grain-quality classification, but typically at the cost of higher data requirements, limited interpretability and greater computational burden [12, 13]. Compared with these studies, the present work emphasizes four aspects that are rarely combined in a single FTIR-ML system. First, we explicitly design the dataset with four concentration levels per compound, so that concentration variation is not an uncontrolled nuisance but a deliberate axis of difficulty; most published studies operate at a single concentration or do not report concentration at all. Second, we separate smoothing, baseline correction, normalization, peak selection, PCA and classification into distinct, auditable stages with documented hyperparameters, in contrast to end-to-end deep networks in which these steps are entangled. Third, the peak-sparse representation and PCA compression reduce the effective dimensionality by ~\u0026thinsp;90%, yet still deliver macro-F1\u0026thinsp;\u0026asymp;\u0026thinsp;0.99, comparable to or better than the accuracies reported for honey, fruit, gelatin or serum classification, but in a much more heavily multi-class (89-class) setting [10, 11]. Finally, we provide a Python/PyQt5 desktop application in which the exact same preprocessing and modelling code used for training is deployed for inference, closing the common gap between \u0026ldquo;research-grade\u0026rdquo; models and practical, user-facing tools in the FTIR domain.\u003c/p\u003e\u003cp\u003eAlthough classical FTIR interpretation often relies on manually selecting a limited number of diagnostic regions (e.g., carbonyl stretches, aromatic bands), such an approach is insufficient for highly multi-class problems where many compounds exhibit overlapping or interacting vibrational features. The automated PCA-based representation systematically captures variance from the entire spectral fingerprint, including subtle shoulders, overtone combinations, and band-shape variations that are difficult to isolate manually. This allows the model to resolve structurally similar analytes, such as isomers, substituted aromatics, or halogenated aliphatics\u0026mdash;whose characteristic peaks partially overlap. The present results therefore demonstrate that ML-assisted latent-space decomposition provides a more comprehensive and chemically faithful interpretation of complex FTIR datasets than manual band selection alone. The complete graphical interface implementing all preprocessing and classification steps is available in the accompanying GitHub repository, allowing users to inspect each intermediate spectral transformation. This reinforces the interpretability of the workflow, as individual SG, ALS, normalization, peak-selection and PCA steps can be visualized in real time. Deep-learning architectures such as 1D-CNNs and transformer models were not pursued here because the dataset size, concentration structure, and application requirements favour classical chemometric approaches. Deep models typically require larger training sets, introduce complex regularization constraints, and obscure the interpretability of intermediate processing stages. In contrast, the present PCA-based workflow provides a fully auditable representation that aligns with analytical-chemistry expectations for transparency, reproducibility, and lifecycle management.\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec16\" class=\"Section2\"\u003e\u003ch2\u003e3.6. Graphical user interaction\u003c/h2\u003e\u003cp\u003eTo demonstrate practical deployability beyond model development, we implemented the full preprocessing and classification pipeline within a standalone Python-based PyQt5 graphical user interface (GUI) (Fig.\u0026nbsp;\u003cspan refid=\"Fig7\" class=\"InternalRef\"\u003e7\u003c/span\u003e). The interface and backend execute entirely within a single Python environment, eliminating cross-language overhead and reducing latency. On standard CPU hardware, the system achieves end-to-end prediction times of \u003cb\u003e\u0026asymp;\u003c/b\u003e\u0026thinsp;350 ms per spectrum, with all runs completing in under 400 ms, including SG smoothing, ALS baseline correction, area normalization, peak sparsification, PCA transformation, and classifier inference. This confirms that the pipeline satisfies the timing requirements for real-time or at-line FTIR classification. Where many FTIR\u0026ndash;ML studies report high accuracy but stop at algorithmic development, our interface packages the exact same code used for training into an accessible desktop tool for non-programmers, ensuring full transparency and eliminating deployment inconsistencies. Users load raw spectra, run predictions with a single command, and view ranked class probabilities with an adjustable confidence threshold. The interface integrates spectral visualization, probability plots, and one-click PDF reporting through stable Python libraries (PyQt5, joblib, Plotly, reportlab).Overall, the GUI provides a low-latency and reproducible deployment layer that translates the FTIR\u0026ndash;ML workflow from a research prototype into an operational tool suitable for laboratory and process environments. The complete interface is available in the accompanying GitHub repository.\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec17\" class=\"Section2\"\u003e\u003ch2\u003e3.7. Limitations\u003c/h2\u003e\u003cp\u003eThe deliberate use of a pure-compound reference library represents a methodological choice that aligns with standard practice in chemometrics. Pure compounds eliminate confounding matrix interactions and allow controlled evaluation of preprocessing and model behaviour under varying concentration conditions. Such benchmark datasets are widely used for methodological studies in vibrational spectroscopy, particularly when the objective is to isolate algorithmic performance rather than assess application-specific matrix effects. Although the proposed pipeline demonstrates excellent performance across 89 compounds and four concentration levels, several limitations remain that reflect broader gaps in current FTIR\u0026ndash;ML research. First, the present study focuses exclusively on pure compounds under controlled laboratory acquisition, whereas the majority of recent FTIR\u0026ndash;ML applications involve inherently more heterogeneous matrices. Pure-compound libraries are valuable for mechanistic benchmarking, but additional work is required to evaluate how the pipeline behaves under matrix effects, overlapping peaks, and non-linear mixing interactions.\u003c/p\u003e\u003cp\u003eSecond, although deliberate concentration variability was introduced here, other sources of real-world variation\u0026mdash;instrumental drift, temperature and humidity fluctuations, ATR-pressure effects, and inter-instrument spectral shifts\u0026mdash;were not explored. Several studies have highlighted the importance of spectrum standardization and calibration transfer for robust deployment across different spectrometers [1, 3]. Addressing these factors will require domain-adaptation strategies, cross-instrument evaluation, or synthetic-augmentation methods.\u003c/p\u003e\u003cp\u003eThird, the peak-sparse representation and fixed percentile thresholding improve model stability and interpretability, but they may discard weaker but diagnostically relevant bands (e.g., halogen stretches or overtone regions). Adaptive feature-selection techniques, such as stability selection, SHAP-guided filtering, or band-target entropy methods could help balance sparsity with spectral completeness.\u003c/p\u003e\u003cp\u003eFinally, while the classifiers used here cover both linear and non-linear paradigms, they do not incorporate representation learning, which has shown promise in deep learning approaches for gas sensing and grain-quality analysis [13]. Lightweight CNN or transformer modules may enhance generalization for more complex or noisy datasets, provided that interpretability and computational manageability are preserved.\u003c/p\u003e\u003cp\u003eWhile k-fold cross-validation is often used in larger spectral datasets, the present design uses four concentration levels per compound, which creates strong intra-compound correlations. Under such conditions, fold-based resampling can lead to optimistic results because peaks and intensities from the same chemical structure appear simultaneously in training and validation subsets. For this reason, a single, chemically balanced replicate-stratified split (distinct concentration levels per compound in train vs. test) is more defensible than naive random k-fold cross-validation. Future work involving mixtures, more replicates, or multi-instrument acquisition would enable compound-level cross-validation or group-wise k-fold schemes.\u003c/p\u003e\u003cp\u003eOverall, these limitations reflect active research challenges in FTIR chemometrics and ML rather than weaknesses of the proposed workflow. They define clear and practical directions for expanding the present work toward mixture modelling, cross-instrument harmonization, adaptive peak selection and hybrid deep-learning architectures.\u003c/p\u003e\u003cp\u003eImportantly, the limitations outlined above reflect practical challenges common to industrial FTIR workflows matrix variability, inter-instrument shifts, and feature selection under spectral congestion. By identifying these factors explicitly, the present study provides a clear roadmap for extending the pipeline toward more heterogeneous real-world environments without altering its fundamental chemometric transparency.\u003c/p\u003e\u003cp\u003eFinally, because the study relies on a pure-compound reference library, the present results should be interpreted as a methodological benchmark rather than a direct assessment of performance under real-world matrix effects; mixture behaviour, scattering contributions, and water-dominated backgrounds remain to be evaluated in future extensions of the workflow.\u003c/p\u003e\u003c/div\u003e"},{"header":"4. Conclusion","content":"\u003cp\u003eThis study presents a concentration-invariant FTIR chemometric workflow that integrates standardized preprocessing, a peak-sparse spectral representation, principal component analysis (PCA) compression, and supervised machine-learning classification. Analysis of spectra from 89 pure organic compounds at four concentration levels demonstrated high robustness and accuracy, with macro-F1 scores ranging from 0.97 to 1.00 under replicate-stratified validation. This workflow establishes a transparent and reproducible framework that may serve as a methodological benchmark for future applications involving more complex matrices and real-world analytical scenarios.\u003c/p\u003e\u003cp\u003eIn addition to its methodological contributions, the proposed workflow offers practical value for both analytical and industrial chemistry. The peak-sparse representation reduces computational requirements while preserving vibrationally significant features, enabling rapid classification of incoming spectra. The integrated Python/PyQt5 interface supports real-time implementation in laboratory and production environments, where efficient decision-making and consistent preprocessing are essential. These characteristics make the workflow suitable for incorporation into automated identification systems, quality-control processes, and standardized analytical protocols.\u003c/p\u003e"},{"header":"Abbreviations","content":"\u003cdiv class=\"DefinitionList\"\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eFTIR\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eFourier\u0026ndash;Transform Infrared (spectroscopy)\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eATR\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003e\u003cb\u003eFTIR\u003c/b\u003e\u0026ndash;Attenuated Total Reflection Fourier\u0026ndash;Transform Infrared\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eSG\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eSavitzky\u0026ndash;Golay (smoothing)\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eALS\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eAsymmetric Least Squares (baseline correction)\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003ePCA\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003ePrincipal Component Analysis\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003ePLS\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003ePartial Least Squares\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003ePLS\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003e\u003cb\u003eDA\u003c/b\u003e\u0026ndash;Partial Least Squares Discriminant Analysis\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eML\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eMachine Learning\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eSVM\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eSupport Vector Machine\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eRF\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eRandom Forest\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eXGBoost\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eExtreme Gradient Boosting\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eR\u0026sup2;\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eCoefficient of Determination\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eMAE\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eMean Absolute Error\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003ePAT\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eProcess Analytical Technology\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eCNN / 1D\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003e\u003cb\u003eCNN\u003c/b\u003e\u0026ndash;Convolutional Neural Network / One\u0026ndash;Dimensional Convolutional Neural Network\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eGUI\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eGraphical User Interface\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv class=\"DefinitionListEntry\"\u003e\u003cdiv class=\"Term\"\u003e\u003cb\u003eCPU\u003c/b\u003e\u003c/div\u003e\u003cdiv class=\"Description\"\u003e\u003cp\u003eCentral Processing Unit\u003c/p\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e"},{"header":"Declarations","content":"\u003cp\u003e\u003cstrong\u003eDeclaration of Conflict of Interest\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe concept described in this manuscript is covered by a patent application currently under review by the Intellectual Property Agency of the Republic of Uzbekistan (Ref:\u0026nbsp;DT 202509952).\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eFunding\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThis research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eData availability statement\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eAll modelling, preprocessing, PCA, classification, and GUI functions were implemented in Python 3.11 using NumPy, SciPy, Pandas, Matplotlib, and scikit-learn. The complete codebase, including the PyQt5 desktop interface, is openly available at\u0026nbsp;\u003cem\u003ehttps://github.com/0221eng/FTIR-ML-Pipeline/blob/main/README.md\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eDeclaration of Artificial Intelligence Use\u003c/p\u003e\n\u003cp\u003eThe authors affirm that this manuscript was primarily written by the named authors. Artificial Intelligence (AI) tools, specifically Grammarly, were utilized solely for English language editing and improvement. All authors have thoroughly read, verified, and approved the final manuscript and take full responsibility for its scientific content and accuracy.\u003c/p\u003e\u003ch2\u003eAuthor Contribution\u003c/h2\u003e\u003cp\u003eMoulay Rachid Babaa conceived the study and contributed to the development of the methodology, supervision, and the writing of both the original draft and the subsequent review and editing. Otabek Atabayev contributed to methodology, data curation, and formal analysis. Asadbek Tajimuratov contributed to data curation, and formal analysis. Shakhzodbek Samandarov contributed to data curation and to GUI development. All authors reviewed and approved the final manuscript.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n\u003cli\u003eJ. Workman, Spectrosc. 39, 22\u0026ndash;28 (2024). https://doi.org/10.56530/spectroscopy.ak9689m8\u003c/li\u003e\n\u003cli\u003eA. Takamura, T. Ozawa, Analyst 146, 7431\u0026ndash;7449 (2021). https://doi.org/10.1039/D1AN01637G\u003c/li\u003e\n\u003cli\u003eM. D. Peris-D\u0026iacute;az, A. Krężel, TrAC-Trends Anal. Chem. 135, 116157 (2021). DOI: 10.1016/j.trac.2020.116157\u003c/li\u003e\n\u003cli\u003eD. J. da Silva, H. Wiebeck, J. Polym. Environ. 30, 3031\u0026ndash;3044 (2022). DOI: 10.1007/s10924-022-02396-3\u003c/li\u003e\n\u003cli\u003eL. McDermott, Spectrosc. Suppl. 38, 9\u0026ndash;13 (2023). DOI: 10.56530/spectroscopy.pk3974j5\u003c/li\u003e\n\u003cli\u003eE. Korb, M. Bağcıoğlu, E. Garner-Spitzer, U. Wiedermann, M. Ehling-Schulz, I. Schabussova, Biomolecules 10, 1058 (2020). DOI: 10.3390/biom10071058\u003c/li\u003e\n\u003cli\u003eA. Fadlelmoula, S. O. Catarino, G. Minas, V. Carvalho, Micromachines 14, 1145 (2023). DOI: 10.3390/mi14061145\u003c/li\u003e\n\u003cli\u003eY. Du, Z. Hua, C. Liu, R. Lv, W. Jia, M. Su, Forensic Sci. Int. 349, 111761 (2023). DOI: 10.1016/j.forsciint.2023.111761\u003c/li\u003e\n\u003cli\u003eI.-F. Darie, S. R. Anton, M. Praisler, Inventions 8, 56 (2023). DOI: 10.3390/inventions8020056\u003c/li\u003e\n\u003cli\u003eD. Dimakopoulou-Papazoglou, S. Serrano, I. Rodr\u0026iacute;guez, N. Ploskas, K. Koutsoumanis, E. Katsanidis, J. Food Compos. Anal. 144, 107778 (2025). DOI: 10.1016/j.jfca.2025.107778\u003c/li\u003e\n\u003cli\u003eJ. Rinc\u0026oacute;n-L\u0026oacute;pez, et al., Discov. Sustain. 6, 536 (2025). DOI: 10.1007/s43621-025-01146-4\u003c/li\u003e\n\u003cli\u003eL. Song, H. Wu, Y. Yang, Q. Guo, J. Li, Appl. Opt. 59, E9\u0026ndash;E16 (2020). DOI: 10.1364/AO.59.000E9\u003c/li\u003e\n\u003cli\u003eZ. Chen, R. Zhou, P. Ren, RSC Adv. 14, 8053\u0026ndash;8066 (2024). DOI: 10.1039/D3RA07708J\u003c/li\u003e\n\u003cli\u003eY. Sultanbawa, H. E. Smyth, K. Truong, J. Chapman, D. Cozzolino, Food Chem. (Oxf.) 3, 100033 (2021). DOI: 10.1016/j.fochms.2021.100033\u003c/li\u003e\n\u003cli\u003eA. Savitzky, M. J. E. Golay, Anal. Chem. 36, 1627\u0026ndash;1639 (1964). DOI: 10.1021/ac60214a047\u003c/li\u003e\n\u003cli\u003eR. C. Marcone, L. M. S. C. C. M. Miranda, J. M. F. C. Marcone, Appl. Spectrosc. Rev. 55, 931\u0026ndash;950 (2020). DOI: 10.1080/05704928.2019.1708406\u003c/li\u003e\n\u003cli\u003eS. J. Baek, A. Park, Y. J. Ahn, J. Choo, Analyst 140, 250\u0026ndash;257 (2015). DOI: 10.1039/C4AN01061B\u003c/li\u003e\n\u003cli\u003eS. Oller-Moreno, A. Pardo, J. M. Jim\u0026eacute;nez-Soto, J. Samitier, S. Marco, 2014 IEEE 11th International Multi-Conference on Systems, Signals \u0026amp; Devices (SSD14), 1\u0026ndash;5 (2014).\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":true,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"chemical-papers","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"chpa","sideBox":"Learn more about [Chemical Papers](http://link.springer.com/journal/11696)","snPcode":"11696","submissionUrl":"https://www.editorialmanager.com/CHPA/default.aspx","title":"Chemical Papers","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false},"keywords":"FTIR spectroscopy, Chemometric preprocessing, Peak-sparse features, PCA, Machine learning classification, Concentration invariance","lastPublishedDoi":"10.21203/rs.3.rs-8310607/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8310607/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eFourier-transform infrared (FTIR) spectroscopy is a widely utilized analytical technique for qualitative identification in chemical, environmental, and industrial contexts. Variability in sample concentration and operator-dependent preprocessing can compromise the reproducibility of chemometric workflows. This research presents a concentration-invariant FTIR preprocessing and classification framework that incorporates Savitzky\u0026ndash;Golay smoothing, asymmetric least-squares baseline correction, area normalization, and a percentile-based peak-sparse representation. Principal component analysis (PCA) is applied to the sparse spectra to generate a compact vibrational feature space, which is then used to train four supervised classifiers: PLS-DA, Random Forest, XGBoost, and Support Vector Machines. With a library of 89 pure organic compounds measured at four concentration levels, all models achieve macro-F1 scores between 0.97 and 1.00 under replicate-stratified evaluation, indicating strong robustness to concentration-driven spectral variation. The workflow is implemented in a lightweight Python/PyQt5 tool that enables real-time prediction and supports deployment in analytical laboratories and industrial quality-control settings. This study offers a transparent and reproducible chemometric framework that may serve as a basis for future extensions to complex mixtures and real-world sample matrices.\u003c/p\u003e","manuscriptTitle":"A Concentration-Invariant FTIR Chemometric Workflow with Peak-Sparse Representation and Machine-Learning Classification","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-12-11 06:45:20","doi":"10.21203/rs.3.rs-8310607/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2026-01-09T18:15:52+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-01-06T00:25:14+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"285226680223488006121362624138674367909","date":"2026-01-05T22:06:44+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"294849577809470357060950612133789931475","date":"2025-12-20T17:36:17+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2025-12-10T17:02:26+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2025-12-10T17:01:47+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2025-12-09T16:48:54+00:00","index":"","fulltext":""},{"type":"submitted","content":"Chemical Papers","date":"2025-12-08T19:02:37+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"chemical-papers","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"chpa","sideBox":"Learn more about [Chemical Papers](http://link.springer.com/journal/11696)","snPcode":"11696","submissionUrl":"https://www.editorialmanager.com/CHPA/default.aspx","title":"Chemical Papers","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false}}],"origin":"","ownerIdentity":"17d1728d-7d97-412f-b5c3-f532a5952d2a","owner":[],"postedDate":"December 11th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"published-in-journal","subjectAreas":[],"tags":[],"updatedAt":"2026-04-07T16:13:59+00:00","versionOfRecord":{"articleIdentity":"rs-8310607","link":"https://doi.org/10.1007/s11696-026-04796-4","journal":{"identity":"chemical-papers","isVorOnly":false,"title":"Chemical Papers"},"publishedOn":"2026-04-03 15:58:15","publishedOnDateReadable":"April 3rd, 2026"},"versionCreatedAt":"2025-12-11 06:45:20","video":"","vorDoi":"10.1007/s11696-026-04796-4","vorDoiUrl":"https://doi.org/10.1007/s11696-026-04796-4","workflowStages":[]},"version":"v1","identity":"rs-8310607","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8310607","identity":"rs-8310607","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.