Skip to main content
Nature Communications logoLink to Nature Communications
. 2026 Sep 4;17:10526. doi: 10.1038/s41467-026-77533-w

Automated kinetic-scheme-free sorting of single-molecule fluorescence events using a deep learning based hidden-state method

Shuqi Zhou 1,#, Wenqi Zeng 2,#, Yuan Yao 2,✉, Chunlai Chen 1,✉
PMCID: PMC13639017  PMID: 42834079

Abstract

Single-molecule fluorescence techniques have revolutionized our ability to probe biomolecular dynamics by resolving molecular heterogeneity and transient states inaccessible to ensemble measurements. However, conventional analysis pipelines remain constrained by several factors that compromise both reproducibility and the detection of rare but biologically significant events. To overcome these challenges, we developed DASH, an automated framework that integrates bidirectional long short-term memory networks, conditional random fields, and hidden Markov models for unbiased analysis of single-molecule fluorescence trajectories. This unified platform performs three critical functions: (1) automated trajectory classification, (2) conformational state assignment, and (3) kinetic-scheme-free event sorting, all without requiring user-defined kinetic models. We demonstrate DASH’s broad applicability across diverse protein and nucleic acid systems. By eliminating manual intervention and any predefined kinetic schemes in the event-sorting stage, DASH provides a standardized, generalizable platform for extracting comprehensive mechanistic insights from single-molecule kinetics, particularly for systems exhibiting complex dynamic heterogeneity.

Subject terms: Single-molecule biophysics, Software, Software


Single-molecule fluorescence reveals hidden biomolecular dynamics, but analysis relies on manual curation and user-defined kinetic models. Here, authors present DASH, an automated framework that sorts events without predefined kinetic schemes, enabling unbiased discovery of molecular complexity.

Introduction

Single-molecule fluorescence resonance energy transfer (FRET) has become a cornerstone technique for investigating biomolecular interactions and conformational dynamics with nanometer-scale resolution in real time. The FRET relies on distance-dependent energy transfer (typically 1–10 nm) between two fluorophores, serving as a molecular ruler for proximity measurements1,2. Unlike conventional ensemble FRET measurements that mask heterogeneous behaviors through population averaging, single-molecule FRET reveals transient intermediates, rare conformational states, and dynamic processes that are otherwise inaccessible. Thus, single-molecule FRET approach has revolutionized our ability to probe real-time structural dynamics3 and interaction kinetics at the single-molecule level. The versatility of single-molecule FRET is demonstrated by its broad applications across biophysics to elucidate conformational dynamics and molecular mechanisms of proteins and nucleic acids3,4, such as the ribosome4–7, Cas proteins8–11, membrane proteins12–16, chromatin17, RNA riboswitches18,19.

A typical single-molecule FRET analysis pipeline includes: spectral channel alignment, fluorescent spot identification, intensity quantification, fluorescence traces segmentation and classification, molecular state assignment, and fluorescence events sorting for kinetic analysis. Assigning distinct molecular states based on fluorescence and FRET signals and extracting kinetic parameters from single-molecule FRET data can be challenging due to the inherent complexity of biomolecular dynamics, which varies among different molecules of the same experimental condition and across distinctive experimental designs. Existing methods for single-molecule FRET analysis can be grouped into the following categories. Classical HMM-based tools, including HaMMy20, vbFRET21, and STaSI22, provide robust state assignment and kinetic parameter extraction but require manually curated input traces and either user-specified or semi-automated state number selection, with no capacity for automated trace classification or event sorting. Deep learning tools, including AutoSiM23, DeepFRET24, Deep-LASI25, and the recently introduced transformer-based foundation model META-SiM26, automate trace classification with high accuracy, but their state assignment stages rely on supervised training with labeled state data or predefined state numbers, and none provides kinetic-scheme-free event sorting. A systematic blind benchmark of eleven analysis tools27 confirmed that while these tools achieve excellent FRET efficiency recovery, kinetic heterogeneity and model complexity remain significant challenges across existing frameworks. Collectively, these limitations undermine the reliability of conventional analyses when applied to new biological systems or experimental designs—especially when the number or identity of molecular states is unknown a priori.

To address these limitations, we introduce DASH (Deep learning-based Automatic Sorting by identifying Hidden states in fluorescence events), a deep learning framework designed to automatically sort fluorescence events while eliminating the need to predefine the number or type of molecular states and bypassing reliance on user-defined kinetic models. DASH integrates three modules: traces segmentation and classification, state assignment, and kinetic-scheme-free events sorting, to achieve three critical advances: (1) fully automated identification of fluorescence events and their temporal boundaries via a supervised Bi-LSTM/CRF model, (2) HMM-based assignment of discrete FRET states for both steady fluorescence signals and dynamically emerging signals using the pre-classified events from Stage 1, and (3) kinetic-scheme-free event sorting of single-molecule FRET traces without any predefined kinetic scheme or prior biological knowledge. Thus, DASH provides a universal, highly effective platform for high-throughput single-molecule FRET studies.

Results

DASH workflow and validation

As a proof-of-concept study, we apply DASH to process two-color FRET signals containing traces of a donor and an acceptor (Figs. 1a and S1). The DASH framework implements a three-stage workflow (Fig. 1): (1) fluorescence traces segmentation and classification, (2) FRET state assignment, and (3) kinetic-scheme-free events sorting. Such workflow enables the DASH to handle traces with different signal patterns, including steady fluorescence signals appeared at the moment of data collection, and dynamically emerging signals appeared in the middle of the measurement (Supplementary Fig. 1).

Fig. 1. DASH analytical workflow.

Fig. 1

