TL;DR
Choosing the right clustering resolution in single-cell and Perturb-seq analysis has long relied on trial-and-error or blind geometric metrics like silhouette scores. HYPOGENEAGENT introduces a biology-aware alternative: it uses a large language model (LLM) agent to generate ranked Gene Ontology hypotheses for each cluster and scores candidate resolutions based on internal functional coherence versus external distinctiveness. This closes the loop between unsupervised cell clustering and automated, biologically grounded interpretation.
What Problem Does This Paper Address?
In single-cell RNA sequencing and pooled CRISPR screens (Perturb-seq), clustering is foundational for identifying cell types, states, and perturbation effects. Community detection algorithms (like Leiden or Louvain) require setting a resolution parameter, which dictates whether cells are partitioned into a few coarse groups or many fine-grained subsets.
Today, practitioners typically rely on generic mathematical diagnostics (such as modularity or silhouette width) or manually inspect marker gene heatmaps until the clusters "look right." Classical geometric metrics evaluate whether data points are close in PCA/UMAP space, but they are entirely blind to biological meaning—often mixing distinct pathways or failing on non-convex manifolds. HYPOGENEAGENT replaces this subjective tuning with a quantitative, biological metric derived directly from LLM-based functional annotations.
Methods
HYPOGENEAGENT implements an automated, multi-stage workflow:
- Multi-Resolution Clustering: Runs Leiden clustering across a grid of resolutions (e.g., $r \in [0.1, 1.0]$) in both gene-expression space and CRISPR-guide perturbation space.
- Evidence-Augmented Hypothesis Generation: For each cluster, the top differentially expressed marker genes are extracted and fed to an LLM agent (the authors find reasoning models like
o3perform best). Augmented with functional summaries retrieved from GO, KEGG, and PubMed, the agent outputs up to five ranked biological process hypotheses with calibrated confidence scores. - Embedding and Semantic Scoring: The hypotheses are converted into vector representations using a text-embedding model (
text-embedding-3-large). - Resolution Score ($RS_k$): The framework computes two complementary semantic metrics for each cluster $k$:
- Intra-cluster Similarity ($ICS_k$): The average cosine similarity between the top-ranked hypothesis and the lower-ranked hypotheses. High $ICS$ indicates high internal biological coherence.
- Inter-cluster Distinctiveness ($ICD_k$): The average cosine similarity between the top hypothesis of cluster $k$ and the top hypotheses of all other clusters.
- Combined Metric: $RS_k = w \cdot ICS_k + (1 - w)(1 - ICD_k)$ (using $w = 1/3$). Maximizing this score identifies resolutions where clusters are biologically distinct from each other yet internally self-consistent.
Datasets
- GOBP Benchmark (Stage 1): 100 non-redundant Gene Ontology Biological Process gene sets used to benchmark prompt formats, LLM backends (GPT-4o, GPT-o3, GPT-5, Gemini-2.0-Flash, Gemini-2.5-Pro), and text embedders.
- K562 Perturb-seq Dataset (Stage 2): A large-scale CRISPRi screen of essential genes in human chronic myeloid leukemia (K562) cells (Replogle et al., 2022). After QC, the benchmark used 25,161 cells, 3,000 highly variable genes, and 2,005 targeted perturbations.
Key Insights and Ideas
- Reasoning models make calibrated biologists: "Thinking" LLMs (like GPT-o3) notably outperformed standard conversational models at generating biologically accurate annotations. Crucially, their self-reported confidence scores closely mirrored semantic similarity to ground truth.
- Language embeddings act as biological distance metrics: Traditional clustering metrics measure distances in gene-expression Euclidean space. By measuring distances in the embedding space of functional text hypotheses, the framework directly evaluates biological distinctiveness.
- Closing the clustering feedback loop: Rather than using LLMs strictly as a post-hoc labeling tool, this approach uses the quality of LLM annotations as the optimization objective to select upstream clustering hyperparameters.
Key Results
- Model Benchmarking: GPT-o3 achieved the highest semantic accuracy against ground-truth GOBP terms, reaching an AUC of 0.743 at a similarity threshold of 0.40.
- Resolution Selection in Perturb-seq:
- At the gene-expression (GEX) level, HYPOGENEAGENT selected an optimal Leiden resolution of $r = 0.4$ (yielding 9 well-separated, biologically coherent clusters).
- At the perturbation module level, it selected $r = 0.5$ (10 clusters).
- Comparison to Traditional Baselines: While silhouette scores showed ambiguous elbows ($r \approx 0.5 - 0.6$) and graph modularity plateaued with marginal gain past $r = 0.5$ (peaking at $r = 0.7$), HYPOGENEAGENT identified clear optima that matched standard Fisher's exact test enrichment profiles without needing human intervention.
Limitations and Future Work
- Scale and Compute Costs: Running multi-call LLM agent loops over every cluster across multiple resolutions can become expensive and latency-heavy on massive atlases (such as whole-genome CRISPR screens or million-cell Human Cell Atlas drafts).
- Ontology and Modality Scope: Current testing focuses primarily on Gene Ontology Biological Processes in transcriptomic/CRISPRi data; extending to cell-type hierarchies, chromatin accessibility (scATAC-seq), or spatial transcriptomics remains open.
- Prompt Sensitivity & Model Dependency: Changes in the underlying LLM or prompt formulations could introduce subtle shifts in scoring stability.
Summary updated