Skip to content

Classification of diamond color grades based on portable 785 nm Raman spectroscopy

FieldValue
JournalMaterials Today Communications
Published2026-10-15
AuthorsKang Ma, Guoqiang Fang, Kai Hu, Wuliji Hasi
DOI10.1016/j.mtcomm.2026.116395

Portable 785 nm Raman spectroscopy with a two-component PCA-KNN pipeline graded 13 of 14 unseen Ib-type HPHT lab-grown diamonds correctly, giving 92.9% exact-grade accuracy. The only error assigned the E-grade stone E1 to D. The Clopper Pearson 95% confidence interval was 66.1% to 99.8%. Internal held-out accuracy reached 96.0%, but that split used spectra from the same five reference stones.

The study used five polished, faceted Ib-type high-pressure high-temperature (HPHT) lab-grown master stones labeled LG-D, LG-E, LG-F, LG-G, and LG-J. Each grade had one reference stone, so the reference set covered five grades. The 14 prediction stones contained eight D, three E, and one each of F, G, and J. All prediction stones had International Gemological Institute appraisal certificates.

A QEPRO-RAMAN-785 portable spectrometer used 785 nm excitation and a fiber-coupled Raman probe. The probe had an approximately 7.5 mm working distance and a 100 μm excitation spot. Laser power was 100 mW, integration time was 1 s, and the range was 200 to 3000 cm⁻¹ at 7 cm⁻¹ resolution. Each spectrum contained 671 sampling points.

Spectra were collected at multiple table and crown positions with randomized stone orientations. This sampling averaged facet-dependent scattering, and the small excitation spot always fell within the crystal. The authors collected 100 spectra per reference stone and 50 per prediction stone. Prediction spectra used the same measurement conditions as the reference data. Each prediction grade came from a majority vote across its 50 spectra.

The vendor software applied baseline correction, smoothing, and noise reduction before partitioning. Every spectrum was then min-max normalized to 0 to 1 with NumPy. No independent wavelength calibration was performed during acquisition. The instrument therefore operated on its factory calibration throughout.

Calibration and grade-bearing spectral information

Section titled “Calibration and grade-bearing spectral information”

Lorentzian analysis placed the common first-order band at 1353.9 ± 0.4 cm⁻¹ on the nominal axis. The reference position for unstressed diamond is 1332 cm⁻¹, giving a systematic positive offset of +21.9 ± 0.4 cm⁻¹. Grade means occupied 1353.3 to 1354.3 cm⁻¹, so the offset was nearly identical across grades and measurement positions.

The fitted full width at half maximum was 7.1 ± 0.6 cm⁻¹, close to the instrument’s 7 cm⁻¹ resolution. The authors rejected a stress origin because the empirical relation would imply about 9 GPa of compression. Gem-quality HPHT diamonds typically have residual stresses below about 2 GPa. Double-Lorentzian fits also produced degenerate components, so the weak flank asymmetry was assigned to instrument line shape.

Grade information lay in the intensity distribution, not the band position. Pairwise Pearson correlations between grade-mean profiles were 0.82 to 1.00. The share of normalized intensity in the first-order band was 0.61 for LG-D and 0.25 for LG-J. Within-stone coefficient of variation was 3% to 19% across 100 measurement positions. The authors identify differences in nitrogen content as the physical origin of color variation among type Ib diamonds.

The study compared K-nearest neighbors (KNN), support vector machine (SVM), random forest (RF), XGBoost, a convolutional neural network (CNN), logistic regression, and a decision tree. A stratified random split assigned 400 reference spectra to training and 100 to the held-out test set. The test set was used only for final evaluation within each subsection.

Each training spectrum was augmented threefold, producing 1,600 training spectra. Perturbations added Gaussian noise with a standard deviation of 0.005. Channels shifted by negative 2 to positive 2 points, and intensity was scaled by 0.95 to 1.05. Five-fold grid search tuned hyperparameters on the augmented training set only.

Internal held-out accuracy is shown as a percentage. The unaugmented column used vendor-preprocessed spectra without added perturbation.

ModelUnaugmentedAugmentedTuned augmented
KNN95.0%95.0%96.0%
SVM80.0%60.0%93.0%
Logistic regression64.0%60.0%88.0%
Decision tree86.0%87.0%87.0%
Random forest94.0%93.0%92.0%
XGBoost93.0%94.0%92.0%
CNN39.0%91.0%82.0%

After tuning, KNN reached 96.0% accuracy, 96.7% precision, 96.0% recall, and a 96.1% F1 score. Random forest remained stable across the three evaluations. Augmentation raised CNN accuracy from 39.0% to 91.0%, while SVM fell from 80.0% to 60.0%. The authors attributed the CNN gain to a larger effective training set. Tuning produced the largest gain for SVM at 33.0 percentage points. The largest loss was 9.0 points for CNN.

