A fairness clustering method for batch bias of automatic gene sequencing
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN UNIV
- Filing Date
- 2022-08-15
- Publication Date
- 2026-08-07
AI Technical Summary
[0005]针对现有技术中的上述不足,本发明提供的一种面向基因自动测序批次偏差的公平聚类方法解决了现有技术鲁棒性和稳定性不足的问题
[0020]本发明的有益效果为:本发明具有较强的鲁棒性和稳定性,使用互信息的方法减少了敏感属性对聚类结果的影响,提升了深度神经网络对基于序列语义信息的感知能力,最终得到了更好的聚类效果。
Smart Images

Figure CN115424665B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data mining and cluster analysis, specifically including a fair clustering method for addressing batch bias in automated gene sequencing. Background Technology
[0002] Clustering plays a crucial role in automated gene sequencing and is applied in various practical scenarios, such as disease diagnosis and biological analysis. However, traditional clustering algorithms, when directly applied to single-cell RNA sequence clustering, classify data based on sequencing technology rather than cell type. This is because different sequencing technologies and batches of observations result in varying levels of cell expression, and traditional clustering methods cannot distinguish between these batch biases and semantic information differences. Therefore, fair clustering has emerged and become a hot topic in recent years. Given a set of data, such as cell sequencing results, fair clustering aims to divide the data into disjoint sets while mitigating or even eliminating the influence of sensitive attributes on the clustering results.
[0003] Deep fair clustering methods that combine deep neural networks have only recently begun to attract attention. They aim to use neural networks to learn a low-dimensional space in which samples with similar semantic information are close to each other, while samples with different sensitive attributes are far apart.
[0004] Current deep neural network-based fair clustering methods have achieved considerable clustering results. However, their implementation relies on complex techniques such as adversarial learning, pre-clustering, data augmentation, and pseudo-labels. Adversarial learning, on the other hand, is sensitive to parameters and data, eventually converging to unsatisfactory local optima. Pre-clustering and pseudo-labels, however, become difficult to optimize due to error accumulation. Since the results of these operations are not guaranteed to be correct, using them to guide the network can severely degrade the performance of the neural network model. Furthermore, most of these works are heuristic designs, lacking theoretical explanation and support. In practical applications, interpretable and theoretically grounded results are desirable to further improve application performance and stability. Since fair clustering does not involve manually labeled supervision signals during application, it places higher demands on the algorithm's robustness and stability. Therefore, there is an urgent need to design a theoretically supported, robust, and stable fair clustering algorithm to mitigate or even eliminate the impact of sensitive attributes on clustering results. Summary of the Invention
[0005] To address the aforementioned shortcomings in existing technologies, this invention provides a fair clustering method for automated gene sequencing batch bias, which solves the problems of insufficient robustness and stability in existing technologies.
[0006] To achieve the above-mentioned objectives, the technical solution adopted by this invention is: a fair clustering method for addressing batch bias in automated gene sequencing, comprising the following steps: S1. Obtain the given gene sequencing dataset and the batch bias sensitivity attributes contained in the gene sequencing dataset; S2. Construct an auto-encoder neural network and train it using the data obtained in step S1 to obtain a fair clustering model; S3. Use a fair clustering model to detect the gene sequencing dataset to obtain clustering results that are robust to batch bias in automatic gene sequencing.
[0007] Furthermore, gene sequencing datasets are used X express, The sensitive attributes contained in the gene sequencing dataset are used... G express, ; Assignment Gene sequencing datasets Divided into A set of mutually disjoint sets; among which, N For the number of cells, d Sequencing feature dimensions for each cell.
[0008] Furthermore, the auto-encoder neural network includes a shared encoder and multiple decoders; the output of the shared encoder is connected to the input of the multiple decoders. The shared encoder of the auto-encoder neural network consists of a 6-layer fully connected network; The auto-encoder neural network consists of multiple decoders, including a 6-layer fully connected network.
[0009] Furthermore, the specific implementation of step S2 is as follows: S2-1, According to the formula:
[0010] Obtain the reconstruction loss function used to train the auto-encoder neural network. L rec ;in, It is a shared encoder in an auto-encoder neural network. It is a multi-branch decoder of an auto-encoder neural network; Depend on It consists of a dedicated decoder for each sensitive attribute. ; It is the first i A dedicated decoder for each sensitive attribute; It is a gene sequencing dataset; S2-2. Using a preheated auto-encoder neural network with a shared encoder, each sensitive attribute data is encoded into a feature in a common space. h j = ( x j ); in features h j The k-means algorithm was used to cluster the cells, and the cluster centers U = {u1, u2, ... u} were obtained. k}; x j Indicates the first j One data sample; u k Indicates the first k Cluster centers; S2-3, According to the formula:
[0011]
[0012] Get the first m The first feature and the first v The assignment function of cluster centers The clustering result C is denoted as the category corresponding to the maximum value of the assignment function; where, express and The cosine similarity; exp represents the natural constant. e An exponential function with base 0. It is the sensitivity coefficient; Represents the transpose of a matrix; S2-4. According to the formula:
[0013]
[0014] To obtain the result of maximizing mutual information L clu ;in, Indicates the first n The edge density of samples in each cluster, I(X; C) This represents the mutual information between the gene sequencing dataset and the clustering results, with a base of 2 in log. It is the first q The first feature to the first n The assignment function for each cluster center; It is the entropy value of the clustering result C; It is the conditional entropy of the clustering result C given the dataset X; S2-5. According to the formula:
[0015]
[0016]
[0017] The result of minimizing mutual information is obtained. L fair ;in, It is the edge density of sensitive attributes. It is the joint probability density of clustering and sensitivity attributes. It is the first r The first feature and the first s The assignment function for each cluster center; It is an indicator function, if Then take 1, otherwise take 0. This represents the mutual information between sensitive attributes and clustering results. Indicates the first r Cluster centers; This represents the t-th sensitive attribute; S2-6. According to the formula:
[0018] Obtain the loss function after fair clustering L ;in, Hyperparameter representation L clu The weight, Hyperparameter representation L fair The weights are determined; the parameters of the auto-encoder neural network are updated based on the loss function and gradient descent. S2-7. Repeat steps S2-2 to S2-6 until the auto-encoder neural network converges to obtain a fair clustering model.
[0019] Furthermore, the specific implementation method of step S3 is as follows: Clustering results robust to batch bias in automated gene sequencing were obtained using the same methods as S2-2 and S2-3.
[0020] The beneficial effects of this invention are as follows: This invention has strong robustness and stability, reduces the impact of sensitive attributes on clustering results by using mutual information, improves the ability of deep neural networks to perceive sequence semantic information, and ultimately achieves better clustering results. Attached Figure Description
[0021] Figure 1 This is the overall flowchart; Figure 2 This is a flowchart of the training process. Detailed Implementation
[0022] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0023] like Figure 1 As shown, a fair clustering method for addressing batch bias in automated gene sequencing includes the following steps: S1. Obtain the given gene sequencing dataset and the batch bias sensitivity attributes contained in the gene sequencing dataset; S2. Construct an auto-encoder neural network and train it using the data obtained in step S1 to obtain a fair clustering model; S3. Use a fair clustering model to detect the gene sequencing dataset to obtain clustering results that are robust to batch bias in automatic gene sequencing.
[0024] Gene sequencing datasets X express, The sensitive attributes contained in the gene sequencing dataset are used... G express, ; Assignment Gene sequencing datasets Divided into A set of mutually disjoint sets; among which, N For the number of cells, d Sequencing feature dimensions for each cell.
[0025] An auto-encoder neural network consists of a shared encoder and multiple decoders; the output of the shared encoder is connected to the input of the multiple decoders. The shared encoder of the auto-encoder neural network consists of a 6-layer fully connected network; The auto-encoder neural network consists of multiple decoders, including a 6-layer fully connected network.
[0026] like Figure 2 As shown, the specific implementation method of step S2 is as follows: S2-1, According to the formula:
[0027] Obtain the reconstruction loss function used to train the auto-encoder neural network. L rec ;in, It is a shared encoder in an auto-encoder neural network. It is a multi-branch decoder of an auto-encoder neural network; Depend on It consists of a dedicated decoder for each sensitive attribute. ; It is the first i A dedicated decoder for each sensitive attribute; It is a gene sequencing dataset; S2-2. Using a preheated auto-encoder neural network with a shared encoder, each sensitive attribute data is encoded into a feature in a common space. h j = ( x j ); in features h j The k-means algorithm was used to cluster the cells, and the cluster centers U = {u1, u2, ... u} were obtained. k}; x j Indicates the first j One data sample; u k Indicates the first k Cluster centers; S2-3, According to the formula:
[0028]
[0029] Get the first m The first feature and the first v The assignment function of cluster centers The clustering result C is denoted as the category corresponding to the maximum value of the assignment function; where, express and The cosine similarity; exp represents the natural constant. e An exponential function with base 0. It is the sensitivity coefficient; Represents the transpose of a matrix; S2-4. According to the formula:
[0030]
[0031] To obtain the result of maximizing mutual information L clu ;in, Indicates the first n The edge density of samples in each cluster, I(X; C) This represents the mutual information between the gene sequencing dataset and the clustering results, with a base of 2 in log. It is the first q The first feature to the first n The assignment function for each cluster center; It is the entropy value of the clustering result C; It is the conditional entropy of the clustering result C given the dataset X; S2-5. According to the formula:
[0032]
[0033]
[0034] The result of minimizing mutual information is obtained. L fair ;in, It is the edge density of sensitive attributes. It is the joint probability density of clustering and sensitivity attributes. It is the first r The first feature and the first s The assignment function for each cluster center; It is an indicator function, if Then take 1, otherwise take 0. This represents the mutual information between sensitive attributes and clustering results. Indicates the first r Cluster centers; This represents the t-th sensitive attribute; S2-6. According to the formula:
[0035] Obtain the loss function after fair clustering L ;in, Hyperparameter representation L clu The weight, Hyperparameter representation L fair The weights are determined; the parameters of the auto-encoder neural network are updated based on the loss function and gradient descent. S2-7. Repeat steps S2-2 to S2-6 until the auto-encoder neural network converges to obtain a fair clustering model.
[0036] The specific implementation method of step S3 is as follows: Clustering results robust to batch bias in automated gene sequencing were obtained using the same methods as S2-2 and S2-3.
[0037] In one embodiment of the invention, different methods are used to evaluate data from different sources; ACC, NMI, Balance, MNCE, etc. As metrics, ACC and NMI measure the quality of clustering, while Balance and MNCE measure fairness. Two characteristics are measured simultaneously; the higher the values of the five indicators, the better the method performs; the best and second-best results are bolded and underlined, respectively; specific results are shown in Tables 1 and 2: Table 1: The performance of this method on a human behavior recognition dataset. The sensitive attribute is the actor's identity, and the semantic information is the behavior category.
[0038]
[0039] Table 2: Performance of this method on the Office, MTFL, and Mouse Atlas datasets. Office is a dataset of online shopping product images, where product category is used as semantic information and image source as a sensitive attribute; MTFL is a face recognition dataset, where gender of the person in the image is used as semantic information and whether they are wearing glasses is used as a sensitive attribute; Mouse Atlas is mouse gene sequencing data, where cell type is used as semantic information and sequencing batch is used as a sensitive attribute.
[0040]
[0041] This invention exhibits strong robustness and stability. By using mutual information, it reduces the impact of sensitive attributes on clustering results, enhances the ability of deep neural networks to perceive sequence-based semantic information, and ultimately achieves better clustering results.
Claims
1. A fair clustering method for automated gene sequencing batch bias, characterized in that, Includes the following steps: S1. Obtain the given gene sequencing dataset and the batch bias sensitivity attributes contained in the gene sequencing dataset; S2. Construct an auto-encoder neural network and train it using the data obtained in step S1 to obtain a fair clustering model; S3. Use a fair clustering model to detect the gene sequencing dataset to obtain clustering results that are robust to batch bias in automatic gene sequencing. Gene sequencing datasets X express, ; Sensitive attributes contained in gene sequencing datasets are used G express, Assignment Gene sequencing datasets Divided into A set of mutually disjoint sets; among which, N For the number of cells, d Sequencing feature dimensions for each cell; The auto-encoder neural network includes a shared encoder and multiple decoders; the output of the shared encoder is connected to the input of the multiple decoders. The shared encoder of the auto-encoder neural network consists of a 6-layer fully connected network; The auto-encoder neural network consists of multiple decoders, including a 6-layer fully connected network. The specific implementation method of step S2 is as follows: S2-1, According to the formula: Obtain the reconstruction loss function used to train the auto-encoder neural network. L rec The model is warmed up by reconstructing the loss function using an auto-encoder neural network; among which, It is a shared encoder in an auto-encoder neural network. It is a multi-branch decoder of an auto-encoder neural network; Depend on It consists of a dedicated decoder for each sensitive attribute. ; It is the first i A dedicated decoder for each sensitive attribute; It is a gene sequencing dataset; S2-2. Using a preheated auto-encoder neural network with a shared encoder, each sensitive attribute data is encoded into a feature in a common space. h j = ( x j ); in features h j The k-means algorithm was used to cluster the cells, and the cluster centers U = {u1, u2, …u} were obtained. k }; x j Indicates the first j One data sample; u k Indicates the first k Cluster centers; S2-3, According to the formula: Get the first m The first feature and the first v The assignment function of cluster centers The clustering result C is denoted as the category corresponding to the maximum value of the assignment function; where, express and The cosine similarity; exp represents the natural constant. e An exponential function with base 0. It is the sensitivity coefficient; Represents the transpose of a matrix; S2-4. According to the formula: To obtain the result of maximizing mutual information L clu ;in, Indicates the first n The edge density of samples in each cluster, I(X;C) This represents the mutual information between the gene sequencing dataset and the clustering results, with a base of 2 in log. It is the first q The first feature to the first n The assignment function for each cluster center; It is the entropy value of the clustering result C; It is the conditional entropy of the clustering result C given the dataset X; S2-5. According to the formula: The result of minimizing mutual information is obtained. L fair ;in, It is the edge density of sensitive attributes. It is the joint probability density of clustering and sensitivity attributes. It is the first r The first feature and the first s The assignment function for each cluster center; It is an indicator function, if Then take 1, otherwise take 0. This represents the mutual information between sensitive attributes and clustering results. Indicates the first r Cluster centers; This represents the t-th sensitive attribute; S2-6. According to the formula: Obtain the loss function after fair clustering L ;in, Hyperparameter representation L clu The weight, Hyperparameter representation L fair The weights are determined; the parameters of the auto-encoder neural network are updated based on the loss function and gradient descent. S2-7. Repeat steps S2-2 to S2-6 until the auto-encoder neural network converges to obtain a fair clustering model.
2. The fair clustering method for automated gene sequencing batch bias according to claim 1, characterized in that, The specific implementation method of step S3 is as follows: Clustering results robust to batch bias in automated gene sequencing were obtained using the same methods as S2-2 and S2-3.