a Examples of two-color fluorescence traces. Green line represents donor (Cy3) intensity, red line represents acceptor (Cy5) intensity. b Trace segmentation and classification (Stage 1) where raw fluorescence intensity-time traces are processed to detect discrete fluorescence events (donor/acceptor disappearance) and determine temporal boundaries (start/end time points). Bi-LSTM bidirectional long short-term memory, FC fully connected layer, and CRF conditional random field. c Individual fluorescence traces are classified into three classifications by the DASH model: donor disappearance, acceptor disappearance, and discarded. Segments after signal disappearance (gray shading) are shown, which are not included in further data analysis. d State assignment (Stage 2) where Hidden Markov Model (HMM)-based analysis assigns discrete FRET states to trace segments from Stage 1. e Kinetic-scheme-free event sorting (Stage 3) where fluorescence events are automatically sorted based on their state composition — the number and identity of visited FRET states — derived from Stage 2, without requiring any predefined kinetic scheme. Please refer to Method section for details about the network. The exposure time was 100 ms per frame.

Trace segmentation and classification

At this stage, DASH processes raw fluorescence intensity-time signal traces to identify authentic fluorescence events and to define their temporal boundaries (start/end time points). Its architecture (Fig. 1b) contains a bidirectional long short-term memory (Bi-LSTM) network with a conditional random field (CRF) layer. Bi-LSTM networks are well-suited for modeling temporal dependencies in sequential data such as fluorescence traces and capturing bidirectional contextual relationships (forward and backward states) through autoregressive processing of intensity fluctuations. CRF layers exploit bi-LSTM-derived feature embeddings to probabilistically model label dependencies and state transition constraints. In FRET analysis, CRFs can help classify the sequence of molecules by considering the probabilities of transitioning between these classification labels. By optimizing the transition matrix and calculating the whole sequential likelihood, CRFs ensure that the predicted sequential label is globally optimal, considering the dependencies between adjacent labels. This is essential for accurately extracting kinetic information from FRET traces. Our network is trained in a supervised manner using two-color FRET traces containing either steady signals or dynamically emerging signals annotated by our previously developed DEBRIS methods (Supplementary Figs. 1 and 2, Supplementary Table 1)28–32, which provides ground-truth labels for event boundaries and trace classifications. Thus, the Bi-LSTM/CRF synergy in our network extracts features from raw intensity signals and outputs events into three classifications: donor disappearance, acceptor disappearance, and discarded (Fig. 1c). Only authentic events classified as the class of donor disappearance or acceptor disappearance proceed to the state assignment.

State assignment

As for the second stage, we use the Hidden Markov Model (HMM) to assign discrete states for authentic fluorescence events classified via stage 1 (Fig. 1d). HMMs are suitable for FRET data because they model time-dependent transitions between hidden states, which correspond to molecular conformations with different FRET efficiencies. Observed fluorescence intensities are treated as outputs probabilistically determined by these underlying states, and inter-state transitions follow Markov processes, representing events like intermolecular interactions or intramolecular structural changes. Specifically, FRET traces of single experiments are concatenated together and globally analyzed by HMM. The number of states is chosen based on a scoring framework that jointly evaluates model fit, state separability and the quality of transition dynamics. The output of this stage is inferred FRET state traces, which represent the most likely sequence of hidden states over time.

Kinetic-scheme-free event sorting

Utilizing frame-by-frame state assignment derived from fluorescence events, we implement kinetic-scheme-free automated sorting based on signal transition patterns (Fig. 1e). Here, “kinetic-scheme-free” means that fluorescence events are classified solely by their state composition—the number and identity of visited FRET states and transition patterns among the states—without any predefined kinetic scheme, transition topology, or prior biological assumptions. It is important to clarify that the HMM used in Stage 2 serves only as a mathematical tool for denoising and state inference, not as a pre-imposed biological kinetic model. Overall, this approach enables unbiased analysis of single-molecule data and offers a data-driven perspective on biomolecular dynamics without the need for any prior knowledge.

Unbiased event classification and state assignment in steady FRET traces

The performance of DASH on classification of steady FRET signals was validated using ~ 20% of the total manual selection trace, defined as the test dataset (Supplementary Table 1 and Supplementary Fig. 2), which contains five subsets collected using samples of the ribosomes29, β₂AR30, and DNA Holliday junctions32. Compared to manually classified results, DASH exhibits an average accuracy score of 0.91 (Fig. 2a) across five datasets, indicating that the model performs comparably to that of human experts, because even the consistency between classifications from two independent experts was approximately 0.928. The DASH model localizes fluorescence event boundaries with 99% agreement to manual labels and closely matches manual-label derived FRET distributions (Fig. 2b–f).

Fig. 2. DASH-based analysis of static single-molecule FRET traces.

Fig. 2

a Confusion matrices compare DASH-predicted event classifications against manual labels. D dis: donor disappearance, A dis: acceptor disappearance. Accuracy represents the proportion of correct predictions relative to total traces. Normalized FRET histograms (top) and distributions of state number per trace (bottom) for ribosome (b), HJ with 1 mM Mg2+(c), HJ with 500 mM Mg2+ (d), β2AR without GsGDP (e), and β2AR with GsGDP (f). Histograms compare DASH-derived classifications (colored bars) with manual labels (black lines). Color gradients of the same number of states indicate different state compositions. N represents the number of traces analyzed.

DASH model contains the kinetic-scheme-free event sorting as a unique stage in its workflow, which enables users to objectively determine whether the sample molecules mainly stay in a single state or spontaneously transit between/among different states. After kinetic-scheme-free event sorting, DASH revealed that ribosomes predominantly occupied a single middle-FRET state (FRET efficiency E = 0.53, Fig. 2b and Supplementary Fig. 3, Supplementary Table 2). While Holliday junctions (HJ) with 1 mM Mg²⁺ predominantly occupied a single low-FRET state (E = 0.31, Fig. 2c and Supplementary Fig. 4, Supplementary Table 3), HJ with 500 mM Mg²⁺ exhibited transitions between a low-FRET state (E = 0.16) and a middle-FRET state (E = 0.65), accounting for 99% of authentic fluorescence events (Fig. 2d and Supplementary Fig. 5, Supplementary Table 4). These sorting results are consistent with previous findings29,32.

