# Semi-Quantitative Detection of Borax Adulteration in Wheat Flour Based on Microwave Non-Destructive Testing and Machine Learning

**Authors:** Mei Kang, Jiming Yang, Ya Ren, Xue Bai

PMC · DOI: 10.3390/foods15061107 · 2026-03-23

## TL;DR

This paper introduces a new method using microwave testing and machine learning to detect and measure borax contamination in wheat flour, offering a fast and non-destructive food safety solution.

## Contribution

A novel hybrid Random Forest-Whale Optimization Algorithm is proposed for semi-quantitative borax detection in wheat flour using microwave data.

## Key findings

- The method achieved 94.6% classification accuracy and a macro F1 score of 0.95.
- It reduced the feature space from 1800 to 200 dimensions without losing performance.
- The system had 100% recall for undiluted samples and no false negatives for adulterated ones.

## Abstract

The adulteration of wheat flour with borax poses a serious food safety risk, yet conventional rapid non-destructive screening methods remain limited. This study developed a machine learning-based microwave non-destructive semi-quantitative detection method for identifying borax adulteration in wheat flour. Using a proprietary microwave detection system, which acquires broadband frequency-domain amplitude attenuation and phase shift responses in the 2.5–11.5 GHz band, amplitude attenuation spectra and dimensional phase offset spectra were obtained from 155 samples prepared at three adulteration levels (0%, 0.1–0.9%, 1–5%). These samples simulated real-world adulteration scenarios. To address high-dimensionality and class imbalance, a hybrid Random Forest-Whale Optimization Algorithm (RF-WOA) was employed to synergistically optimize feature selection and model hyperparameters. Through hierarchical repeated validation and macro-level metric evaluation, this approach achieved an overall classification accuracy of 94.6% and a macro F1 score of 0.95 while compressing the original 1800-dimensional feature space to approximately 200 effective features. Confusion matrix analysis indicates 100% recall for undiluted samples, with misclassifications primarily occurring between adjacent adulteration levels and no false negatives introduced for adulterated samples. These results demonstrate that microwave sensing combined with the RF-WOA provides a rapid, non-destructive, and robust preliminary screening and grading evaluation strategy for borax adulteration in wheat flour, exhibiting significant potential in food safety monitoring and regulatory inspection.

## Linked entities

- **Chemicals:** borax (PubChem CID 16211214)

## Full-text entities

- **Chemicals:** Borax (MESH:C018851)

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/PMC13025253/full.md

---
Source: https://tomesphere.com/paper/PMC13025253