bioRxivBioinformaticsPreprint
TCRseek: Scalable Approximate Nearest Neighbor Search for T-Cell Receptor Repertoires via Windowed k-mer Embeddings
Abstract
The rapid growth of T-cell receptor (TCR) sequencing data has created an urgent need for computational methods that can efficiently search CDR3 sequences at scale. Existing approaches either rely on exact pairwise distance computation, which scales quadratically with repertoire size, or employ heuristic grouping that sacrifices sensitivity. Here we present TCRseek, a two-stage retrieval framework that combines biologically informed sequence embeddings with approximate nearest neighbor (ANN) indexing for scalable search over TCR repertoires. TCRseek first encodes CDR3 amino acid sequences into fixed-length numerical vectors through a multi-scale windowed k-mer embedding scheme derived from BLOSUM62 eigendecomposition, then indexes these vectors using FAISS-based structures (IVF-Flat, IVF-PQ, or HNSW-Flat) that support sublinear-time search. A second-stage reranking module refines the shortlisted candidates using exact sequence alignment scores (Needleman-Wunsch with BLOSUM62), Levenshtein distance, or Hamming distance. We benchmarked TCRseek against tcrdist3, TCRMatch, and GIANA on a 100,000-sequence corpus with precomputed exact ground truth under three distance metrics. Under cross-metric evaluation--where the reranking and ground truth metrics differ, providing the most informative test of generalization--TCRseek achieved NDCG@10 = 0.890 (Levenshtein ground truth) and 0.880 (Hamming ground truth), ranking highest among the retained baselines under Hamming and remaining competitive with tcrdist3 (0.894) under Levenshtein. When the reranking metric matches the ground truth definition (BLOSUM62 alignment), NDCG@10 reached 0.993, confirming that the ANN shortlist captures >99% of true neighbors--the expected ceiling of the two-stage design. On the 100,000-sequence corpus, TCRseek achieved 3.6-39.6x speedup over exact brute-force search depending on index type and distance metric, with the largest gains for alignment-based retrieval. These results demonstrate that embedding-based ANN search provides a practical and scalable alternative for TCR repertoire analysis.
- Citations
- 0
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- RapTCR: Rapid exploration and visualization of T-cell receptor repertoires
Vincent M.L. Van Deuren, Sebastiaan Valkiers, … Pieter Meysman·bioRxiv·Sep 13, 2023
- clusTCR: a Python interface for rapid clustering of large sets of CDR3 sequences
Sebastiaan Valkiers, Max Van Houcke, … Pieter Meysman·Computer applications in the biosciencesPeer-reviewed·Jun 15, 2021
- Deciphering antigen-driven T cell responses through vectorized TCRdist sequence neighborhood quantification
Sebastiaan Valkiers, Koshlan Mayer-Blackwell, … Philip H Bradley·bioRxiv·Apr 14, 2026
- An ultra-sensitive T-cell receptor detection method for TCR-Seq and RNA-Seq data
Si‐Yi Chen, Chunjie Liu, … An‐Yuan Guo·BioinformaticsPeer-reviewed·May 6, 2020
- meTCRs - Learning a metric for T-cell receptors
Felix Drost, Lennard Schiefelbein, Benjamin Schubert·bioRxiv·Oct 24, 2022
- TCRMatch: Predicting T-cell receptor specificity based on sequence similarity to previously characterized receptors
W. D. Chronister, A. Crinklaw, … B. Peters·bioRxiv·Dec 11, 2020