Interestingly, the kinetic-scheme-free event sorting module of DASH identified new FRET states and event patterns in samples of β₂AR. Previous studies applied single-molecule FRET between sites 148C and 378C of β₂AR to track conformational dynamics of its intrinsically disordered carboxyl terminus30, which revealed that, in the presence of agonist (200 μM isoproterenol), β₂AR alone predominantly occupies a middle-FRET state (E = 0.67). Whereas a low-FRET state (E = 0.36) appears upon Gs protein (GsGDP) binding, indicating the extension motions of the disordered C-terminal (Fig. 2e, f, Supplementary Figs. 6 and 7, Supplementary Tables 5 and 6). The analysis using DASH successfully reproduced the previous findings. In the presence of GsGDP, the low-FRET state became the major population, and spontaneous transition between the low-FRET and middle-FRET was captured (Supplementary Fig. 7 and Supplementary Table 6). Furthermore, in the absence of GsGDP, DASH not only identified the major middle-FRET state (79.63% of total population, Supplementary Fig. 6 and Supplementary Table 5) but also revealed two minor states, a low-FRET state (E = 0.46, 7.74% of total population) and a high-FRET state (E = 0.83, 12.63% of total population). Events displaying spontaneous transition between or among these states were automated identified and sorted out (Supplementary Fig. 6 and Supplementary Table 5), which reflect the pronounced conformational dynamics inherent in the disordered C-terminal of β₂AR alone without GsGDP. These two minor states and transition events were not identified in the previous reports, because the overall FRET distribution closely resembled a single-component peak (Fig. 2e), thereby hindering further in-depth data mining. Thus, our DASH model provides an automated, unbiased kinetic-scheme-free method to sort FRET events based on state composition without requiring any predefined kinetic scheme, demonstrating significant advantages in revealing hidden heterogeneity.

Kinetic-scheme-free sorting of dynamically emerging signals during AsCas12a-mediated cleavage

Compared with steady fluorescence signals, dynamically emerging signals appear during data acquisition and can arise from equilibrium binding/unbinding events or conformational fluctuations, as well as from non-equilibrium processes; they consequently exhibit more complex and heterogeneous temporal patterns, posing greater challenges for automated analysis. To demonstrate the power of DASH, we applied it to analyze single-molecule FRET traces tracking conformational dynamics of Acidaminococcus sp. Cas12a (AsCas12a) from DNA binding to cleavage. As shown in our previous studies31,33, using Cy3-labeled AsCas12a/crRNA complexes and surface-immobilized Cy5-DNA (Fig. 3a), conformational states corresponding to successive stages of DNA interrogation—initial R-loop formation, non-target strand (NTS) cleavage, and target strand (TS) cleavage—can be sequentially resolved.

Fig. 3. Kinetic-scheme-free analysis of AsCas12a cleavage dynamics on fully matched DNA using DASH.

Fig. 3

a Schematic and representative single-molecule trace depicting Cas12a cleavage states. Cy3 (green) labels the crRNA 3’ terminus; Cy5 (red) labels the target DNA 28 nucleotides downstream of the PAM. States: S1 (R-loop formation), S2 (non-target strand cleavage), S3/S4 (target strand cleavage). b Example fluorescence event showing state transitions during AsCas12a cleavage dynamics. Four FRET states (S1–S4, low to high FRET) are assigned to AsCas12a cleavage steps. Green line represents donor (Cy3) fluorophore, red line represents acceptor (Cy5) fluorophore. c Time-dependent probability density plots of all selected fluorescence events. Probability density maps aligned to FRET signal onset (t = 0, left) or termination (t = 0, right), revealing conformational changes post-complex assembly (left) and pre-dissociation (right). d–g Time-dependent probability density plots based on certain patterns containing 1-4 states (details in Supplementary Table 7). h Dwell time of different patterns of AsCas12a dynamic events on fully matched target DNA. The dwell time was fitted by a single exponential decay curve (Supplementary Fig. 8). Standard errors of fitted time constant indicate the precision of estimates. i Percentage of AsCas12a dynamic events that terminated at different states on fully matched target DNA. The exposure time was 500 ms per frame. N represents the number of fluorescence events analyzed.

As described above, analyzing dynamically emerging signals with the DASH model contains three stages: (1) identifying authentic events including the start and end time points, (2) assigning signals of each frame into discrete FRET states, and (3) kinetic-scheme-free events sorting based on number of states (Fig. 3, Supplementary Figs. 8 and 9, Supplementary Table 7). Consistent with the previous report28,31,33 after the appearance of fluorescence signals caused by AsCas12a/crRNA binding on DNA, FRET density plots showed a gradual transition from a short-lived low-FRET state (S1, E = 0.27) to medium-FRET (S2, E = 0.46) and high-FRET states (S3, E = 0.61 and S4, E = 0.82), which correspond to successive stages of DNA interrogation - initial R-loop formation, NTS cleavage, and TS cleavage, respectively.

