MACHINE LEARNING-BASED REGRESSION FOR MAGNETIC FIELD PREDICTION FROM ODMR SPECTRAL DATA

Optically Detected Magnetic Resonance (ODMR) using nitrogen-vacancy (NV) centers in diamond enables sensitive, room-temperature magnetic field sensing, but real ODMR spectra are often noisy and difficult to analyze with traditional peak-fitting methods. This thesis investigates whether machine learning can reliably predict magnetic field strength directly from ODMR spectra, and compares four model families under a single regression task: a random forest, an artificial neural network (ANN), a one-dimensional convolutional neural network (1D-CNN), and a Transformer. Training data were generated from an NV-ensemble simulation calibrated to real measurements provided by the Ulsan National Institute of Science and Technology (UNIST), spanning 0 G to 400 G and augmented with Gaussian noise and linewidth variation. Four known real measurements (69 G, 107 G, 295 G, and 409 G) were held out to test generalization to spectra the models had never seen. Models were evaluated under a leave-one-configuration-out cross-validation protocol on simulated data and on the held-out real spectra, using mean absolute error (MAE) and the coefficient of determination (R²), together with inference speed and model size. On simulated data, all neural models performed strongly, with the 1D-CNN achieving the lowest observed MAE (15.49 G MAE, R² = 0.9218) under the configuration-holdout protocol. This ordering carried over to real measurements: after excluding the out-of-range 409 G point, the 1D-CNN also achieved the lowest observed MAE on the real measurements, predicting the three within-range fields to within 2.21 G on average. All models predicted 409 G poorly, which lies just outside the training range and differs from the training distribution mainly in its baseline level. This is most consistent with a simulation-to-real distribution mismatch, with extrapolation as a secondary factor. A calibration control indicated that the reported accuracy was not primarily an artifact of calibration. Every model predicted in tens of milliseconds and under 27 MB of storage, fast enough for the real-time inference setting evaluated on the tested workstation. These results indicate that, under the evaluated configurations and the four real measurements, the model that fit the simulated data most closely also achieved the lowest observed error on the real measurements once out-of-distribution points are set aside. They further point to the gap between simulated and real spectra, rather than the choice of model, as the main remaining challenge for practical ODMR magnetometry, while noting that the real-data evaluation rests on only four labeled spectra and that broader claims about real-world generalization will require substantially more labeled experimental data.

Authors

Institutions

Publication Details

Journal
CSUSB ScholarWorks (California State University, San Bernardino)
Published
2026-12-01
Primary Topic
Diamond and Carbon-based Materials Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

MACHINE LEARNING-BASED REGRESSION FOR MAGNETIC FIELD PREDICTION FROM ODMR SPECTRAL DATA

Jesse Hernandez
3 links
CSUSB ScholarWorks (California State University, San Bernardino)
Diamond and Carbon-based Materials Research
article

MACHINE LEARNING-BASED REGRESSION FOR MAGNETIC FIELD PREDICTION FROM ODMR SPECTRAL DATA

Jesse Hernandez
article en

Abstract

Optically Detected Magnetic Resonance (ODMR) using nitrogen-vacancy (NV) centers in diamond enables sensitive, room-temperature magnetic field sensing, but real ODMR spectra are often noisy and difficult to analyze with traditional peak-fitting methods. This thesis investigates whether machine learning can reliably predict magnetic field strength directly from ODMR spectra, and compares four model families under a single regression task: a random forest, an artificial neural network (ANN), a one-dimensional convolutional neural network (1D-CNN), and a Transformer. Training data were generated from an NV-ensemble simulation calibrated to real measurements provided by the Ulsan National Institute of Science and Technology (UNIST), spanning 0 G to 400 G and augmented with Gaussian noise and linewidth variation. Four known real measurements (69 G, 107 G, 295 G, and 409 G) were held out to test generalization to spectra the models had never seen. Models were evaluated under a leave-one-configuration-out cross-validation protocol on simulated data and on the held-out real spectra, using mean absolute error (MAE) and the coefficient of determination (R²), together with inference speed and model size. On simulated data, all neural models performed strongly, with the 1D-CNN achieving the lowest observed MAE (15.49 G MAE, R² = 0.9218) under the configuration-holdout protocol. This ordering carried over to real measurements: after excluding the out-of-range 409 G point, the 1D-CNN also achieved the lowest observed MAE on the real measurements, predicting the three within-range fields to within 2.21 G on average. All models predicted 409 G poorly, which lies just outside the training range and differs from the training distribution mainly in its baseline level. This is most consistent with a simulation-to-real distribution mismatch, with extrapolation as a secondary factor. A calibration control indicated that the reported accuracy was not primarily an artifact of calibration. Every model predicted in tens of milliseconds and under 27 MB of storage, fast enough for the real-time inference setting evaluated on the tested workstation. These results indicate that, under the evaluated configurations and the four real measurements, the model that fit the simulated data most closely also achieved the lowest observed error on the real measurements once out-of-distribution points are set aside. They further point to the gap between simulated and real spectra, rather than the choice of model, as the main remaining challenge for practical ODMR magnetometry, while noting that the real-data evaluation rests on only four labeled spectra and that broader claims about real-world generalization will require substantially more labeled experimental data.

CSUSB ScholarWorks (California State University, San Bernardino)
California State University, San Bernardino (US)
Diamond and Carbon-based Materials Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon