Cell compression raman classification using neural networks for optical filter design and cell classification

By using data-driven optical filter design and neural network training, the problem of long measurement time in Raman spectroscopy for cell classification was solved, achieving high-throughput, non-destructive cell state assessment and high classification accuracy.

CN120936864APending Publication Date: 2025-11-11LEIDEN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480017785.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-09
Filing Date
2024-03-07
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing Raman spectroscopy techniques suffer from long measurement times and the inability to achieve high-throughput applications in cell classification. Furthermore, existing compressed Raman techniques cannot be directly applied to cell products due to the lack of noise-free reference spectra and the influence of biological variability.

Method used

An optical filter is designed using a data-driven approach, and the filter weights are optimized using neural network training. Combined with an adjustable optical filter and a point detector, compressed Raman measurement is achieved, and cell classification is performed using a deep learning model.

Benefits of technology

It achieves non-destructive, label-free cell state assessment, reduces measurement time by two orders of magnitude, and achieves classification accuracy of up to 91%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120936864A_ABST
    Figure CN120936864A_ABST
Patent Text Reader

Abstract

A method for cell classification, comprising compressed Raman measurements on cell samples (124), includes frequency filtering of a dispersed light signal via a tunable optical filter (120), the frequency response of which is defined by weights derived from the training weights of a first hidden layer (108) of a neural network (100) trained based on the Raman spectra of the cells and their corresponding labels. The frequency-filtered signal is detected by an optical detector (122) to generate compressed Raman measurements. Multiple compressed Raman measurements are then input into a predictive neural network to predict the label of the cell sample (124). The predictive neural network is identical to the trained neural network (100) except that it lacks the weights of the input layer and the first hidden layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention generally relates to Raman spectroscopy. More specifically, this invention relates to a method for cell classification using Raman spectroscopy compressed sensing and neural networks. Background Technology

[0002] Cells, as potential therapeutic agents with unique properties, have been extensively studied, and the first cell-based therapies (such as CAR T-cell therapy for cancer) are being applied clinically. The unique capabilities and immense potential of cell-based therapies are accompanied by challenging manufacturing processes. While the manufacture of small molecule drugs has been standardized, automated, and scaled up, cell products typically require manual labor, exhibit inherent heterogeneity, and are difficult and laborious to optimize. One reason for these difficulties is the lack of quantitative, non-invasive assays of cell states during manufacturing. Currently, quality control of cell products occurs in samples of the final product, which is problematic for several reasons. If quality control fails, the lengthy manufacturing process must often be repeated, potentially delaying time-sensitive treatments. Furthermore, cells sampled for quality control cannot be used for treatment because existing measurement methods are destructive. Due to the considerable variability between individual cells within a population, untested therapeutic products may inevitably contain cells harmful to the recipient. For these reasons, there is a need for non-destructive measurements that can assess the entire cell state within a population without requiring exogenous labeling or manipulation that could negatively impact safety. This approach would be extremely useful for academic researchers working on novel cell-based therapies, clinicians who may want to test therapies before administering them to patients, and pharmaceutical companies seeking to mass-produce cell-based therapeutics.

[0003] Raman spectroscopy has been used to characterize cells. However, there are significant problems with existing techniques. Raman spectroscopy can be acquired from a very broad set of molecules, from carbohydrates and lipids to nucleic acids and proteins. Therefore, the Raman spectrum of a cell is essentially a fingerprint of its chemical composition. Unsurprisingly, it has been used in regenerative medicine applications. Unfortunately, the spontaneous Raman effect, caused by inelastic scattering of light, is inefficient, resulting in low intensity of scattered light. Therefore, acquiring enough photons to obtain a complete Raman spectrum covering all relevant molecular species is time-consuming and hinders high-throughput applications. Compressed sensing offers a possible solution to this problem. In this method, only a linear combination of Raman intensities at certain wavenumbers is measured at a time, and only a small fraction of them are needed, thus greatly reducing measurement time. Mathematically, a compressed measurement is the dot product of two vectors: the complete Raman spectrum and the filtered vector. The filtered vector is constrained due to technical reasons associated with implementing the measurement with optical elements. Typically, the filter is required to be binary so that the compressed measurement provides a sum of subsets of Raman intensities. While a limited number of compressed measurements using different filters are insufficient to reconstruct a complete Raman spectrum without error, they contain enough information to determine the composition of chemical mixtures with high accuracy. Existing procedures for finding the optimal filter require knowledge of the noise-free Raman spectrum of individual molecular species and assumptions about a specific distribution of noise. Therefore, they cannot be directly applied to cellular products, as it is impossible to obtain a noise-free reference spectrum for cellular products, and biological variability has a much greater impact than photon counting or measurement noise.

[0004] In summary, non-destructive, label-free methods are needed to characterize cells in real time to optimize production processes and improve quality control. Current Raman spectroscopy methods that provide fingerprint information of cellular chemical composition are too slow for high-throughput applications. Compressed Raman techniques, which measure only a linear combination of Raman intensities, can be fast but still face significant challenges in providing high performance. Summary of the Invention

[0005] The inventors of this application have discovered a technique for extending compressed Raman spectroscopy from molecular species classification to cell classification. This technique uses a data-driven approach for classification prediction and optical filter design. A neural network (e.g., a multilayer perceptron) is trained on training data including cell Raman spectra and relevant cell states or types as labels. In other words, the input to the network is the Raman spectrum, and the output is the predicted label. Therefore, calculating the activation of a unit in the first hidden layer of such a network involves the dot product of the Raman spectrum and the weights of that unit. These weights thus directly correspond to filters that can be used in compressed sensing. After the weights are learned during the training phase, they can be implemented using suitable optical elements (e.g., digital micromirror devices). During the prediction phase, compressed Raman measurements are performed using filters (i.e., weights) optimized for a specific classification task. The results of these measurements are then directly used to replace the dot product of the weights and spectra in the activation function of the first hidden layer. Optimal filters can be obtained during the training phase, overcoming two important problems. First, the input data for deep learning models is typically normalized for efficient learning. In our compressed sensing scheme, the input to the optimized filter is the raw, unnormalized Raman spectrum. Therefore, a normalization layer is introduced immediately after the first hidden layer. Weights in a neural network are unconstrained by default, meaning they can take arbitrary continuous values, including negative ones. Such weights are difficult to implement using optical devices. Therefore, a technique is provided to obtain binary weights while maintaining high classification accuracy.