Furthermore, the kinetic-scheme-free automated sorting of DASH provides critical insights into the dynamic heterogeneity of AsCas12a-mediated cleavage (Supplementary Table 7). More than 10 distinctive dynamic patterns were identified, revealing previously unappreciated complexity31,33. Among them, the one containing all four FRET states (S1, S2, S3, and S4) only accounts for 2.57% of events. In addition, a previously overlooked state, assigned as S0 (E = 0.02), is identified. Dwell time analysis provides a plausible explanation of the dynamic heterogeneity, as the durations of distinct patterns can be clustered into three groups (Figs. 3h, i and S8). Patterns terminated at state S3 or S4 exhibit the longest duration (60–80 s), suggesting these represent complete DNA cleavage events. As the previous study has shown that both S3 and S4 are TS pre-cleavage states targeting different sites on the DNA33. Patterns terminated at state S2 exhibit intermediate dwell times (20–30 s), likely representing AsCas12a binding events that fail to complete NTS cleavage and are unable to progress to subsequent states (S3/S4). Lastly, patterns terminated at state S0 or S1 show the shortest dwell times (1–4 s), likely representing AsCas12a binding events that fail to recognize the PAM site or to complete R-loop formation. The state S0 exhibits significantly longer duration than the nonspecific binding state before PAM recognition (~4 ms)31 and lower FRET efficiency and shorter duration than S1, suggesting that S0 is an intermediate after PAM recognition but before R-loop formation. Overall, our DASH framework, especially the kinetic-scheme-free events sorting, enables us to construct a comprehensive scheme to illustrate the dynamic heterogeneity of AsCas12a-mediated cleavage (Fig. 3). This scheme strongly supports the proposed model that the highly dynamic nature of Cas12a complexes, including multiple-disassembly pathways along the cleavage process, is one of the key aspects contributing to their high specificity33.

Next, we applied the DASH model to analyze single-molecule FRET traces of AsCas12a in the presence of PAM-distal mismatches between crRNA and DNA (Fig. 4, Supplementary Figs. 10–12, Supplementary Tables 8–10). From DASH’s classification and FRET states assignment, we found that the introduction of seven mismatches (7MM) in the target DNA significantly attenuated the transition to the high FRET TS cleavage state (S3/S4; Fig. 4a and Supplementary Figs. 10–12). Dwell time analysis (Fig. 4b) showed that the introduction of the mismatch destabilizes the TS and NTS cleavage intermediates but did not significantly perturb the formation of S0/S1, indicating that the PAM-distal crRNA-DNA mismatches primarily impair DNA cleavage of Cas12a while preserving initial non-productive binding and R-loop formation. Together, combining DASH’s state assignment and kinetic-scheme-free sorting approaches reveals a previously overlooked state (S0) while resolving dynamic heterogeneity and enabling automated, pattern-based classification of fluorescence events.

Fig. 4. DASH-based analysis of AsCas12a cleavage dynamics on mismatch-containing target DNA.

Fig. 4

a Time-dependent probability density plots for all selected fluorescence events with AsCas12a cleavage on DNA target with 3 mismatches (3MM), 6 MM, and 7 MM at the PAM-distal end, respectively. Details in Supplementary Figs. 12–14 and Supplementary Tables 8–10. b Dwell time of different patterns of AsCas12a dynamic events with 3MM, 6 MM, and 7 MM DNA, respectively. The dwell time was fitted by a single exponential decay curve. HMM-derived inter-state transition rate constants extracted directly from the transition matrix are provided in Supplementary Tables 14–16. Standard errors of fitted time constant indicate the precision of estimates. c Percentage of AsCas12a dynamic events that terminated at different states on 3MM, 6 MM, and 7 MM, respectively. The exposure time was 500 ms per frame. N represents the number of fluorescence events analyzed.

Automatic kinetic-scheme-free sorting of Cas12e cleavage dynamics using DASH

Cas12e (also known as CasX), a compact class 2 CRISPR-Cas34 nuclease structurally distinct from bulkier counterparts like Cas9 and Cas12a, demonstrates significant genome-editing potential. This system recognizes a 5’-TTCN PAM and achieves high editing efficiency in human cells when complexed with sgRNA. Among characterized homologs, Deltaproteobacteria Cas12e (DpbCas12e) and Planctomycetes Cas12e (PlmCas12e) have emerged as model variants35. Interestingly, when examined using single-molecule FRET between Cy3 labeling at the sgRNA 3’ end and Cy5 labeling on target DNA 34 nucleotides upstream of the PAM-distal end, DpbCas12e and PlmCas12e display distinctive signal patterns36. DpbCas12e displays three distinct FRET states, assigned as R-loop formation, NTS cleavage, and TS cleavage states, whereas PlmCas12e exhibits only two FRET states corresponding to R-loop formation and NTS/TS cleavage states. Such conclusions were drawn through tedious and time-consuming manual screening, highlighting the need for an automated approach. The DASH-driven kinetic-scheme-free automated sorting method enables precise and rapid discrimination of DpbCas12e’s three distinct FRET states (E = 0.21, 0.48, and 0.71, Fig. 5 and Supplementary Fig. 13, and Supplementary Table 11). In contrast, PlmCas12e exhibits only two FRET states (E = 0.19 and 0.54, Supplementary Fig. 14 and Supplementary Table 12), as unambiguously identified by DASH. The conclusions drawn from the analysis are reinforced by comparing the fluorescence traces: DpbCas12e exhibits three distinct states, whereas PlmCas12e exhibits two (Fig. 5h, i). Among all fluorescence events, approximately 78% of DpbCas12e and PlmCas12e remained in S1 (R-loop formation) conformations (Fig. 5a–g), suggesting that the majority of Cas12e binding events are non-productive. Together, DASH’s automated kinetic-scheme-free approach thus enabled unbiased identification of variant-specific single-molecule FRET patterns and dynamic heterogeneity without prior kinetic models, demonstrating its unique capacity to reveal complex molecular behaviors inaccessible to conventional methods.

Fig. 5. DASH-based analysis of Cas12e cleavage dynamics on fully matched DNA.

Fig. 5

