Abstract
Comparing complex biological samples, such as single-cell RNA sequencing (scRNA-seq) data, requires robust distance metrics that can handle high-dimensional distributions. We present Global Ground Metric Learning (GGML), a framework that learns a distance metric between individual data points using only group-level labels. By optimizing the ground metric within an Optimal Transport framework, GGML improves clustering, classification, and interpretability in large-scale genomic datasets.
Introduction
In fields like genomics, researchers often represent a patient not as a single data point, but as a distribution—a "cloud" of thousands of individual cells, each defined by the expression of thousands of genes. To compare these patients, researchers frequently use Optimal Transport (OT), which calculates the "cost" of transforming one distribution into another.
The effectiveness of OT depends heavily on the ground metric—the distance measure between individual cells. Standard approaches often default to simple Euclidean distance, which assumes all features are equally important and ignores underlying biological structures. While Ground Metric Learning (GML) exists to address this, current methods often struggle to generalize across many groups or fail when distributions do not share the same support. We introduce Global Ground Metric Learning (GGML) to overcome these limitations.
Methodology
GGML learns a Mahalanobis distance, which performs a linear transformation on the data to highlight the most relevant features before measuring distance. Unlike standard Global Metric Learning, which optimizes distances between individual points, GGML optimizes the ground metric based on distribution-level relationships.
Key Technical Innovations
- Distribution-Level Triplet Loss: The model is trained on triplets of distributions. It learns a metric such that a distribution from Class A is closer to another from Class A than to one from Class B.
- Low-Rank Approximation: Learning a full distance matrix for ~20,000 genes is computationally prohibitive. GGML utilizes a low-rank factorization ($W^TW$) to project high-dimensional data into a smaller, manageable subspace that captures the essential biological signal.
- Linear Scalability: By employing a neighbor parameter $t$ to limit the number of triplets, the authors ensure the computational complexity scales linearly with the number of patients, making it viable for large-scale clinical datasets.
Experimental Setup and Datasets
The framework was validated on both synthetic and real-world biological data:
- Synthetic Multimodal Data: 2D and 200D datasets where classes are only distinguishable in specific "modes," designed to challenge standard global metrics.
- scRNA-seq Disease Datasets: Three large-scale human datasets covering Breast Cancer, Kidney Disease, and Myocardial Infarction, containing between 191k and 714k cells across hundreds of tissue samples.
Key Results
GGML consistently outperformed baseline metrics (Euclidean, Cosine) and existing metric learning algorithms (NCA, LMNN, ITML) across all tasks:
- Classification Accuracy: On patient-level disease classification, GGML achieved 91-94% accuracy across the three disease datasets, while the Euclidean baseline hovered between 49-77%.
- Clustering and Visualization: GGML produced significantly cleaner separations in patient embeddings. It effectively filters out healthy variation between cell types (e.g., T-cells vs. epithelial cells) to focus specifically on the variance that differentiates disease states.
- Interpretability: Because the model learns a weight matrix for features, researchers can directly identify the most heavily weighted genes. GGML automatically identified known disease markers, such as DUSP1 for kidney injury, without prior guidance.
- Computational Efficiency: The low-rank approach allowed the model to process the massive breast cancer dataset (714k cells) where other popular methods failed due to memory limits.
Conclusion
GGML provides a scalable and interpretable solution for learning ground metrics from group-level labels. By leveraging the distribution-level structure of single-cell data, it enables more accurate disease classification and biomarker discovery. Future work will explore unsupervised extensions and non-linear deep ground metrics to further capture complex biological relationships.
Summary updated