[0006] This cell classification technique can be implemented on a device that includes a diffraction element that generates Raman spectra, a tunable optical filter, and a point detector. Such a device will work in conjunction with commercially available microscopes. The reading and control of the measurement system can be performed by a dedicated computer equipped with control software and software implementing a neural network for classification prediction, which is equipped with a data acquisition card.

[0007] In operation, the system performs compressed sensing and uses predetermined optimal parameters for optical filters. The optical filters are implemented using tunable optical elements (e.g., digital micromirror devices). Compressed sensing measurements from the optical elements are input into a neural network to return a predicted cell classification. Specific filter banks can be used for specific applications. A variety of highly differentiated cell states (e.g., proliferation, stress, etc.) can be evaluated using a general filter bank.

[0008] This technique can be implemented using an accessory to a commercially available microscope. This accessory generates the Raman spectra of the cells and filters these spectra using a digital micromirror apparatus. It communicates with a dedicated computer that calculates the optimal filter parameters, and this computer has been provided with training samples supplied by the end user. This computer also controls the digital micromirror apparatus to implement the filter in real time, and it can use a neural network for prediction to provide cell analysis (characterization). Alternatively, the data measured from the accessory can be streamed to a service provider that performs filter design and data analysis.

[0009] The technique disclosed in this paper reduces measurement time by two orders of magnitude. In a dataset containing Raman spectra of three different cell types, classification accuracy of up to 91% was achieved using only five linear combinations of Raman intensities. This method makes it feasible to characterize cellular products using Raman spectroscopy.

[0010] On one hand, the present invention provides a cell classification method based on Raman spectroscopy, the method comprising: a) performing compressed Raman measurements on cell samples; wherein performing compressed Raman measurements comprises: i) performing laser microscopy on the cell samples to generate a collimated light signal, ii) dispersing the collimated light signal through a diffraction element to generate a dispersed light signal, iii) performing frequency filtering on the dispersed light signal by a tunable optical filter that selects a wavenumber range of the dispersed light signal to generate a filtered signal, wherein the response of the tunable optical filter is defined by weights; wherein the tunable optical filter is preferably implemented using a spatial light modulator (e.g., a digital micromirror device); and iv) detecting the filtered signal by an optical detector (e.g., a photomultiplier tube) to generate compressed Raman measurements; b) Step (a) is repeated using different tunable optical filter weights to generate multiple compressed Raman measurements; (c) the multiple compressed Raman measurements are processed by a predictive neural network to predict labels for cell samples; and (d) the labels for the cell samples are output for research purposes or quality control. The tunable optical filter weights defining the tunable optical filter response are derived from the training weights of the first hidden layer of a calibration stage neural network trained on training data including the Raman spectra of cells and corresponding labels including cell type or cell health. The predictive neural network is derived by removing the weights of the input layer and the first hidden layer from the calibration stage neural network, while retaining the bias of the first hidden layer and the weights and biases of all subsequent layers of the calibration stage neural network. The calibration stage neural network is preferably a multilayer perceptron neural network.

[0011] The calibration stage neural network preferably has a normalization layer after the first hidden layer. The calibration stage neural network trained based on training data is preferably pre-trained using the constraint that the weights in the first hidden layer are non-negative, and then further trained using the constraint that the weights in the first hidden layer are binary.

[0012] The method may also include transmitting multiple compressed Raman measurements from an optical detector to a predictive neural network, which is then transmitted to a cloud-based server via a digital computer network.

[0013] To predict the label of a cell sample by processing multiple compressed Raman measurements through a predictive neural network, multiple compressed Raman measurements can be fed into the predictive neural network, where the weights in the first hidden layer of the calibration phase neural network replace the dot product of the Raman spectra.

[0014] The method may also include training a calibration phase neural network using training data including Raman spectra and corresponding labels; and transferring the training weights of the first hidden layer of the calibration phase neural network to a tunable optical filter. Attached Figure Description

[0015] Figure 1A , 1B Figure 1C is a schematic diagram illustrating an overview of a cell classification method including a training phase, an implementation phase, and a prediction phase according to an embodiment of the present invention.

[0016] Figure 1D This is a schematic diagram of an apparatus for implementing cell classification technology according to an embodiment of the present invention.

[0017] Figure 1E This is a schematic diagram illustrating the steps of a technique for calibrating / training and predicting measurements according to an embodiment of the present invention.

[0018] Figure 2A , 2B This is a diagram showing the highly overlapping raw Raman spectra of iPSCs, NSCs, and neurons, in which... Figure 2A These are Raman intensity maps of different cell types before pretreatment. Figure 2B This is the average intensity diagram of each Raman spectrum before preprocessing.

[0019] Figure 3 The graph shows the relationship between accuracy and the number of filters, illustrating how just 4 or 5 compressed measurements are sufficient to classify cell types with high accuracy.

[0020] Figure 4A , 4B This is a graph showing the output pattern encoding cell types for 5 optimal filters, where... Figure 4A A graph showing the relationship between weight magnitude and wavenumber index is provided. Figure 4B The dot product of the original Raman spectra averaged for each of the five filters and each cell type is shown, along with subsequent normalized plots by filter and cell type.

[0021] Figure 5A , 5B This is a graph showing the relationship between measured intensity and wavenumber, illustrating how preprocessing removes slowly changing baselines and normalizes the spectrum. Figure 5A The diagram shows the subtraction of the baseline calculated using asymmetric least squares smoothing from the original measurements. Figure 5B The baseline correction measurements shown are normalized to the sum of intensities at all considered wavenumbers.

[0022] Figure 6A , 6B This is a graph showing the relationship between intensity and wavenumber, illustrating how preprocessing (baseline removal and normalization) reduces, but does not eliminate, overlap in the Raman spectra, where... Figure 6A The complete fingerprint area is shown. Figure 6B The figure shows the distance from 319cm. -1 Up to 673cm -1 The magnified portion.

[0023] Figure 7A , 7B This is a diagram illustrating how support vector machines and neural networks classify cell types with high accuracy. Figure 7A This shows a confusion table for SVM or NN classification that retains the test data. Figure 7B The data is shown in two dimensions.

[0024] Figure 8 The diagram illustrates how the most informative Raman intensity is selected through variability across cell types.

[0025] Figure 9 This is a graph showing the relationship between accuracy and the number of wavenumber bins, illustrating how classification accuracy increases with the number of wavenumbers or wavenumber bins included when training preprocessed spectra.

