Single-cell RNA sequencing allows scientists to study the activity of genes in individual cells, providing a detailed picture of how cells function. This powerful technology has helped uncover new cell types and given researchers insight into diseases at a level never seen before.

However, analyzing this kind of data is not simple. One of the biggest challenges is handling “dropout events,” where certain genes go undetected even though they are active. These gaps in the data make it harder to group cells correctly and identify their types.

To address this problem, researchers have developed a new deep learning method called scHSC. This method uses a strategy known as “hard sample contrastive learning,” which pays special attention to difficult-to-classify samples. By combining information about gene expression with the relationships between cells, scHSC improves clustering accuracy.

Framework of scHSC

Schematic diagram illustrating the scHSC framework, showing input of a gene expression matrix and a KNN graph into attribute and structure encoders, generation of four embeddings, and their integration through a hard sample weighting module and a ZINB-based autoencoder.

scHSC primarily comprises three components: a contrastive learning module (Steps 2.1 and 2.2), a hard sample weighting module (Steps 3.1–3.3), and a ZINB-based autoencoder (Step 4). The preprocessed gene expression matrix is first fed into the attribute encoders, while the KNN graph is input to the structure encoders, resulting in two attribute embeddings and two structure embeddings, respectively. These four embeddings are then jointly used in two ways: (1) they are fed into the hard sample weighting module to adaptively assign sample weights based on the similarity matrix, and (2) they serve as input to the ZINB-based autoencoder to effectively model the high sparsity inherent in scRNA-seq data. More implementation details can be found in the Materials and Methods section.

The researchers tested scHSC on 18 real single-cell RNA sequencing datasets. The results showed that their method outperformed other deep learning clustering tools, making it a promising approach for large and complex datasets. Implemented in Python with the PyTorch framework, scHSC provides researchers with a more accurate way to analyze single-cell data, ultimately helping us better understand biology at the cellular level.

Availability – scHSC is implemented in Python based on the PyTorch framework. The source code and datasets are available via https://github.com/fangs25/scHSC.

Fang S, Yu X, Xu X, Zhang J, Li X. (2025) scHSC: enhancing single-cell RNA-seq clustering via hard sample contrastive learning. Briefings in Bioinformatics 26(5): bbaf485. [article]

Single-cell RNA sequencing allows scientists to study the activity of genes in individual cells, providing a detailed picture of how cells function. This powerful technology has helped uncover new cell types and given researchers insight into diseases at a level never seen before.

However, analyzing this kind of data is not simple. One of the biggest challenges is handling “dropout events,” where certain genes go undetected even though they are active. These gaps in the data make it harder to group cells correctly and identify their types.

To address this problem, researchers have developed a new deep learning method called scHSC. This method uses a strategy known as “hard sample contrastive learning,” which pays special attention to difficult-to-classify samples. By combining information about gene expression with the relationships between cells, scHSC improves clustering accuracy.

Framework of scHSC

Schematic diagram illustrating the scHSC framework, showing input of a gene expression matrix and a KNN graph into attribute and structure encoders, generation of four embeddings, and their integration through a hard sample weighting module and a ZINB-based autoencoder.

scHSC primarily comprises three components: a contrastive learning module (Steps 2.1 and 2.2), a hard sample weighting module (Steps 3.1–3.3), and a ZINB-based autoencoder (Step 4). The preprocessed gene expression matrix is first fed into the attribute encoders, while the KNN graph is input to the structure encoders, resulting in two attribute embeddings and two structure embeddings, respectively. These four embeddings are then jointly used in two ways: (1) they are fed into the hard sample weighting module to adaptively assign sample weights based on the similarity matrix, and (2) they serve as input to the ZINB-based autoencoder to effectively model the high sparsity inherent in scRNA-seq data. More implementation details can be found in the Materials and Methods section.

The researchers tested scHSC on 18 real single-cell RNA sequencing datasets. The results showed that their method outperformed other deep learning clustering tools, making it a promising approach for large and complex datasets. Implemented in Python with the PyTorch framework, scHSC provides researchers with a more accurate way to analyze single-cell data, ultimately helping us better understand biology at the cellular level.

Availability – scHSC is implemented in Python based on the PyTorch framework. The source code and datasets are available via https://github.com/fangs25/scHSC.

Fang S, Yu X, Xu X, Zhang J, Li X. (2025) scHSC: enhancing single-cell RNA-seq clustering via hard sample contrastive learning. Briefings in Bioinformatics 26(5): bbaf485. [article]

Submit a Post to the Blog

SUBMIT CONTENT

Subscribe to the RNA-Seq Blog

RNA-Seq Products & Services