The external PCA-KNN model used all 500 reference spectra. Two principal components explained 99.2% of the total variance, selected under a 95% cumulative variance criterion. KNN used seven neighbors with uniform weighting. The five grades formed compact clusters in this two-dimensional representation.

Only E1 was misclassified at stone level, with 40 of 50 spectra voting D. Per-grade recall was 8/8 for D and 2/3 for E. The D stones represented 57.1% of the external set, so aggregate accuracy was dominated by that grade.

PCA-RF assigned 12 of 14 stones correctly, or 85.7%. It misclassified E1 and E2 as D. At the individual-spectrum level, RF scored 86.4% and KNN scored 73.7%. Majority voting reversed that ranking at stone level because KNN retained graded vote distributions.

RF produced winning-vote shares of at least 0.90 for every stone, which committed the E stones toward D. Correct KNN stones had a mean winning-vote share of 0.78, while E1 still had 0.80. D7 and D8 produced 25 to 25 ties. A fixed label order resolved both ties as D, which happened to match their true grades.

The control experiment compared three representations with the same KNN classifier. Internal scores used reoptimized hyperparameters for each representation. External tests used seven neighbors with uniform weighting throughout.

Feature representationInternal accuracyCorrect external stonesCorrect external spectra
Full 671-channel spectrum96.0%8 of 1451.7%
Two retained components77.0%13 of 1473.7%
669 discarded components79.0%3 of 14Not reported

The control shows that higher internal accuracy did not predict transfer to new stones. The two-component projection traded internal performance for better external recovery. The discarded channels were not noise, because they carried reproducible information within the reference set.

Only 2.9% of a reference spectrum’s norm lay outside the two retained components, compared with 25.5% for unknown stones. The discarded directions accounted for 63% of the squared distance between an unknown spectrum and its nearest reference neighbors. This component was reproducible within the reference set but did not transfer between stones. The authors therefore attributed the external gain to the projection rather than the classifier alone.

Visual color grading remains dependent on the grader and standardized lighting. Even skilled graders agree only to within about one-fifth of a color grade across the full D through Z range. Automated imaging systems achieve repeatability on the order of one-tenth of a color grade. Imaging remains sensitive to illumination, cut geometry, and fluorescence.

The paper reports 70% accuracy for millimeter-wave spectroscopy and approximately 80% within-one-grade accuracy for UV-Vis absorption spectroscopy of CVD diamonds. The external exact-grade result was higher than both reported values. Those metrics are not directly comparable because the present method assigns an exact grade. UV-Vis also does not apply to strongly fluorescent diamonds.

The main constraint is the validation design. The external set contained only 14 stones and was imbalanced across grades. Each grade had one reference stone. The internal spectrum split therefore tested new measurement positions on known stones rather than generalization to new stones.

The instrument also lacked an independent wavelength standard during acquisition. The study did not cross-validate against a laboratory-calibrated Raman system. The authors propose regular wavelength calibration, expanded sample libraries, leave-one-stone-out cross-validation, and multimodal spectroscopy.

The measured method is rapid, non-destructive, and requires no sample preparation. It can provide gem-testing laboratories with an auxiliary check on visual grading of polished Ib-type HPHT diamonds. Its performance remains bounded by the 14-stone external validation.

View Original Abstract

Visual color grading of Ib-type HPHT lab-grown diamonds is subjective and poorly repeatable, because adjacent-grade color differences in the colorless to near-colorless range lie at the limit of visual resolution. This work presents a rapid, non-destructive method that couples portable 785 nm Raman spectroscopy with machine learning to discriminate D, E, F, G, and J diamond color grades. Seven classification models were compared on the raw spectra, after training-set augmentation, and after hyperparameter optimization. The KNN model reached the best internal held-out accuracy of 96.0%. External validation with a PCA-KNN pipeline reached 92.9% exact-grade accuracy on 14 unknown HPHT diamonds, against 85.7% for the PCA-RF model; the only misclassification was a single E-grade stone assigned to D. Control experiments attribute this transferability to the projection rather than to the classifier: the full 671-channel spectrum reproduced the 96.0% internal accuracy but recovered only 8 of the 14 stones externally, whereas the two retained principal components (77.0% internally) recovered 13 of 14. Lorentzian analysis identified the band near 1354 cm⁻¹ as the diamond first-order Raman line at 1332 cm⁻¹, with a systematic calibration offset of +21.9 ± 0.4 cm⁻¹ and an FWHM of 7.1 ± 0.6 cm⁻¹. The grade information is therefore carried by the intensity distribution of the Raman profile rather than by peak positions, and portable 785 nm Raman spectroscopy with a two-component PCA-KNN pipeline offers an auxiliary check on the visual grading of lab-grown diamonds, although the present validation rests on a single reference stone per grade.