[0026] Figure 10A , 10B 10C and 10D show that the optimization and neural network models based on the Bhattacharyya bound perform similarly on simulated data, among which... Figure 10A Examples of three types of simulated spectra with different Pearson correlations are shown. Figure 10B The correlation between the spectrum and the fraction of the shared "common" spectrum is shown. Figure 10C The Bhattacharyya bound (BB) and BB-based optimizations are shown for various correlation levels and photon numbers, as well as... Figure 10DThis shows the relationship between the spectrum and the number of photons (N). phot The classification accuracy of NN models or BB-based optimizations based on different correlations between )

[0027] Figure 11A , 11B Figures 11C and 11D illustrate how biological variability affects prediction accuracy, showing a confusion table for training and testing using all data. Figure 11A Using two cell lines for training and predicting the confusion table of a third cell line ( Figure 11B ), and a confusion table using cells from the same cell line for training and testing ( Figure 11C ),in Figure 11D The classification accuracy of an NN model with 5 units in the first hidden layer is shown.

[0028] Figure 12A , 12B This is a table showing the features of a neural network model, in which Figure 12A Model A for classifying preprocessed spectra is shown, while Figure 12B Model B is shown, which is used for the classification of the raw spectrum and the optimal filter design by introducing binary constraints through the weights of the first hidden layer. Detailed Implementation

[0029] The techniques disclosed herein fulfill the need for non-destructive detection methods that can assess the state of all cells in a population without the need for exogenous labeling or manipulation that could negatively impact safety. The non-destructive and label-free requirements narrow the selection of potential detection results to optical or electrical forms. Optical microscopy has been widely used to assess cell morphology and, when combined with deep learning, can detect early cell differentiation. Electrical impedance is commonly used to detect cell viability and is currently used to determine cell adhesion and differentiation. While these techniques are useful and important, their information content is limited and insufficient to comprehensively characterize the state of cells.

[0030] Spectroscopic methods can, in principle, provide far more information than conventional optical microscopy. For example, autofluorescence spectroscopy can reveal useful information about the metabolic state of cells, but it is limited to molecules that exhibit autofluorescence. The autofluorescence spectra of specific molecular species also tend to be broad and close to single peaks, making them difficult to separate. Raman spectroscopy, on the other hand, can collect data from a very broad group of molecules, from carbohydrates and lipids to nucleic acids and proteins. Therefore, the Raman spectrum of a cell is essentially a fingerprint of its chemical composition. Unfortunately, the spontaneous Raman effect, caused by inelastic scattering of light, is inefficient, resulting in low intensity of scattered light. Therefore, collecting enough photons to obtain a complete Raman spectrum covering all relevant molecular species takes time and hinders high-throughput applications.

[0031] Compressed sensing offers a possible solution to this problem. In this method, only linear combinations of Raman intensities at certain wavenumbers are measured, significantly reducing measurement time. Mathematically, a compressed measurement is the dot product of two vectors: the complete Raman spectrum and the filter vector. The filter vector is constrained due to technical reasons associated with implementing the measurement using optical elements. Typically, the filter is binary so that the compressed measurement provides a sum of subsets of Raman intensities. While a finite number of compressed measurements is insufficient to reconstruct the complete Raman spectrum without error, they contain enough information to determine the composition of chemical mixtures with high accuracy. Known techniques exist for mathematically rigorously determining the optimal filter for compressed Raman regression and classification in the presence of photon counting and measurement noise. However, these techniques require knowledge of the noise-free Raman spectrum for individual molecular species and assumptions about the specific distribution of noise. Therefore, they cannot be directly applied to cellular products, as noise-free reference spectra are unavailable for cellular products, and biological variability has a much greater impact than photon counting or measurement noise. This challenge must be overcome to extend compressed Raman methods from molecular species classification to cell classification.

[0032] This specification proposes a technical solution to this challenge, which uses a data-driven approach to design optimal filters. Figure 1A , 1B 1C provides an overview of the method, showing the training, implementation, and prediction phases, respectively.

