## 2 Materials and Methods  
### Dataset Creation and Preprocessing  
The dataset for the model was sourced from the PDS II 300 natural diamond identifier of Shenzhen Jewelry Research Institute Co., Ltd. (Shenzhen, China). The samples include natural diamonds (D), chemical vapor deposition (CVD)-grown diamonds, high pressure high temperature (HPHT)-grown diamonds, and moissanite (MS), with sample diameters ranging from 3 to 9.5 mm. The data collection environment had a temperature range of 16 \({}^{\circ}\)C to 27 \({}^{\circ}\)C and a humidity range of 35% to 80% RH. Ultraviolet spectral data of various diamond samples were collected under different environments and times, including 4206 natural diamonds, 1826 CVD-grown diamonds, 546 HPHT-grown diamonds, and 774 moissanite samples. Figure 1 shows the ultraviolet spectra of various jade samples.  
In the obtained ultraviolet spectrum dataset, the spectral range is from 225 nm to 423 nm, with a sampling interval of 0.13 nm or 0.14 nm. The data point interval of the ultraviolet spectrum may fluctuate by 0.01 nm, and each spectrum may have different starting points and numbers of sampling points, leading to variations in sampling points and lengths for each spectrum. We believe that this inconsistency may affect the accuracy of the spectral analysis. Therefore, the collected ultraviolet spectra were interpolated and resampled. Cubic spline interpolation was used to ensure that the interpolation function  
Figure 1: Representative ultraviolet spectra of jade, including D (natural diamond), CVD (chemical vapor deposition-grown diamond), HPHT (high pressure high temperature-grown diamond), and MS (moissanite). The different colors represent the same type of spectra obtained under different conditions. (**a**) D, (**b**) CVD, (**c**) HPHT, (**d**) MS.  
satisfied the function values, first-order, and second-order derivatives at the spectral data points. Subsequently, resampling was performed starting from 265 nm with a resampling interval of 0.1 nm, standardizing the length of all spectra to 1300. The interpolation algorithm [27] steps are as follows (Algorithm 1):  
```
1:Input: Given spectral data points \((x_{i},y_{i}),\quad i=1,2,3,\ldots,n-1\)
2:Fitting: Use a cubic polynomial \(S_{i}(x)\) to fit each subinterval \([x_{i},x_{i}(i+1)]\), where \(S(x)\) is the interpolation function satisfying the following conditions: * At each data point, \(S(x)\) equals \(y_{i}\), i.e., \(S(x_{i})=y_{i},\quad i=1,2,3,\ldots,n\). * At each internal node, the first and second derivatives of \(S(x)\) are continuous, i.e., \(S^{\prime}_{i}(x_{i+1})=S^{\prime}_{i+1}(x_{i+1})\) and \(S^{\prime\prime}_{i}(x_{i+1})=S^{\prime\prime}_{i+1}(x_{i+1}),\quad i=1,2,3, \ldots,n-1\) * At the two endpoints, \(S(x)\) satisfies one of the boundary conditions: fixed boundary conditions \(S^{\prime}(x_{0})=A\), \(S^{\prime}(x_{n})=B\), or non-clamped boundary conditions \(S^{\prime\prime}_{0}(x_{0})=S^{\prime\prime}_{1}(x_{1})\), \(S^{\prime\prime}_{n-2}(x_{n-1})=S^{\prime\prime}_{n-1}(x_{n})\).
3:Formulation: Construct a system of linear equations for the second derivatives \(S^{\prime\prime}_{0}(x_{0})=M_{i}\), using the above conditions, and solve for \(M_{i},\quad i=1,2,3,\ldots,n\).
4:Coefficient Calculation: Calculation: Using\(M_{i}\), determine the coefficients \(a_{i}\), \(b_{i}\), \(c_{i}\), \(d_{i}\), for each subinterval, such that \(S_{i}(x)=a_{i}+b_{i}(x-x_{i})+c_{i}[(x-x_{i})]^{2}+d_{i}[(x-x_{i})]^{3}\).
5:Interpolation Function Construction: Integrate the polynomial coefficients from each interpolation segment into a complete interpolation function.
6:Interpolation Calculation: Calculation: Given an interpolation point \(x\), use the piecewise expression of \(S(x)\) to compute the corresponding function value \(S(x)\).
```  
**Algorithm 1** Cubic spline interpolation.  
Finally, the dataset was randomly divided into training, validation, and test sets in a ratio of 6:2:2, as shown in Table 1.