Based on brightfield imaging and ML, the overall differentiation process can be intelligently monitored and optimized. At the PSC stage, we developed an ML model that could predict the final differentiation efficiency according to the morphological features of initial PSC colonies, to determine the most suitable or appropriate time point to initiate differentiation (Figure 4A,B). The differentiation efficiency predicted by the random forest model is highly correlated with the true differentiation efficiency (Pearson's r = 0.76, P < 0.0001) (Figure 4B). The trained model also highlights features that are most important to the differentiation. Among all the colony morphological features, standard deviation, minimum, and min/max ratio of center-contour distances (CCD), as well as circumference, area, area/circumference ratio, convexity, and circularity, are the 8 features with the most importance weight. The relationship between these features and the final efficiency suggests that initial PSC colonies with moderate area and with longer, irregular peripheries tended to possess higher differentiation efficiency (Figure 4A), which inspires us to improve the differentiation efficiency by increasing the processing time of the digestion solution to yield smaller colonies with longer, more irregular boundaries (see Protocol step 1.3.1). ML-based monitoring of PSC colonies and the optimized cell passaging operations realize the optimization of the initial cell state.
At stage I of cardiac differentiation, we assessed and adjusted the dose of CHIR (an inducer for early cardiac differentiation) by using ML. Using logistic regression, CHIR dose can be evaluated early using 0-12 h time-lapse brightfield images. The logistic regression classifier achieves 93.1% accuracy, 88.7% precision, 94.5% recall, 91.1% F1 score, and 97.2% AUC when CHIR duration is selected as 24 h. The Deviation Scores (predicted result) are highly correlated with "ΔCHIR Concentration" (true result) for each CHIR dose condition in experiments (Pearson's r = 0.82, P < 0.0001) (Figure 4C,D), suggesting that ML prediction can reflect the deviation of CHIR doses from optimum. With early evaluation of CHIR doses, we can adjust CHIR treatment duration or concentration towards the optimum before 48 h, allowing us to promptly rectify the misdifferentiated cell trajectory and sustain CM differentiation in high efficiency.
We also built ML models to recognize CPCs and CMs informatively from brightfield images at stage II and stage III of differentiation (Figure 5A-D). By inputting brightfield images of live cells, trained ML models can predict the regional distribution of CPCs and CMs and evaluate the final differentiation efficiency non-invasively. For CPC recognition, the CPC segmentation masks predicted by ResNeSt and Grad-CAM match with manually annotated masks (Figure 5A), with a mean IoU of 59.0%. The predicted proportion of CPC regions can also serve as an indicator for the final differentiation efficiency (Pearson's r = 0.88, P < 0.0001) (Figure 5B). For CM recognition, the pix2pix model can generate cTnT fluorescence images that are similar to true (experimentally obtained) cTnT fluorescence images (Figure 5C), with a high correlation between predicted and true whole-well Differentiation Efficiency Index (Pearson's r = 0.93, P < 0.0001) (Figure 5D). This approach avoids irreversible damage to cells caused by immunofluorescence staining or flow sorting. Based on a photoactivated probe (DACT-1), we successfully achieved efficient region-selective CPC purification without biomarkers (Figure 5E,F), thus enabling real-time purification of the desired cell type during the differentiation process.
Thus, by harnessing live-cell brightfield imaging and ML, the methodology realizes real-time cell lineage prediction and efficiency evaluation in the entire differentiation process, modulating and stabilizing PSC differentiation.

Figure 1: Schematic of the ML-assisted CM differentiation workflow. The experimenter performs cardiac differentiation and obtains time-lapse brightfield cell images from a microscope; images at each stage of CM differentiation are passed to trained ML models for prediction; using the prediction as feedback, experimenters modulate and optimize the differentiation scheme in real time to achieve stable, high-efficiency differentiation. Scale bar = 1 mm. Please click here to view a larger version of this figure.

Figure 2: Cell image acquisition. (A) Example of a brightfield live-cell image from the PSC stage with 70% cell confluency. (B) Example of a brightfield live-cell image from the PSC stage with 80-90% cell confluency. (C) Example of a brightfield live-cell image from the CPC stage. (D) Example of a brightfield live-cell image from the CM stage. (E) Example of bright field and fluorescence after immunofluorescence staining from the same field of view. (A-E) Scale bar = 250 µm. Abbreviations: PSC = pluripotent stem cell; CPC = cardiac progenitor cell; CM = cardiomyocyte; cTnT = cardiac Troponin T. Please click here to view a larger version of this figure.

Figure 3: Screenshots for ML usage. (A-C) Representative screenshots for ML at the PSC stage, including (A) dataset preparation, (B) testing model performances, and (C) interpretation of feature importance. (D-F) Representative screenshots for ML at stage I, including (D) dataset preparation and (E,F) model evaluation. (G-I) Representative screenshots for ML at stage II, including (G) dataset preparation, (H) model training, and (I) model evaluation. (J-L) Representative screenshots for ML at stage III, including (J) model training and (K,L) model evaluation. Abbreviations: ML = machine learning; PSC = pluripotent stem cell. Please click here to view a larger version of this figure.

Figure 4: Representative results at the PSC stage and stage I for ML-based CM differentiation. (A) Results of feature visualization at the PSC stage. The relationship between differentiation efficiency and the eight most important features is shown. Feature importance is determined by the trained ML model. The range of each feature is divided into 20 bins. Differentiation Efficiency Indexes for wells within each bin are averaged and displayed by color. The trend of the color change represents how each morphological feature influences the final differentiation efficiency. These results together suggest that moderate area, longer circumferences, more varying center-contour distances, lower circularity, and higher convexity are more conducive to differentiation. (B) Performance evaluation of ML at the PSC stage by correlation analysis between the true and the predicted Differentiation Efficiency Index. The high correlation indicates that the differentiation potential of PSC colonies can be predicted from its morphological features. n = 584 wells. (C) Performance evaluation of ML at stage I using correlation analysis between predicted Deviation Scores and true ΔCHIR Concentrations for each CHIR dose condition in a batch. Deviation Scores (ranging from -1 to 1) are predicted non-invasively by ML using 0-12 h brightfield image streams. ΔCHIR Concentrations (…, -4 µM, -2 µM, 0, 2 µM, 4 µM, …) are experimentally determined by the final differentiation results to measure the actual deviation from optimal conditions for each CHIR condition. Predicted Deviation Scores are highly indicative of the actual ΔCHIR Concentrations, suggesting that ML prediction can serve as a signal for CHIR dose assessment and adjustment. Blue and red boxes represent underdose and overdose conditions, respectively.(D) Performance evaluation of ML at stage I using cross-batch validation. In each round, one batch is used for testing while others are for training, to test the generalization ability of ML models on new batches. Correlation analysis between predicted Deviation Scores and true ΔCHIR Concentrations (under a CHIR duration of 24 h) is conducted. The color of the dots represents different testing batches. n = 20 CHIR doses. This figure was taken from Yang et al.35. Abbreviations: ML = machine learning; PSC = pluripotent stem cell; CHIR = CHIR99021. Please click here to view a larger version of this figure.

Figure 5: Representative results at the CPC stage and CM stage for ML-based CM differentiation. (A) Typical result of ML for CPC recognition at stage II. Shown are the true cTnT fluorescence images on day 12 (left), the manually annotated CPC regions (middle), and the CPC regions predicted by ML using brightfield images on day 6 (right). The predicted results closely resemble the actual experimental outcomes. Scale bar = 1 mm. (B) Performance evaluation of ML at stage II using correlation analysis between the true Differentiation Efficiency Index (from day 12 cTnT fluorescence labels) and the predicted percentage of CPC regions (from day 6 brightfield images). The high correlation suggests that differentiation efficiency can be predicted non-invasively at stage II. True Differentiation Efficiency Indexes are normalized between 0% and 100%. n = 35 wells. (C) Typical result of ML for CM recognition at stage III. Shown are the true cTnT fluorescence results (left), the predicted cTnT fluorescence results (middle), and the heatmap for comparing predicted and true fluorescence intensities at each pixel (right). Fluorescence images are resized to 512 x 512 pixels, and numbers in the heatmap bins represent the frequency counts of pixels per 100. A large proportion of pixels is located along the diagonal line of the heatmap, indicating that the predicted and true fluorescence intensities are close. Scale bar = 1 mm. (D) Performance evaluation of ML at stage III using correlation analysis between the true and predicted Differentiation Efficiency Indexes. True and predicted Differentiation Efficiency Indexes are normalized between 0% and 100%. n = 36 wells. (E) Image-identified CPC purification effect of day 6. After FACS and 6 days of culture, unlabeled image identified-CPCs show high CM purity compared with DACT-1-labeled non-CPCs and cells of the control (CTL) group. Scale bar = 100 µm. (F) Quantitative analysis of the purification effect by comparing the percentage of cTnT+ cells in (E). Data are means ± SD. n = 5 images. * P < 0.05; **** P < 0.0001 by one-way ANOVA followed by Dunnett's multiple comparisons tests. This figure was taken from Yang et al.35. Abbreviations: ML = machine learning; PSC = pluripotent stem cell; CPC = cardiac progenitor cell; CM = cardiomyocyte; cTnT = cardiac Troponin T. Please click here to view a larger version of this figure.
| Problem Observed | Possible reason | Solution |
| ML models do not perform well on the training set. | 1. Training of the ML model does not converge well.
2. For traditional ML, the extracted image features are not informative enough to reflect cell states and lineages.
3. For deep learning, the representation power of the designed neural network is not enough to perform the task.
4. The task itself is difficult to learn. | 1. Tune hyperparameters, e.g., increase the number of epochs and modify the learning rate.
2. Observe the images to find morphological clues about the cell states. Design biologically plausible features.
3. Modify the network architecture to increase its complexity.
4. Examine the dataset and ensure the features of target cells can be easily identified. If the model fails to learn the task, try to apply ML at a stage where imaging clues are more clear or to design a simpler task. |
| ML models do not perform well on the training set but not on the test set. | 1. The model overfits the training set. | 1. Enrich the training datasets and retrain the model. Increase the diversity of the training datasets by including more cell lines, differentiation conditions, and imaging conditions.
For traditional ML, use feature selection to decrease the number of input features may also increase the model's generalization ability. |
| ML models do not perform well on new batches or new cell lines. | 1. Microscope and imaging parameters change.
2. Morphological features of different cell lines might be different. | 1. Ensure that the imaging device is the same as that during model training.
2. Collect labeled data acquired from new cell lines and/or new imaging conditions, Retrain or fine-tune the ML models. |
| ML-guided modulation of the differentiation process does not appear to improve the differentiation outcome. | 1. The ML output is inaccurate.
2. Issues exist in the experimental reagents or procedures.
3. The cell line has underlying issues, lacking the ability to differentiate. | 1. Attempt the troubleshooting steps mentioned above.
2. Inspect the laboratory reagents and experimental procedures.
3. Change cell lines. |
| Cell-type contamination still exists after purification. | 1. Inaccurate prediction results.
2. Some unwanted cells located at the edge of the purified area were encapsulated. | 1. Optimize the ML-predicted results.
2. Use the ML-predicted results more conservatively, i.e., appropriate reduction in the size of the CM region. |
| Poor cell status after purification. | 1. Laser phototoxicity.
2. Slow operation process.
3. Cell damage caused by digestion.
4. Cell damage caused by the flow sorting process. | 1. Eliminate the unwanted cells via laser irradiation instead of target cells.
2. Faster operation.
3. Adjust the passaging method, such as reducing the concentration of digestive enzymes.
4. Adjust the sorting method, such as lowering the cell flow velocity set during the sorting process. |
Table 1: Troubleshooting table.