[0033] A key feature of this method is the use of neural networks, such as multilayer perceptrons, recurrent neural networks, convolutional neural networks, or transformer models. This network is trained based on the Raman spectra of cells, where cell state or type is provided as labels to be learned. In other words, the input to the network for training is the Raman spectrum, and the output is the label. During the training phase ( Figure 1A A multilayer perceptron neural network 100 is trained using training data to output cell type labels 104 from input Raman spectra 102. The Raman spectrum 102 is represented as a vector s, whose elements are intensities indexed by wavenumber j. The spectrum is input to the input layer 106 of the network 100. Following the input layer 106 is a first hidden layer 108. The first hidden layer has N units, indexed i, and the weights of each unit are determined by a vector w. i and deviation b i Indicated. Calculate the activation a of unit i in the first hidden layer 108. i Each component includes: the weight vector w of unit i. i The dot product h between the Raman spectrum s and the Raman spectrum i Plus deviation b iAnd use the activation function f to calculate the activation a i During the training of a neural network, the weight vectors and biases of all layers are optimized. The ReLU function is used as the activation function, but another suitable function can also be used. The dot product h... i Mathematically equivalent to compressed measurement. To be usable as an optical filter, the weights are constrained to be non-negative and binary. A normalized layer 100 directly following the first hidden layer 108 ensures efficient training. After the normalized layer 110 are multiple hidden layers 112, followed by a softmax activation layer 114, whose output labels are, for example, cell type or cell state 104.

[0034] Calculating the activation of a unit in the first hidden layer of such a network involves the dot product of the Raman spectrum and the weights of that unit. Therefore, these weights directly correspond to filters that can be used in compressed sensing. After the weights are learned during the training phase, they can be implemented using suitable optical elements (e.g., digital micromirror devices). During the implementation phase ( Figure 1B The weights w of N units in the first hidden layer 108 of the trained calibration / training phase neural network 100 i N optical filters are used in a physical implementation using a spatial light modulator 120 (e.g., a digital micromirror device). The output m of filter i is acquired by point detector 122. i This is a compressed measurement of Raman spectroscopy. Sample 124 is imaged by microscope 126, which performs laser microscopy. The resulting collimated light signal 128 is dispersed by diffraction element 130 to generate a dispersed light signal 132, which is frequency filtered by tunable optical filter 120. The response of tunable optical filter 120 is weighted by w. i Definition. The filtered signal 134 is then detected by the point detector 122 to generate a compressed Raman measurement m of filter i. i .

[0035] In order to be in the prediction phase ( Figure 1C To predict unseen cells, N compressed Raman measurements are performed sequentially using N different filters 140 to generate N measurements 142. Each physical measurement is implemented using a tunable spatial light modulator 120 for each filter i. For prediction, the N measurements are used as input to a prediction neural network 144, which is simply a trained neural network 100 without an input layer 106. The N measurements replace the dot product h in the first hidden layer 108 of the trained calibration / training phase neural network 100. i The first hidden layer 108 is now actually the input layer for the prediction neural network 144. The output of the prediction neural network 144 is the cell type label 146, just as it was in the trained calibration / training phase of the neural network 100.

[0036] Two major challenges of this approach are overcome through specific choices in network design and training procedures. First, the input data for deep learning models is typically normalized for efficient learning. In our compressed sensing scheme, the input to the optimization filter is the raw, unnormalized Raman spectrum. Therefore, a normalization layer 110 is implemented immediately after the first hidden layer. Second, the weights in a neural network are unconstrained by default, meaning they can take arbitrary continuous values, even negative ones. Such weights are difficult to implement with optical devices. Instead, binary weights are used. To ensure effective training, the neural network 100 is first trained in the calibration / training phase with non-negative constraints on the weights in the first hidden layer. The resulting model's weights are then copied to a new network with the same architecture, but with binary constraints on the weights in the first hidden layer. A custom constraint method is used to enforce the constraints.

[0037] Figure 1D This is a schematic diagram of an apparatus used to perform cell classification techniques. A standard, commercially available laser microscope 160 performs laser microscopy on the cell sample to generate a collimated light signal, which is transmitted via fiber optic cable 162 to a compressed spectrometer 164. The compressed spectrometer apparatus 164 includes a diffraction element 170 (e.g., a grating), a tunable optical filter 168, and an optical detector 172 (e.g., a photomultiplier tube). The tunable optical filter is preferably implemented as a spatial light modulator, such as a digital micromirror device. Alternatively, the tunable optical filter may be implemented as a liquid crystal tunable filter, an acousto-optic tunable filter, or a microphotonics-based filter. The frequency response of the tunable optical filter is defined by weights provided by a computer 166, which also controls the microscope 160 and receives and records measurement signals from the optical detector 172. The diffraction element 170 disperses the collimated light signal to generate a dispersed light signal, which is reflected from a mirror to form a collimated dispersed light signal incident on the tunable optical filter 168. A tunable optical filter 168 performs frequency filtering on the scattered light signal by selecting a wavenumber range to generate a filtered signal. This filtered signal is then focused onto an optical detector 172 via a lens to produce a compressed Raman measurement using a specific filter defined by weights sent from a computer 166. The computer 166 performs neural network processing to generate cell type predictions. Note that the computer 166 is not necessarily located near the optical equipment and can be connected to the microscope and compressed spectrometer via a data connection over a data communication network. For example, the computer 166 could be a cloud server. Alternatively, both a cloud server and a local computer can be used to perform different parts of the processing and control. For example, the local computer could control the microscope and the tunable optical filter, while the cloud server performs neural network processing on the measurements to generate cell classification.

[0038] Figure 1E This is a schematic diagram illustrating the steps of a technique for calibration / training and predictive measurements according to an embodiment of the present invention. In step 180, the user selects a training sample, such as cells and corresponding labels (e.g., healthy, stressed, dead). In step 182, the spectrometer performs Raman measurements on the cells to generate Raman spectra. In step 184, the Raman spectra and associated labels are used by a computer as training data to train a neural network, and a set of compressed Raman filter weights are derived from the first hidden layer of the trained network. In step 186, the compressed spectrometer receives the filter weights, which can then be used to control a tunable optical filter to perform compressed Raman measurements using multiple filters. In step 188, the user selects a cell sample for classification. In step 190, the compressed spectrometer performs multiple compressed Raman measurements using multiple filters and sends the measurement results to a computer. In step 192, the computer inputs the compressed Raman measurements into the neural network (wherein these measurements replace the dot products in the first hidden layer of the trained calibration / training phase neural network), and the network outputs cell classification labels. In step 194, the user receives a classification label for the cell sample (e.g., healthy, stressed, or dead).

[0039] We tested this neural network architecture and its associated training procedure on a dataset containing Raman spectra of induced pluripotent stem cells (iPSCs), neural stem cells (NSCs), and neurons. We demonstrated classification accuracy up to 87% using only 4 filters and up to 91% using 5 filters. This is comparable to the accuracy of support vector machines or neural networks trained using full Raman spectra with more than 400 intensities. Therefore, our method reduces measurement time by two orders of magnitude, enabling high-throughput characterization of cell products.

[0040] We will now describe the methods and verification of this technology in more detail.

[0041] Instance datasets and preprocessing

[0042] We downloaded publicly available Raman spectroscopy datasets and removed failed measurements (spectroscopy with only zeros) to obtain 9308 spectra: 3850 spectra from 180 iPSCs, 2342 spectra from 176 NSCs, and 3116 spectra from 180 neurons. An average of 17.4 measurements were performed per cell. Measurements were distributed across 3 cell lines, with 3 technical replicates per cell line. For each technical replicate within each cell line, 20 cells were measured, with only one exception where data from only 16 cells were reported. Table 1 shows the classification of the datasets used. An overview of the raw spectra is as follows: Figure 2A , 2BAs shown.

[0043] Classification was generated using support vector machines and neural network model A (see below). Figure 3 and Figure 7A , 7B The spectra were preprocessed with baseline removal and normalization before the results were shown. Slowly changing baselines were estimated using asymmetric least-squares smoothing. For each spectrum, a smoothing penalty parameter of 10 was applied. 6 A smoothing algorithm is run for 10 iterations with an asymmetry parameter of 0.1, and the resulting baseline is subtracted from the original spectrum. The baseline-corrected spectrum is then normalized by dividing by the sum of all intensities. Preprocessing example: Figure 5A , 5B As shown. Figure 6A , 6B An overview of the preprocessed spectra is shown.

[0044] Support Vector Machine (SVM) Classification

[0045] For SVM classification, we used the SVC method from the Python library Scikit-learn (version 1.1.1) with default parameters. We used Scikit-learn's `train_test_split` function to reserve 20% of the dataset for testing. We used Scikit-learn's `accuracy_score` function to determine the prediction accuracy on the test set. For classification of preprocessed spectra, Scikit-learn's `StandardScaler` function standardized the training data by feature (i.e., per wavenumber). The raw spectra were not normalized before SVM classification.

[0046] Neural Network (NN) Model

[0047] The Python library TensorFlow (version 2.8.0) is used to build, train, and test all neural network models. The neural network model (Model A) used to predict cell type labels from preprocessed spectra uses three fully connected layers: an input layer with 443 units (each unit corresponding to a wavenumber), a hidden layer with 10 units and a ReLU activation function, and an output layer with 3 units and a softmax activation function. Figure 12A The layer weights are initialized using the default initializer. In the case of the raw Raman spectrum, the NN (Model B) consists of 5 layers: an input layer with 443 units, where each unit corresponds to a wavenumber; a hidden layer with N units and a ReLU activation function, where each unit corresponds to a filter to be optimized; a normalization layer that performs batch processing or layer normalization; a hidden layer with 10 units and a ReLU activation function; and an output layer with 3 units and a softmax activation function. Figure 12B The weights of layer 1 (input), layer 3 (normalized), and layer 5 (output) are initialized using the default initializer, while the weights of layer 2 (first hidden layer) and layer 4 are initialized using He uniform initialization. To impose a nonnegativity constraint on the weights of the first layer, we used TensorFlow's NonNeg constraint. For binary constraints, we developed a custom constraint method:

[0048]

[0049] This method first identifies all weights greater than the average of all weights, then calculates a new average only for these "high" weights. Then, all weights exceeding half the average of the high weights are set to that average, and all other weights are set to 0. This method ensures binary filter elements, but non-zero elements are not necessarily 1. Since arbitrary scaling factors can be easily incorporated into downstream classification models, optical filters can be implemented using elements limited to 0 and 1.

[0050] Before training, a holdout test set consisting of 20% of the data was created using the `train_test_split` function of Scikit-learn, stratified by class (i.e., cell type). In the case of preprocessed Raman spectra, the training data was normalized for features (i.e., wavenumbers) using the `StandardScaler` function of Scikit-learn, and then model A was trained for 20 epochs with a batch size of 32. In the case of raw spectra, no normalization was performed before training. Model B was trained for 200 epochs on the raw spectra with a batch size of 16. For simulated spectra, a batch size of 128 and 20 epochs were used.

[0051] For each set of parameters (Number of units N in the first hidden layer, normalization type on the normalization layer, and weight constraints in the first hidden layer), the model is trained on 5 different training-test splits. For each split, the model is trained 3 times, and the best-performing model is selected and... Figure 3 According to a report, to obtain a model with binary weights in the first hidden layer, model B is first trained with non-negative constraints on the weights in the first hidden layer. The weights of the resulting model are then copied to a new network with the same architecture but with binary constraints on the weights in the first hidden layer. Training this new model on the same training-test set split results in a final model with binary weights in the first hidden layer. Sparse classification cross-entropy is used as the loss function in all cases, and all models are trained using stochastic gradient descent with a learning rate of 0.01.

[0052] simulation

[0053] Raman spectra were simulated using conventional techniques. The intensity at wavenumber k = 50 was taken from the exponential probability density with unit averages, raised to a power of α = 3, and then divided by the sum of all intensities for normalization.

[0054] To create spectra of M=3 molecular species with controllable correlation levels j We first simulate the M+1 spectrum r j And define spectrum M+1 as the "common" spectrum. To create the relevant spectra s j Calculate the spectrum r j Linear combination:

[0055] in

[0056] For β = 1, all three spectra are identical to the common spectrum; for β = 0, the spectra are independent random variables (see...). Figure 10A B).

[0057] To simulate photon counting noise in the spectrum, a number of photons ν is randomly drawn from a multinomial distribution. The distribution parameters of the multinomial distribution are determined by the normalized spectral intensity s. jk Total number of photons N phot Given:

[0058]

[0059] in

[0060] To train and test the neural network model, 10,000 samples are drawn from the distribution of each molecular species, each sample being a complete spectrum with noise. The previous section described the partitioning of the training and test sets and the hyperparameters used to train the NN.

[0061] To simulate the counting noise after the filter, the filter output μ is first calculated. ij As a filter F i and spectrum s j dot product between:

[0062] in

[0063] Since the spectrum is normalized and each filter element is binary (0 or 1), therefore μ ij This is the fraction of the transmitted signal intensity, i.e., the optical efficiency of filter i for molecule species j. To simulate photon counting noise at the filter output, a number of photons n is randomly drawn from a multinomial distribution, the distribution parameters of which are normalized by the filter output p. ij Total number of photons N phot Given:

[0064]

[0065] in

[0066] Note that introducing photon counting noise before or after the filter is completely equivalent, since a linear combination of multinomial-distributed random variables is also multinomial-distributed. Since the filter we found through optimization based on the Bhattacharyya boundary (BB) (see next section) has an optical efficiency of approximately 1%, using N... phot The spectrum of the photon simulation is equivalent to that obtained using 0.01N. phot The output of the photon-simulated filter.

[0067] Filter optimization based on Bhattacharyya boundary

[0068] Réfrégier et al. ("Bhattacharyya bound for Raman spectrum classification with a couple of binary filters." Opt Lett 44, 2228 (2019), "Compressed Raman classification method with upper-bounded error probability." Opt Lett 44, 5836 (2019)) developed a compressed Raman classification method based on the maximum likelihood principle. In short, for a measurement of the number of photons *n* at the output of *N* filters, classification is performed by finding the spectrum with the highest probability of producing that measurement.

[0069]

[0070] The Bhattacharyya boundary (BB) is an upper bound on the classification error, which has the following form for polynomial (i.e., photon count) noise:

[0071]

[0072] This expression is valid if each class has the same frequency. As shown by Réfrégier et al., filters can be optimized by minimizing the BB boundary. The optimization algorithm starts with a set of random filters and attempts to “flip” filter elements from 0 to 1 or from 1 to 0. If such flips reduce the BB boundary, they are acceptable. If the sole objective is to minimize the BB boundary, the resulting filters may have only a few non-zero elements, which corresponds to low optical efficiency. Increasing some optical efficiency as another objective requirement makes optimization more challenging. Instead, here we initialize each filter by setting 1 / 3 of its elements to 1, and instead of flipping the individual elements, we try to swap randomly selected 0s with randomly selected 1s from the same filter, which preserves the fraction of non-zero elements. If the swap reduces the BB boundary, the swap is acceptable. We find that the algorithm converges quickly and results in filters with approximately 1% optical efficiency. To make a fair comparison between BB-based optimization and NN models, we do not require the filters to be orthogonal, as this may reduce achievable classification accuracy. The actual classification error or accuracy of the optimized filter is then obtained by classifying the output of the analog filter, where photon counting noise is introduced at the filter level.

[0073] To apply BB-based optimization to the measurement of Raman spectra of cells, we must modify the scheme developed by Réfrégier et al. Unlike the measurement of simple molecules, the variability between spectra of the same class (i.e., cell type) cannot be adequately described by (polynomial) photon counting noise or other measurement noise with simple distributions. Therefore, the BB given above is inappropriate. Instead, we assume the filter output is normally distributed, since a closed-form expression for BB exists in this case. The mean and covariance matrices of the filter output are given by the total N values ​​of cell type j in the dataset. data,j Estimated from the spectrum:

[0074]

[0075] m j =[m 1j , ...,m Nj ] T

[0076]

[0077] The superscript (l) indicates the measured sample. In the case of normally distributed noise, BB is given by the following equation.

[0078]

[0079] That

[0080]

[0081] Due to N from different cell types data,j The number of spectra is not equal, and the expression contains the probability P that a random sample from the dataset belongs to cell type j. j .

[0082] The same optimization algorithm as described above is used, except that the BB of the filter output for a normal distribution is employed. The actual classification error or accuracy of the optimized filter is then obtained by performing maximum likelihood classification on the measured spectra.

[0083]

[0084] Where μ = [μ1, ..., μ] N ]

[0085]

[0086] Where s is the measured spectrum, m is the corresponding filter output, and N(μ;m) j , Σ j ) is a value with mean m j The covariance matrix Σ j It follows a multivariate normal distribution.