Time-dependent FRET probability density plots for fluorescent events terminated at S1 (a), S2 (b), and S3 (c) of DpbCas12e on fully matched target DNA. d Percentage of DpbCas12e dynamic events that terminated at different states. Time-dependent FRET probability density plots for fluorescent events terminated at S1 (e) and S2 (f) of PlmCas12e on fully matched target DNA. g Percentage of PlmCas12e dynamic events that terminated at different states. h Example trace of DpbCas12e cleavage steps where three FRET states (S1–S3, low to high FRET) are assigned. i Example trace of PlmCas12e cleavage steps where two FRET states (S1–S2, low to high FRET) are assigned. Green line represents donor (Cy3) fluorophore, red line represents acceptor (Cy5) fluorophore. The exposure time for each frame is 500 ms. N represents the number of fluorescence events analyzed.

Discussion

DASH introduces a unified analytical framework that combines supervised FRET trace segmentation/classification with HMM-based state assignment and automated kinetic-scheme-free event sorting, effectively eliminating subjective interpretation and bias while resolving molecular-scale dynamic heterogeneity. This integrated approach enables robust identification of both stable conformations and transient intermediates without requiring user-defined kinetic schemes or prior biological knowledge in the event sorting stage. Furthermore, DASH demonstrates broad applicability across both protein and nucleic acid systems, enabling automated dissection of their conformational dynamics and regulatory mechanisms. By autonomously sorting fluorescence events based on state composition, DASH reveals functionally significant subpopulations that can be overlooked during manual inspection, as demonstrated in our β₂AR and Cas12a examples.

The DASH platform establishes a direct connection between raw single-molecule data and comprehensive kinetic analysis, allowing extraction of kinetic hierarchies directly from experimental traces and offering an objective, scalable solution that overcomes limitations of manual analysis and potential bias caused by a priori kinetic models. To maximize the accessibility of DASH, we provide open-source Python implementations for model training, event classification, and state assignment to ensure broad accessibility. Looking forward, DASH’s modular architecture permits expansion to multi-color FRET systems, positioning it as a versatile platform for deciphering biomolecular complexity across diverse experimental systems. Its kinetic-scheme-free event sorting foundation particularly suits the system with pronounced dynamic heterogeneity where predefined kinetic schemes prove inadequate or unavailable. Recent advances in the field26 suggest that trace-level embeddings and dataset-wide visualization may further augment automated single-molecule FRET analysis by enabling systematic exploration of molecular heterogeneity at the whole-experiment scale. Incorporating such representations into DASH’s modular architecture, alongside objective metrics for rare-event detection, represents a natural direction for future development.

Methods

Training datasets

To train trace segmentation and classification model we compiled: (1) two-color steady fluorescence traces (5 subsets, ~1500 traces each) of ribosomes29, β₂AR30, and DNA Holliday junctions32, with 80% allocated for training; (2) two-color fluorescence traces containing dynamically emerging signals (14 subsets, ~40,000 traces total) capturing Cas12a-DNA31 cleavage dynamics (targeting dsDNA with 0/3/6/7 mismatches). All traces (Supplementary Table 1) were annotated using DEBRIS-derived28 labels defining fluorescence appearance and FRET termination time point, and three classes of the fluorescence traces (donor disappearance, acceptor disappearance, and discarded).

Network training

Our model consists of an embedding layer, a biLSTM, a CRF layer, and an HMM layer, arranged sequentially as shown in Fig. 1. In Stage 1, the two-color fluorescence intensity-time trace is processed to predict frame labels using the CRF layer. Segments labeled as donor disappearance or acceptor disappearance are extracted and analyzed in Stage 2 with the HMM layer to infer discrete hidden states. In Stage 3, these segments are sorted based on their state transition patterns, such as multi-state behaviors, to identify characteristic signatures of the experimental condition.

In the first stage, the neural network is constructed using the PyTorch framework and executed on a single NVIDIA 3090 Ti GPU. The first stage architecture includes a bi-LSTM-CRF layer, as illustrated in Fig. 1b, consisting of three bi-LSTM layers with a hidden dimension of 32, followed by a CRF layer. During training, a dropout rate of 0.2 was applied to prevent overfitting, with a learning rate set to 0.005 and a batch size of 128. In the second stage, the Hidden Markov Model (HMM) was implemented using the hmmlearn framework, employing a Gaussian mixture model with two components and covariance fitting restricted to diagonal elements to minimize overfitting.

We selected this sequential architecture based on the distinct requirements of each stage. Stage 1 (segmentation/classification) is a supervised, structured sequence-labeling task requiring both long-range temporal context and globally consistent label transitions; a Bi-LSTM-CRF architecture directly addresses both requirements, whereas alternatives such as Gaussian processes do not natively model dependencies between adjacent labels. Stage 2 (state assignment) is unsupervised, as no ground-truth FRET state labels exist; an HMM provides a generative framework that infers discrete hidden states with an explicit, interpretable transition structure directly from continuous observations, a property not natively offered by sequence models such as RNNs without an auxiliary clustering step.

Application of DASH to identify events

For an i-th FRET sequence Xi=(xi,1,xi,2,…xi,t), each xi,t∈R2 represents donor and acceptor intensities at position t, the bi-LSTM-CRF layer is designed to predict the segmentation label Y^i=(y^i,1,y^i,2,…,y^i,t) for Xi. Here,yi,t∈RL represents a one-hot label from the label set L. The final classification includes three types: {donor disappearance, acceptor disappearance, discarded}. The label set L follows the BIO (Begin-Intermediate-Omit) format commonly used in Named Entity Recognition (NER) literature37 and is defined as L={O,ddb,ddi,dde,adb,adi,ade}, where ‘dd’ stands for donor disappearance and ‘ad’ stands for acceptor disappearance, ‘O’ label represents the discarded type and is omitted from further analysis. The suffixes ‘b’, ‘i’, and ‘e’ denote the beginning, intermediate, and end of a labeled segment, respectively.

