Adulteration in dairy products has received world-wide attention, and at the same time, near infrared (NIR) spectroscopy has proven to be a promising tool for adulteration detection given its advantages of real-time response and non-destructive analysis. Regardless, the accurate and robust NIR model for adulteration detection is hard to achieve in practice. Convolutional neural network (CNN), as a promising deep learning architecture, is difficult to apply to such chemometrics tasks due to the high risk of overfitting, despite the breakthroughs it has made in other fields. In this paper, the ensemble learning method based on CNN estimators was developed to address the overfitting and random initialization problems of CNN and applied to the determination of two infant formula adulterants, namely hydrolyzed leather protein (HLP) and melamine. Moreover, a probabilistic wavelength selection method based on the attention mechanism was proposed for the purpose of finding the best trade-off between the accuracy and the diversity of the sub-models in ensemble learning. The overall results demonstrate that the proposed method yielded superiority regression performance over the comparison methods for both studied data sets, and determination coefficients (R2) of 0.961 and 0.995 were obtained for the HLP and the melamine data sets, respectively.
Hyperspectral imaging combined with chemometric approaches is proven to be a powerful tool for the quality evaluation and control of fruits. In fruit defect-detection scenarios, developing an unsupervised anomaly detection framework is vital, as defect sample preparation is labor-intensive and time-consuming, especially for exploring potential defects. In this paper, a spectral–spatial, information-based, self-supervised anomaly detection (SSAD) approach is proposed. During training, an auxiliary classifier is proposed to identify the projection axes of principal component (PC) images that were transformed from the hyperspectral data cubes. In test time, the fully connected layer of the learned classifier was used as a ‘spectral–spatial’ feature extractor, and the feature similarity metric was adopted as the score function for the downstream anomaly evaluation task. The proposed network was evaluated with two fruit data sets: a strawberry data set with bruised, infected, chilling-injured, and contaminated test samples and a blueberry data set with bruised, infected, chilling-injured, and wrinkled samples as anomalies. The results show that the SSAD yielded the best anomaly detection performance (AUC = 0.923 on average) over the baseline methods, and the visualization results further confirmed its advantage in extracting effective ‘spectral–spatial’ latent representation. Moreover, the robustness of SSAD is verified with the data pollution experiment; it performed significantly better than the baselines when a portion of anomalous samples was involved in the training process.
Conventional food fraud detection using hyperspectral imaging (HSI) relies on the discriminative power of machine learning. However, these approaches often assume a balanced class distribution in an ideal laboratory environment, which is impractical in real-world scenarios with diverse label distributions. This results in suboptimal performance when less frequent classes are overshadowed by the majority class during training. Thus, the critical research challenge emerges of how to develop an effective classifier on a small-scale imbalanced dataset without significant bias from the dominant class. In this paper, we propose a novel nondestructive detection approach, which we call the Dice Loss Improved Self-Supervised Learning-Based Prototypical Network (Proto-DS), designed to address this imbalanced learning challenge. The proposed amalgamation mitigates the label bias on the most frequent class, further improving robustness. We validate our proposed method on three collected hyperspectral food image datasets with varying degrees of data imbalance: Citri Reticulatae Pericarpium (Chenpi), Chinese herbs, and coffee beans. Comparisons with state-of-the-art imbalanced learning techniques, including the Synthetic Minority Oversampling Technique (SMOTE) and class-importance reweighting, reveal our method’s superiority. Notably, our experiments demonstrate that Proto-DS consistently outperforms conventional approaches, achieving the best average balanced accuracy of 88.18% across various training sample sizes, whereas the Logistic Model Tree (LMT), Multi-Layer Perceptron (MLP), and Convolutional Neural Network (CNN) approaches attain only 59.42%, 60.38%, and 66.34%, respectively. Overall, self-supervised learning is key to improving imbalanced learning performance and outperforms related approaches, while both prototypical networks and the Dice loss can further enhance classification performance. Intriguingly, self-supervised learning can provide complementary information to existing imbalanced learning approaches. Combining these approaches may serve as a potential solution for building effective models with limited training data.
In recent years, domain generalization-based fault diagnosis (DGFD) methods have shown significant potential in rotating machinery fault diagnosis in unseen target domains. However, these methods focus on learning domain-invariant representations via feature distribution adaptation. The generalization of classifiers and the orthogonality between fault-related and domain-related features have not been thoroughly explored, which hinders further improvements in DGFD performance. To address these limitations, an episodic training and feature orthogonality-driven domain generalization (EODG) method is proposed. In this method, episodic training is introduced to jointly improve the generalization capabilities of both the feature extractor and fault classifier, while a novel feature transfer loss is proposed for learning domain-invariant representations. Furthermore, the orthogonality between fault-related and domain-related features is enhanced by minimizing their cosine similarity, thereby improving the generalization capability of the DGFD model. The experimental results validated the effectiveness and superiority of the proposed method on domain generalization-based fault diagnosis tasks.