[0087] Verification results

[0088] We began by exploring the practical applications of Raman spectroscopy in cell classification. We studied 320 cm⁻¹... -1 and 1800cm -1 The Raman intensity of the "fingerprint region" between cells. Because the original spectra highly overlap between different cell types ( Figure 2A , 2B We employ standard preprocessing steps to remove slowly varying baselines and normalize the spectra. Figure 5A , 5B Preprocessing reduces, but does not eliminate, spectral overlap. Figure 6A , 6B Given the highly similar mean spectra of different cell types (mean pairwise Pearson correlation of 0.97), one might assume that classifying individual measurements would be difficult. Conversely, Support Vector Machines (SVMs) and Multilayer Perceptrons (a simple neural network (NN)) were able to classify cells with 91% and 90% accuracy, respectively. Most misclassifications were due to confusion between NSCs and neurons. Figure 7A This may indicate that these cell types are more biochemically similar to each other compared to iPSCs. This is supported by the low-dimensional embedding of Raman spectroscopy. Figure 7BIn this study, iPSCs were largely separated from other cell types. Most misclassifications occurred where spectra from different cell types were close to each other in the embedding space. In summary, using a simple supervised learning method, properly preprocessed complete Raman spectra can be easily classified as belonging to different cell types.

[0089] Figure 2A , 2B This indicates that the original Raman spectra of iPSCs, NSCs, and neurons highly overlap. Figure 2A These are Raman intensity maps of different cell types before preprocessing. The dataset contains 3850 spectra from iPSCs, 2342 spectra from NSCs, and 3116 spectra from neurons. The solid line represents the median for each cell type at each wavenumber. The error bands represent the mean absolute bias calculated separately for positive and negative biases. Figure 2B This is the average intensity diagram of each Raman spectrum before preprocessing.

[0090] Next, we want to determine how much information from Raman spectroscopy should be used to achieve high classification accuracy. We first restrict the input data to a subset of Raman intensities, either by selecting them randomly or by picking the most variable intensities among cell types. Figure 8 SVM and NN exhibit very similar performance, which decreases as the number of data points used for learning decreases. Figure 9 When points are randomly selected, accuracy is generally low and decreases more rapidly with increasing intensity. For comparison, we also tested a simple binning scheme where intensity is averaged over intervals of equal size. Surprisingly, training on the binned spectra starting with 10 bins yielded better performance compared to using the most variable intensity, while less than 10 bins showed only slightly lower accuracy. Averaging within intervals may mitigate technical noise that compromises individual intensity. In conclusion, we determined that both feature selection and averaging have a positive impact on classification performance. Compressed sensing with optimal filters essentially combines both aspects and should therefore be able to achieve accurate classification.

[0091] We infer that neural networks (NNs) would be the most convenient model for compressed sensing because it allows us to perform feature selection (i.e., design the optimal filter) while simultaneously training the downstream classification model. Computing the activation of units in the first hidden layer of the NN involves calculating the dot product of the input (Raman spectrum) and the unit weights. This is mathematically equivalent to performing compressed Raman measurements with actual optical filters. This observation forms the basis of the proposed method, which consists of three stages (…). Figure 1A , 1B(1C). During the training phase, we optimize the weights of the NN classification model using the complete raw Raman spectrum labeled with cell type or state. In the implementation phase, we create a separate optical filter for each unit in the first hidden layer. The frequency response of each filter is given by the weights of the corresponding unit, as each individual weight is multiplied by a specific intensity in the input Raman spectrum. The prediction phase consists of compressed Raman measurements, which replace the dot product of the input layer and the spectrum with the weights from the raw NN model. After passing through the remaining layers of the NN, each measurement (which must include all recognized filters) results in a prediction of the cell label.

[0092] Since compressed measurements will be used as input to the NN model, we cannot use any preprocessing based on complete spectral knowledge (such as...). Figure 5A , 5B (As shown). However, efficient learning of NN models often requires normalized data. Therefore, we added a normalization layer after the first hidden layer of the NN and tested two common normalization strategies: batch normalization and layer normalization. Another complicating factor is that binary optical filters are easier to implement than filters with continuously varying frequency responses. Therefore, we wanted to add binary constraints to the weights of the first hidden layer. Empirically, we found that training NNs directly with such constraints is often unsuccessful. Instead, we first trained an NN requiring non-negative weights in the first hidden layer. Then, starting with a pre-trained network, we introduced binary constraints. Finally, we wanted to investigate how many optimal filters (i.e., units in the first hidden layer) are needed to achieve acceptable classification accuracy. In summary, for 4 or more filters, layer normalization yielded better results than batch normalization. Figure 3 Interestingly, for 5 or more filters, model performance is not degraded by binary constraints if layer normalization is used. Models with binary weights may benefit from additional training epochs (starting with a pre-trained network with non-negative weights), and binary constraints can also effectively tune the network. Model performance increases with the number of filters, up to a maximum of 50, after which performance declines and becomes more variable. It is possible that if classification accuracy is already high, using more filters may introduce additional noise, which may outweigh any advantage. Furthermore, the capacity of the NN increases with the number of units in the first hidden layer, which may lead to higher variance in the model, resulting in poorer generalization. Most importantly, using layer normalization and binary weights in the first hidden layer requires only 4 filters to achieve up to 87% classification accuracy, and 5 filters result in up to 91% accuracy. Therefore, this model achieves similar accuracy to a model using all 443 Raman intensities. Figure 7A , 7BNotably, even with only three filters, the NN model is more accurate than the SVM model trained on the complete, original Raman spectrum. In summary, our results suggest that only four to five compressed measurements using optimized filters should be sufficient for accurate classification. This represents a two-order-of-magnitude reduction in measurement time compared to acquiring the complete Raman spectrum.

[0093] Figure 3 This is a graph showing the relationship between accuracy and the number of filters, illustrating how just 4 or 5 compressed measurements are sufficient to classify cell types with high accuracy. The graph shows the accuracy of a test set preserved by an NN model with a different number of units (= #filters) in the first hidden layer of the neural network (NN) or by an optimization based on Bhattacharyya boundaries (BB) with a different number of filters. Two different constraints on the weights (“non-negative” or “binary”) are used in the first hidden layer, and two types of normalization (“layer” or “batch” normalization) are used after the first hidden layer. The 5 data points shown for each parameter (#filter, constraint, normalization) correspond to 5 different partitions of the data into the training and test sets for the NN model. For the BB model, the optimization was run 5 times on the full dataset. The horizontal dashed line represents the accuracy of a support vector machine trained on the raw, unnormalized Raman spectrum, and the horizontal solid line corresponds to the naive model that always predicts the most frequent class.

[0094] Next, we compare our NN model with existing filter optimization methods in the art, which are based on minimizing the upper bound of the maximum likelihood classification (MLC) error, i.e., the Bhattacharyya boundary (BB). We first simulate Raman spectra with different correlation levels, assuming that photon counting noise is the only source of variability. Figure 10A , 10B We adopted the optimized algorithm described by Réfrégier et al. and confirmed that the achieved classification error was lower than BB( Figure 10C In simulated spectra with varying correlation levels, our NN model performs comparably to MLC with a filter optimized by minimizing BB. Figure 10D Because the publicly available filter optimization algorithm assumes a multinomial noise distribution, it produces a very poor classification accuracy of approximately 0.4 when applied to measured Raman spectra of cells. Therefore, we extend the BB-based optimization algorithm by assuming a normally distributed filter output and estimating the parameters of a multivariate normal distribution based on the data. The resulting filter significantly improves the MLC accuracy, but our NN model is still superior. Figure 3 ).

[0095] Figure 4A ,4B The output modes of the five optimal filters are shown to encode cell types. Figure 4A A graph showing the weight magnitude versus wavenumber exponent is presented, illustrating the weights learned by the model under non-negative or binary constraints. The fractions of non-zero weights are calculated for the binary filter. Figure 4B The dot product of the original Raman spectra averaged for each of the five filters and each cell type is shown, along with subsequent normalization plots by filter and cell type.

[0096] Since using 10 filters instead of 5 in the NN model only improves accuracy by an additional 2%, we believe that the 5-filter model represents the optimal balance between accuracy and the necessary number of filters. Therefore, we decided to further characterize the model ( Figure 4A , 4B And compare different training scenarios. An examination of the model's weights shows that the binary weights closely follow the non-negative weights of the pre-trained model. Figure 4A This may explain why accuracy typically does not decrease when binary constraints are applied. An examination of the dot product of the spectra and weights of the five filters reveals that each cell type activates a different subset of filters. Figure 4B This effectively defines simple encodings for the three cell types. Two of the five filters have very similar activation patterns, suggesting that one of them is almost redundant. This explains why the model with four filters is only slightly less accurate than the model with five filters. When trained on all available data, test accuracy exceeds 90%, and the confusion between neurons and NSCs is greatest. Figure 11A ), just like models based on the complete spectrum ( Figure 7A We also wanted to investigate, for example, the extent to which biological variability manifested in differences between cell lines affects classification performance. Therefore, we trained a model with 5 filters on 2 of the 3 cell lines in the dataset and predicted cells originating from the third cell line. The classification accuracy was only 69%, and there were more frequent confusions between neurons and NSCs compared to using all available data. Figure 11B For comparison, we trained a 5-filter model on only cells from a single cell line and tested it on a retainer population from the same cell line. In this case, the accuracy was as high as 94% (87% average), and the frequency of confusion was lower than that of predictions across cell lines. Figure 11CIn summary, we observed that biological variability affects classification accuracy, but this effect can be completely mitigated by using representative training data. Finally, we wanted to test whether the spectral resolution of the optical filter setup significantly affects classification accuracy. To this end, we trained a neural network model with 5 filters on average measured spectra within intervals of the same size. Surprisingly, accuracy decreased only slightly with increasing bin size, and remained >80% when trained using only 44 wavenumber bins. Therefore, the neural network model can produce useful filters even with significantly reduced spectral resolution.

[0097] In this paper, we describe a neural network approach for designing optimal filters for compressed Raman classification. This approach was tested on a dataset containing three different cell types. We demonstrate that the minimum NN model requiring only 5 filters delivers high classification accuracy (>90%).

[0098] In the embodiments described above, we trained our model on iPSC differentiation experiments. Such a model can be immediately used to assess appropriate differentiation before the application of derived cells. Similarly, the model can be trained on reprogrammed cells and used to assess reprogramming status.

[0099] The embodiments described above are for illustrative purposes. The techniques of the present invention can be implemented in a variety of alternative ways. For example, we envision various computational and experimental variations. Computationally, embodiments of the invention may include adding information about the baseline and providing additional filters that can predict the baseline from the raw spectrum. If desired, embodiments may include additional loss terms penalizing zero-filter elements in the model definition. Furthermore, embodiments may include constraining the filters to be orthogonal, allowing compressed measurements to occur in parallel. Experimentally, embodiments may include techniques for reducing measurement noise. Above, we have demonstrated that a simple binning scheme improves classification performance. Therefore, embodiments may include combining multi-point measurements of individual cells or acquiring signals from a larger range.

[0100] Figure 5A , 5B The graph shows the relationship between measured intensity and wavenumber, illustrating how preprocessing removes slowly changing baselines and normalizes the spectrum. Figure 5A The baseline calculated by subtracting asymmetric least-squares smoothing from the original measurements is shown. Figure 5B The baseline correction measurements shown are normalized to the sum of the intensities of all wavenumbers considered.

[0101] Figure 6A , 6BThis is a graph showing the relationship between intensity and wavenumber, illustrating how preprocessing (baseline removal and normalization) reduces, but does not eliminate, overlap in the Raman spectra. The solid line represents the median for each cell type. The error bands represent the mean absolute deviation calculated separately for positive and negative deviations. Figure 6A The complete fingerprint information area is displayed. Figure 6B Showing from 319cm -1 Up to 673cm -1 The magnified portion of the image.

[0102] Figure 7A , 7B This is a diagram illustrating how support vector machines and neural networks classify cell types with high accuracy. Figure 7A This shows a confusion table for SVM or NN classification that retains the test data. Figure 7B This shows the two-dimensional embedding of the data. The first row shows the data projected onto the first two principal components. The second row shows the two-dimensional t-distributed random neighborhood embedding (t-SNE). The second and third columns show only the test samples, highlighting samples that were incorrectly predicted by the SVM or NN.

[0103] Figure 8 This diagram illustrates the most informative Raman intensity variation through selection of variability across cell types. Top: Average Raman spectrum for each cell type. Bottom: Wavenumbers (standard deviation) with the largest intensity variation in the average spectrum. The fraction of wavenumbers included is shown on the y-axis.

[0104] Figure 9 This is a graph of accuracy versus the number of wavenumber bins, showing how classification accuracy increases with the number of wavenumbers or wavenumber bins included when training on preprocessed spectra. The accuracy is calculated on the retained test set for a Support Vector Machine (SVM) or Neural Network (NN) model trained on the preprocessed full or subset spectra. For results labeled "Best" or "Random," a subset of wavenumbers is selected based on the most variable wavenumber ("Best") or a random wavenumber ("Random"). For results labeled "Binded," Raman intensities are binned into wavenumber bins of the same size and averaged. The horizontal line represents the accuracy of the naive model that always predicts the most frequent class.

[0105] Figure 10A , 10B Figures 10C and 10D illustrate how optimization and neural network models based on the Bhattacharyya boundary perform similarly on simulated data.

[0106] Figure 10A Examples of simulated spectra with different Pearson correlations (corr) are shown. Figure 10BThe correlation between spectra and the fractions of a shared “common” spectrum is shown. Spectra of three classes were created by simulating four spectra and defining one as the “common” spectrum. To establish the correlation, a linear combination was calculated: (1-b)*spectrum + b*common spectrum, where b is the reported fraction on the x-axis. For b = 1, all three spectra are identical; for b = 0, these spectra are generated by independent random processes. Figure 10C The Bhattacharyya boundary (BB) and the classification error based on BB are shown for various correlation levels and photon numbers. The achieved error is always smaller than the BB boundary. Figure 10D The results show the spectrum and the number of photons (N) phot The classification accuracy of NN models or BB-based optimizations with different correlations between ) is compared. For BB-based optimization, N phot This refers to the number of photons after the filter; for the NN model, it refers to the number of photons from the full spectrum before the filter. Since the filter produced by the BB-based optimization in our simulation has an optical efficiency of approximately 1%, 1000 photons from the BB-based optimization are equivalent to 10000 photons from the NN model.

[0107] Figure 11A , 11B Figures 11C and 11D illustrate how biological variability affects prediction accuracy.

[0108] Figure 11A , 11B 11C shows a confusion table used for: training and testing with all data ( Figure 11A ), using two cell lines for training and predicting a third cell line ( Figure 11B ), and use cells from the same cell line for training and testing ( Figure 11C ). Figure 11D The diagram shows the classification accuracy of an NN model with 5 units in the first hidden layer (with layer normalization and binary weights) for retaining the test data when trained on the average spectrum within bins of equal size (= continuous intervals).

[0109] Figure 12A , 12B This is a table showing the characteristics of a neural network model. The neural network model is visualized using TensorFlow's `plot_model` function. Figure 12A Model A, used for preprocessed spectral classification, is shown. Figure 12B Model B is shown, which uses binary constraints introduced on the weights of the first hidden layer for classification of the raw spectrum and optimal filter design. An example with 5 units in the first hidden layer is shown.

[0110]

[0111] Table 1 shows a detail of the dataset used in the training.

Claims

1. A method for cell classification based on Raman spectroscopy, the method comprising: a) Compressed Raman spectroscopy of cell samples; The compressed Raman measurement includes: i) Perform laser microscopy on cell samples to generate collimated light signals. ii) Disperse the collimated light signal using a diffraction element to generate a dispersed light signal. iii) The scattered light signal is frequency filtered by a tunable optical filter to generate a filtered signal, wherein the tunable optical filter selects the wavenumber range of the scattered light signal. The frequency response of the tunable optical filter is defined by weights; as well as iv) The filtered signal is detected by an optical detector to generate a compressed Raman measurement; b) Repeat step (a) with different tunable optical filter weights to generate multiple compressed Raman measurements; c) Process the multiple compressed Raman measurements using a predictive neural network to predict the label of the cell sample; d) Output the labels of the cell samples for research purposes or quality control; The tunable optical filter weights, which define the frequency response of the tunable optical filter, are derived from the training weights of the first hidden layer of the calibration stage neural network, which is trained based on training data including the Raman spectra of cells and corresponding labels including cell type or cell health. The prediction neural network is derived by removing the weights of the input layer and the first hidden layer from the calibration stage neural network, while retaining the bias of the first hidden layer and the weights and biases of all subsequent layers of the calibration stage neural network.