After the Bi-LSTM layer, we get embeddings hi,t∈Rd for signals xi,t, and CRF layer then applies a linear transformation to compute the emission scores E(ht,yi,t) for each label, where W∈RL×d and b∈RL stand for the emission weight matrix and bias in the linear transformation:

Eht,yi,t=yi,tTWhi,t+b 1

The CRF layer defines a structured probability distribution over possible label sequences using emission scores E(ht,yi,t) and transition scores Ay(i,t−1),y(i,t)∈RL×L which represents the transition matrix for moving from label y(i,t−1) to y(i,t). The score of a sequence Yi given an input Xi is:

SXi,Yi=∑t=1TEi,t+∑t=2TAy(i,t−1),y(i,t) 2

Where the first term sums the emission scores of the chosen labels, the second term sums the transition scores of consecutive labels. The model computes the partition function ZXi, summing over all possible label sequences Yi:

ZXi=∑Yiexp(S(Xi,Yi)) 3

Sequence-level likelihood optimization with Bi-LSTM-CRF

The loss function is the negative log-likelihood of the correct sequence Yi,

ℓCRF=−∑iNlogexpSXi,YiZXi 4
ℓbiLSTM−based models=−∑iN∑tTlogPyi,t∣xi,t 5

In contrast to prior work employing CNN and biLSTM-based models25–27, DASH utilizes a biLSTM-CRF architecture, where the CRF layer optimizes transitions between different labels when generating the classification result. In terms of loss function, biLSTM-based models optimize categorical cross-entropy for single-step prediction, whereas CRF maximizes the whole likelihood of the entire FRET sequence by considering both emission and transition probabilities. Although bi-LSTM is computationally more efficient, CRF introduces additional complexity due to sequence-level normalization and decoding, but significantly enhances accuracy in structured sequence labeling tasks. For example, the model avoids outputting sequences where a “ ddi”“(donor disappearance, intermediate) label precedes a “ ddb”“(donor disappearance, beginning) label, thereby enhancing the accuracy of sequential classification and the reliability of trace interpretation.

In stage 2, the task becomes an unsupervised task since there are no labels for the frame-wise FRET data. We define a subset of sequence elements, whose predicted label is not “O”. The final goal from stage 2 is a discrete state si,t assigned to continuous FRET signal zi,t, the FRET signal is not classified as “O”,

zi,t=xi,t∣y^i,t≠O 6

The HMM is defined by the parameters λ=(Π,T,B): Initial state distribution Π, transition probability matrix Tkk′, which is the transition probability from state k to k′, and emission probability matrix B, which is the emission probability matrix of observing zi,t given state si,t. The k∈1,…,K are discrete hidden state indices.

Tkk′=Psi,t=k∣si,t−1=k′ 7
Bkzi,t=Pzi,t∣si,t=k 8

To estimate the hidden states si,t, the target is to compute the forward probability, predicting the hidden states si,t given information of {zi,1,zi,2,…,zi,t}, which can be computed recursively. Viterbi algorithm is used to find the most likely state sequence Si=(si,1,si,2,…,si,t,),

Si=argmaxSiPsi,1,si,2,…,si,t,∣zi,1,zi,2,…,zi,t, 9

Define δi,tk as the maximum probability of the best partial path ending in state k at time t:

δi,tk=maxsi,1,si,2,…,si,tP(si,1,si,2,…,si,t=k,zi,1,zi,2,…,zi,t) 10
δi,tk=maxk′∈{1,…,K}δi,t−1k′Tkk′Bkzi,t 11

The optimal state at each step is,

si,t*=argmaxkδi,t(k) 12

Model selection framework for reliable HMM-based state assignment

After obtaining the assigned states si,t*, automated event analysis is performed to investigate the transition patterns in the FRET data and to characterize the distribution of states. However, the application of HMM requires assumed topology matches the true system and correct state numbers is critical for entropy production estimates38. To address this, we design a scoring framework to guide model selection. This framework evaluates model fit using the Bayesian Information Criterion (BIC), state separability using the silhouette score and state clarity score, and transition dynamics quality using transition matrix entropy and Viterbi path consistency. The final criterion for selecting an optimal HMM model is defined as the weighted average of the five evaluation metrics, with equal weight assigned to each metric. It is important to note that this BIC-based scoring framework operates within Stage 2 exclusively, serving as an automated, data-driven replacement for user-specified state numbers. Critically, this automated state enumeration does not constitute a kinetic scheme: no transition topology, rate constants, or state connectivity are prescribed. The downstream Stage 3 event sorting then receives the resulting state assignments and classifies fluorescence events based solely on their state composition, entirely free of any predefined kinetic scheme.

For model with K parameters and N data points, and likelihood δK, given a normalization constant B, the BIC score is defined as:

BICraw=−2logδK+KlogN 13
BIC=max0,1−BICrawB 14

Silhouette score (SIL) evaluated how well the assigned states correspond to the distinguishable states, ensuring meaningful state separation. Given average intra-cluster distance for sample i as a(i), average nearest cluster distance as b(i),

silzi=bi−a(i)max{ai,bi} 15
SIL=121N∑i=1Nsilsi+1 16

State separation clarity (SEP) quantifies the separation between k-th and k + 1-th state means relative to their variance:

SEPi=1K−1∑k=1K−1∣μk+1−μk∣σk2+σk+12 17

Viterbi path consistency (VPC) score measures the ratio of self-consistent state assignments:

Transs1:t=∑i=1t−11(si≠si+1) 18
VPCs1:t=1−Transs1:tt 19

Transition matrix entropy (Entro) promotes balanced transition matrices,

EntroTi=−∑jTijLogTijlogK 20

