Overview
Bringing a new herbicide to market takes up to 12 years and around $300 million.1 Part of that is screening: working out a compound's mode of action, the plant process it shuts down, which means a separate biochemical assay for each one, taking days to weeks.
Raman spectroscopy reads a chemical fingerprint off a leaf in about a minute, without harming it.2 The changes a herbicide causes are far too subtle to spot by eye, so with Syngenta we tested whether machine learning could pick them out.
This was an 11-week project for a team of six, split into data collection, spectral preprocessing and machine learning. My role was the machine-learning pipeline: turning cleaned spectra into predictions, from dimensionality reduction through to the classifiers and how they were validated. The code is on GitHub.
Methods
Plants and treatments
Syngenta grew two weeds, Italian ryegrass (Lolium multiflorum, a grass) and redroot pigweed (Amaranthus retroflexus, a broadleaf), and treated them with three herbicides, each blocking a different process in the plant:
- Bromoxynil inhibits PSII, a key step of photosynthesis.3
- Cyhalofop inhibits ACCase, which the plant needs to make fats.4
- Norflurazon inhibits PDS, which the plant needs to make carotenoids, the pigments that protect it from light.5
Each was sprayed at three doses, aimed at 20%, 50% and 80% damage, and two plants of each species were left untreated as controls.
| Trt | Herbicide | Mode of action | Rate (g a.i./ha) | Target damage | Scanned |
|---|---|---|---|---|---|
| 1 | Bromoxynil | PSII | 20 | 20% | |
| 2 | 100 | 50% | |||
| 3 | 500 | 80% | |||
| 4 | Cyhalofop | ACCase | 20 | 20% | |
| 5 | 100 | 50% | |||
| 6 | 500 | 80% | |||
| 7 | Norflurazon | PDS | 12 | 20% | |
| 8 | 60 | 50% | |||
| 9 | 300 | 80% |
The 80% plants were left out: they were already dying back, and dead tissue gives a spectrum that says nothing about the mode of action. PSII-treated broadleaf plants weren't scanned for lack of time.
Measurements
Spectra were taken on an inVia confocal Raman microscope with a 785 nm laser, chosen to keep the leaves' own fluorescence down: 6 s exposures, 6 accumulations, 5 mW, at eight spots per leaf and seven leaves per plant.
Preprocessing
Each spectrum had cosmic-ray spikes removed,6 its fluorescent background subtracted (asymmetric least squares),7 its noise smoothed (Savitzky–Golay)8 and its scale normalised (standard normal variate),9 so the model compares the shape of the peaks rather than how bright the leaf happened to be.

The four stages on parlour palm spectra: raw, background removed, smoothed and normalised. Afterwards the three plants look almost identical by eye.
Machine-learning pipeline
Each cleaned spectrum is 1,090 intensities, one per wavenumber, labelled with its leaf type and treatment. All spectra were first interpolated onto a common 1 cm⁻¹ grid, so those from different measurement runs line up. From there:
cleaned spectra ~1,000 values each
└▶ PCA ~100 PCs
└▶ Layer 1 grass or broadleaf? ~10 LVs
└▶ Layer 2 which mode of action? ~10 LVs, one model per leaf type
1. Dimensionality reduction (PCA). The 1,090 values are highly correlated, since each Raman band spans several neighbouring wavenumbers, and there are far more of them than spectra, so a classifier fitted on them directly would overfit. After standardising each wavenumber, PCA re-expresses the spectra as principal components (PCs):10 uncorrelated combinations of wavenumbers, ordered by how much of the variance they explain. The smallest set of PCs explaining 95% of the variance was kept, between 78 and 121 depending on the subset, and each PC's loadings show which wavenumbers, and so which bands, it draws on.
2. Classification (PLS-DA). PCA ignores the labels, so its leading PCs capture the most variance, not necessarily the variance that separates the targets. PLS-DA is the supervised step: it builds latent variables (LVs), the combinations of PCs that covary most strongly with the class labels, and assigns each spectrum to the class with the highest predicted score. It copes well with correlated inputs and small sample sizes, which makes it a standard method for spectra.11
3. Hierarchical classification. The difference between species outweighs the difference between treatments, and the classes differ too (no PSII-treated broadleaf), so one flat model would spend its LVs telling species apart. Layer 1 therefore predicts the leaf type (98.4% accurate), and each spectrum then goes into a 2nd layer trained on that species alone, which predicts the mode of action.
4. Validation. All results come from stratified 5-fold cross-validation,12 which keeps the class proportions the same in every fold; the classes are imbalanced, with 200 PSII grass spectra against 40 ACCase. The number of LVs was chosen the same way, by picking the value with the best mean cross-validated accuracy, at around ten: fewer LVs underfit, more start fitting leaf-to-leaf variation.
Before Syngenta's plants arrived, the pipeline was tested on a parlour palm that was untreated, kept in the dark or sprayed with Roundup. It told them apart 84.5% of the time.

The trial run: each point is one spectrum, placed by the model's first two latent variables. The three groups separate well.
Results
- Grass or broadleaf: 98.4% accuracy.
- Mode of action: 82.7% for the grass (479 spectra), 72.4% for the broadleaf (192 spectra).