2. The method according to claim 1, wherein the neural network in the calibration stage is a multilayer perceptron neural network.

3. The method according to claim 1, wherein the optical detector is a photomultiplier tube.

4. The method of claim 1, wherein the tunable optical filter is implemented using a spatial light modulator.

5. The method according to claim 4, wherein the spatial light modulator is a digital micromirror device.

6. The method of claim 1, wherein the calibration stage neural network has a normalization layer after the first hidden layer.

7. The method of claim 1, wherein the calibration phase neural network trained based on training data is pre-trained using constraints that the weights in the first hidden layer are non-negative, and then further trained using constraints that the weights in the first hidden layer are binary.

8. The method of claim 1, further comprising transmitting different tunable optical filter weights from a computer to the tunable optical filter.

9. The method of claim 1, further comprising transmitting a plurality of compressed Raman measurements from the optical detector to the predictive neural network.

10. The method of claim 1, wherein transmitting a plurality of compressed Raman measurements from the optical detector to the predictive neural network comprises transmitting the plurality of compressed Raman measurements from the optical detector to a cloud-based server via a digital computer network.

11. The method of claim 1, wherein processing the plurality of compressed Raman measurements by the predictive neural network to predict the label of a cell sample comprises inputting the plurality of compressed Raman measurements into the predictive neural network, wherein the plurality of compressed Raman measurements replace the dot product of the Raman spectra with weights in a first hidden layer of the calibration phase neural network.

12. The method of claim 1, further comprising training the calibration stage neural network using training data including Raman spectra and corresponding labels; and transferring the training weights of the first hidden layer of the calibration stage neural network to the tunable optical filter.