*2.3. Data Analysis*

The collected Raman spectroscopic signals were examined to identify spectral features unique to a particular amyloid type.

Second derivative analysis, which has been used to estimate the contribution of protein secondary structure [29,40], was applied to identify spectral features arising from amyloid fibrils within tissues. Second derivative spectra were obtained by the Savitzky-Golay filter [39], followed by robust locally weighted smoothing.

To further characterize spectral features associated with AL and AA amyloidosis beyond those apparent upon visual inspection, we employed t-Distributed Stochastic Neighbor Embedding (t-SNE), a multivariate analysis technique, and density-based spatial clustering of applications with noise (DBSCAN), an unsupervised machine learning approach. These allowed the unveiling and decomposing of subtle and complex tissue information with greater sensitivity by addressing spectral interference due to background and fluorescence. Both approaches considered Raman spectra collected from both glomerular and non-glomerular regions in AL, AA, and NA tissues. All analyses were performed and visualized using MATLAB and Orange [41].

Briefly, t-SNE is a dimensionality reduction technique that evaluates complicated Raman spectra. By extracting both linear and non-linear features from Raman spectra, it reduces tissue spectra containing information about various biological molecules, from a higher to a lower dimension [42]. We used a perplexity of 15 and an exaggeration of 2 as parameters.

DBSCAN is an unsupervised machine learning approach for data clustering. This machine learning technique is robust to outliers, which makes it a suitable approach for analyzing a large collection of Raman spectra. Core point neighbors and neighborhood distance (Euclidian distance) were determined based on an analysis design from a previous study [43].

#### **3. Results and Discussion**

To characterize amyloid deposits, we utilized Raman spectroscopy to collect molecular fingerprints of ex vivo amyloid-infiltrated human kidney tissue samples from patients affected by AL or AA amyloidosis. Raman spectra were measured both within glomeruli with amyloid deposits, which were identified by pathologists, and non-glomerular regions of tissue sections. Raman spectra of normal tissue samples (NA) were also collected as control cases for comparison. Adjacent sections of each type underwent histopathologic evaluation. Figure 1 illustrates the workflow of this study.