Confusion matrices for the grass (top) and broadleaf (bottom). Each row is the true treatment and each column the model's guess, so everything on the diagonal is right.
The F1 score combines how often the model is right when it names a class with how many of that class it finds, from 0 to 1:
| Mode of action | Grass F1 | Broadleaf F1 | Why |
|---|---|---|---|
| PSII | 0.87 | not scanned | Visibly cuts the chlorophyll and carotenoid peaks |
| Control | 0.89 | 0.74 | Healthy leaves give a consistent fingerprint13 |
| PDS | 0.61 | 0.77 | Drought and poor nutrition move the same carotenoid peaks14 |
| ACCase | 0.71 | 0.54 | Few spectra, and broadleaf plants resist it naturally15 |
Conclusion
Raman spectroscopy with machine learning can tell all three modes of action apart: 82.7% for the grass and 72.4% for the broadleaf. PSII inhibition was the easiest to recognise, which is encouraging, because PSII is the hardest of the three to identify with chemical assays: the chloroplast-isolation assay used for it is the least reliable and takes around eight weeks.16 PDS was harder, since it overlaps with other kinds of stress.
Those figures are an upper bound. Each treatment was applied to a single plant, so many spectra from one plant stood in for many plants,17 and the scans were taken from spots close together on each leaf. A tool that works in the field would need many more plants and far more varied training data.
It would still be fast and cheap. Scanning 10,000 samples would take about five weeks with no reagents and about £70 a year in electricity,18 against up to eight weeks of staff time and up to £3,000 a year in materials per mode of action for today's assays.
Credits
Thanks to the rest of the team, to Prof. Julian Moger, and to Syngenta for the plants, the treatments and the collaboration. University of Exeter, 2026.
References
-
CropLife International, Time and Cost of New Agrochemical Product Discovery, Development and Registration (2024). croplife.org ↩
-
M. Park et al., "Raman spectroscopy in crop quality assessment: focusing on sensing secondary metabolites: a review", Horticulture Research 10 (2023). doi:10.1093/hr/uhad074 ↩
-
A. W. Rutherford and A. Krieger-Liszkay, "Herbicide-induced oxidative stress in photosystem II", Trends in Biochemical Sciences 26 (2001), 648–653. doi:10.1016/S0968-0004(01)01953-3 ↩
-
H. K. Takano et al., "ACCase-inhibiting herbicides: mechanism of action, resistance evolution and stewardship", Scientia Agricola 78 (2021). doi:10.1590/1678-992X-2019-0102 ↩
-
A. Brausemann et al., "Structure of phytoene desaturase provides insights into herbicide binding and reaction mechanisms involved in carotene desaturation", Structure 25 (2017), 1222–1232. doi:10.1016/j.str.2017.06.002 ↩
-
N. Coca-Lopez, "An intuitive approach for spike removal in Raman spectra based on peaks' prominence and width", Analytica Chimica Acta 1295 (2024), 342312. doi:10.1016/j.aca.2024.342312 ↩
-
P. Eilers and H. Boelens, "Baseline correction with asymmetric least squares smoothing", unpublished manuscript (2005). ↩
-
A. Kwiatkowski et al., "Algorithms of chemicals detection using Raman spectra", Metrology and Measurement Systems 17 (2010), 549–559. doi:10.2478/v10178-010-0045-1 ↩
-
R. Gautam et al., "Review of multidimensional data processing approaches for Raman and infrared spectroscopy", EPJ Techniques and Instrumentation 2 (2015), 8. doi:10.1140/epjti/s40485-015-0018-6 ↩
-
I. T. Jolliffe and J. Cadima, "Principal component analysis: a review and recent developments", Philosophical Transactions of the Royal Society A 374 (2016), 20150202. doi:10.1098/rsta.2015.0202 ↩
-
D. Ruiz-Perez et al., "So you think you can PLS-DA?", BMC Bioinformatics 20 (2019). doi:10.1186/s12859-019-3310-7 ↩
-
S. Szeghalmy and A. Fazekas, "A comparative study of the use of stratified cross-validation and distribution-balanced stratified cross-validation in imbalanced learning", Sensors 23 (2023), 2333. doi:10.3390/s23042333 ↩
-
C. Farber et al., "Raman spectroscopy and machine learning for agricultural applications", Frontiers in Plant Science 13 (2022), 887511. doi:10.3389/fpls.2022.887511 ↩
-
N. Altangerel et al., "In vivo diagnostics of early abiotic plant stress response via Raman spectroscopy", PNAS 114 (2017), 3393–3396. doi:10.1073/pnas.1701328114 ↩
-
X. Xia et al., "Mechanism of metamifop inhibition of the carboxyltransferase domain of acetyl-coenzyme A carboxylase in Echinochloa crus-galli", Scientific Reports 6 (2016), 34066. doi:10.1038/srep34066 ↩
-
Assay times and costs from correspondence with Syngenta. ↩
-
S. H. Hurlbert, "Pseudoreplication and the design of ecological field experiments", Ecological Monographs 54 (1984), 187–211. jstor.org/stable/1942661 ↩
-
Renishaw, inVia confocal Raman microscope (150 W). renishaw.com ↩