Overall, the advantage of using DASH lies in the CRF’s ability to model dependencies between trace classification labels and an unsupervised application of HMM. CRFs are particularly effective for structured prediction tasks, such as sequence labeling, because they consider the relationships between neighboring labels, ensuring globally optimal label assignment. This is crucial in single-molecule fluorescence trace classification, where the transitions between states (e.g., donor disappearance, acceptor disappearance) are interdependent and follow specific patterns. After the CRF layer, HMM offers a principled probabilistic framework to infer hidden molecular states based on noisy fluorescence intensity measurements, accounting for experimental uncertainties. The Markovian property naturally captures the temporal correlations and transition kinetics between states, enabling detailed characterization of molecular dynamics such as binding/unbinding events or conformational changes. We employed an automated model selection strategy that combines multiple scoring criteria to identify the optimal number of states, without relying on any user-defined thresholds or manual intervention.

Statistics and reproducibility

All statistical analyses were conducted using the Origin 2021 (OriginLab Corporation) software or PYTHON. Three repeats were performed to ensure the consistency and reliability of the data. No data were excluded from the analyses, and the sample sizes were not predetermined using statistical methods.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

Supplementary information

Reporting Summary (69.6KB, pdf)

Source data

Source Data (3.6MB, xlsx)

Acknowledgements

This work was supported by the National Key R&D Program of China (Grant Nos. 2024YFA0916700 and 2024YFA1306201 to C.C.), the National Natural Science Foundation of China (Grant Nos. 22425701, 22277063, and 22061160466 to C.C.), Shenzhen Science and Technology Program (Grant No. AI2026041), the National Natural Science Foundation of China/Research Grants Council Joint Research Scheme (Grant No. N_HKUST635/20 to Y.Y.), and the Beijing Frontier Research Center for Biological Structure (to C.C.). We thank Prof. Qian Lin from the Department of Statistics and Data Science at Tsinghua University for valuable discussions and helpful suggestions.

Author contributions

C.C. and Y.Y. conceived and supervised this research. S.Z. prepared samples, conducted experiments, and analyzed data. W.Z. designed the algorithm, trained all models, and performed validation. S.Z., W.Z., and C.C. wrote the paper with input from Y. Y. All authors have approved the final version of the manuscript.

Peer review

Peer review information

Nature Communications thanks the anonymous reviewer(s) for their contribution to the peer review of this work. A peer review file is available.

Data availability

The source code used in this study has been deposited in the public GitHub repository https://github.com/shuqi-zhou/DASH and archived in Zenodo under https://doi.org/10.5281/zenodo.2194137739. The raw single-molecule FRET traces generated in this study have been deposited in Zenodo under https://doi.org/10.5281/zenodo.21941485. The processed data underlying the main and Supplementary Figs. are provided as Source Data files. Source data are provided with this paper.

Code availability

The source code is publicly available in the GitHub repository https://github.com/shuqi-zhou/DASH for deep learning network training, FRET state assignment, and kinetic-scheme-free events sorting, which has been archived in Zenodo under https://doi.org/10.5281/zenodo.2194137739. This allows users to modify the code and use it according to their criteria, facilitating integration with other software.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

These authors contributed equally: Shuqi Zhou, Wenqi Zeng.

Contributor Information

Yuan Yao, Email: yuany@ust.hk.

Chunlai Chen, Email: chunlai@mail.tsinghua.edu.cn.

Supplementary information

The online version contains supplementary material available at https://doi.org/10.1038/s41467-026-77533-w.

References

  • 1.Stryer, L. & Haugland, R. P. Energy transfer: a spectroscopic ruler. Proc. Natl. Acad. Sci. USA58, 719–726 (1967). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Ha, T. et al. Probing the interaction between two single molecules: fluorescence resonance energy transfer between a single donor and a single acceptor. Proc. Natl. Acad. Sci. USA93, 6264–6268 (1996). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Lerner, E. et al. Toward dynamic structural biology: two decades of single-molecule Förster resonance energy transfer. Science359, eaan1133 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Rundlet, E. J. et al. Structural basis of early translocation events on the ribosome. Nature595, 741–745 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Blanchard, S. C., Gonzalez, R. L., Kim, H. D., Chu, S. & Puglisi, J. D. tRNA selection and kinetic proofreading in translation. Nat. Struct. Mol. Biol.11, 1008–1014 (2004). [DOI] [PubMed] [Google Scholar]
  • 6.Ferguson, A. et al. Functional dynamics within the human ribosome regulate the rate of active protein synthesis. Mol. Cell60, 475–486 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Nishima, W. et al. Hyper-swivel head domain motions are required for complete mRNA-TRNA translocation and ribosome resetting. Nucleic Acids Res.50, 8302–8320 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Newton, M. D. et al. DNA stretching induces Cas9 off-target activity. Nat. Struct. Mol. Biol.26, 185–192 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Globyte, V., Lee, S. H., Bae, T., Kim, J. & Joo, C. CRISPR /Cas9 searches for a protospacer adjacent motif by lateral diffusion. EMBO J.38, e99466 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Zeng, Y. et al. The initiation, propagation and dynamics of CRISPR-SpyCas9 R-loop complex. Nucleic Acids Res.46, 350–361 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Yang, M. et al. Nonspecific interactions between SpCas9 and dsDNA sites located downstream of the PAM mediate facilitated diffusion to accelerate target search. Chem. Sci.12, 12776–12784 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Akyuz, N. et al. Transport domain unlocking sets the uptake rate of an aspartate transporter. Nature518, 68–73 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Das, D. K. et al. Direct visualization of the conformational dynamics of single influenza hemagglutinin trimers. Cell174, 926–937 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Asher, W. B. et al. Single-molecule FRET imaging of GPCR dimers in living cells. Nat. Methods18, 397–405 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Sakon, J. J. & Weninger, K. R. Detecting the conformation of individual proteins in live cells. Nat. Methods7, 203–205 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Zhao, J. et al. Ligand efficacy modulates conformational dynamics of the µ-opioid receptor. Nature629, 474–480 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Ngo, T. T. M. et al. Effects of cytosine modifications on DNA flexibility and nucleosome mechanical stability. Nat. Commun.7, 10813 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Manz, C. et al. Single-molecule FRET reveals the energy landscape of the full-length SAM-I riboswitch. Nat. Chem. Biol.13, 1172–1178 (2017). [DOI] [PubMed] [Google Scholar]
  • 19.Niu, X. et al. Structural and dynamic mechanisms for coupled folding and tRNA recognition of a translational T-box riboswitch. Nat. Commun.14, 7394 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.McKinney, S. A., Joo, C. & Ha, T. Analysis of single-molecule FRET trajectories using hidden Markov modeling. Biophys. J. 91, 1941–1951 (2006). [DOI] [PMC free article] [PubMed]
  • 21.Bronson, J. E., Fei, J., Hofman, J. M., Gonzalez, R. L. & Wiggins, C. H. Learning rates and states from biophysical time series: a Bayesian approach to model selection and single-molecule FRET data. Biophys. J.97, 3196–3205 (2009). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Shuang, B. et al. Fast step transition and state identification (STaSI) for discrete single-molecule data analysis. J. Phys. Chem. Lett.5, 3157–3161 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Li, J., Zhang, L., Johnson-Buck, A. & Walter, N. G. Automatic classification and segmentation of single-molecule fluorescence time traces with deep learning. Nat. Commun.11, 5833 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Thomsen, J. et al. DeepFRET, a software for rapid and automated single-molecule FRET data classification using deep learning. Elife9, e60404 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Wanninger, S. et al. Deep-LASI: deep-learning assisted, single-molecule imaging analysis of multi-color DNA origami structures. Nat. Commun.14, 6564 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Li, J., Zhang, L., Johnson-Buck, A. & Walter, N. G. Foundation model for efficient biological discovery in single-molecule time traces. Nat. Methods22, 2149–2160 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Götz, M. et al. A blind benchmark of analysis tools to infer kinetic rate constants from single-molecule FRET trajectories. Nat. Commun.13, 5402 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Zhou, S. et al. Deep learning based local feature classification to automatically identify single molecule fluorescence events. Commun. Biol.7, 1404 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Chen, C. et al. Single-molecule fluorescence measurements of ribosomal translocation dynamics. Mol. Cell42, 367–377 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Heng, J. et al. Function and dynamics of the intrinsically disordered carboxyl terminus of β2 adrenergic receptor. Nat. Commun.14, 2005 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Sun, R., Zhao, Y., Wang, W., Liu, J. J. G. & Chen, C. Nonspecific interactions between Cas12a and dsDNA located downstream of the PAM mediate target search and assist AsCas12a for DNA cleavage. Chem. Sci.14, 3839–3851 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Zhang, Y. et al. General strategy to improve the photon budget of thiol-conjugated cyanine dyes. J. Am. Chem. Soc.145, 4187–4198 (2023). [DOI] [PubMed] [Google Scholar]
  • 33.Zhang, L. et al. Conformational dynamics and cleavage sites of Cas12a are modulated by complementarity between crRNA and DNA. iScience19, 492–503 (2019). [DOI] [PMC free article] [PubMed]
  • 34.Liu, J. J. et al. CasX enzymes comprise a distinct family of RNA-guided genome editors. Nature566, 218–223 (2019). [DOI] [PMC free article] [PubMed]
  • 35.Burstein, D. et al. New CRISPR-Cas systems from uncultivated microbes. Nature542, 237–241 (2017). [DOI] [PMC free article] [PubMed]
  • 36.Xing, W., Li, D., Wang, W., Liu, J.-J. G. & Chen, C. Conformational dynamics of CasX (Cas12e) in mediating DNA cleavage revealed by single-molecule FRET. Nucleic Acids Res.52, 9014–9027 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Li, J., Sun, A., Han, J. & Li, C. A survey on deep learning for named entity recognition. In Proc.2023 IEEE 39th International Conference on Data Engineering (ICDE) (IEEE, 2022).
  • 38.Song, K., Makarov, D. E. & Vouga, E. Information-theoretical limit on the estimates of dissipation by molecular machines using single-molecule fluorescence resonance energy transfer experiments. J. Chem. Phys.161, 044111 (2024). [DOI] [PubMed] [Google Scholar]
  • 39.Zhou, S., Zeng, W., Yao, Y. & Chen, C. DASH: deep learning-based automatic sorting by identifying hidden states in fluorescence events. Preprint at 10.5281/zenodo.21941377 (2025). [DOI]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Reporting Summary (69.6KB, pdf)
Source Data (3.6MB, xlsx)

Data Availability Statement

The source code used in this study has been deposited in the public GitHub repository https://github.com/shuqi-zhou/DASH and archived in Zenodo under https://doi.org/10.5281/zenodo.2194137739. The raw single-molecule FRET traces generated in this study have been deposited in Zenodo under https://doi.org/10.5281/zenodo.21941485. The processed data underlying the main and Supplementary Figs. are provided as Source Data files. Source data are provided with this paper.

The source code is publicly available in the GitHub repository https://github.com/shuqi-zhou/DASH for deep learning network training, FRET state assignment, and kinetic-scheme-free events sorting, which has been archived in Zenodo under https://doi.org/10.5281/zenodo.2194137739. This allows users to modify the code and use it according to their criteria, facilitating integration with other software.


Articles from Nature Communications are provided here courtesy of Nature Publishing Group

RESOURCES