Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Contextualizing Biological Language Models across Modalities via Logit-Space Contrastive Alignment

About

Pretrained biological language models expose per-token probability distributions through masked-token prediction, providing the likelihood interface central to sequence design, variant scoring, and mechanistic interpretation. Yet these distributions are learned from broad unlabeled corpora and are not naturally conditioned on task-specific biological contexts such as interaction partners, cellular environments, or therapeutic interventions. Existing contextual matching methods often distort this interface through pooled embeddings, contrastive latent spaces, or task-specific prediction heads. We introduce LOGICA (Logit-space Contrastive Alignment), a framework for context-conditioned prediction that performs contrastive learning directly in output-logit space. Using gated cross-modal adapters compatible with each model's native token head, LOGICA preserves the pretrained likelihood interface and converts contextualized token log-likelihoods into matching scores. Alignment is defined through context-sensitive token probabilities rather than proximity in a shared embedding space, enabling learning from sparse paired data across models with distinct vocabularies, without a shared tokenizer or decoder. LOGICA is particularly effective for mutation-local variant ranking, where comparisons reduce to context-conditioned likelihoods of mutant tokens at perturbed sites. Across protein--ligand binding, TCR--peptide activity, and drug-conditioned resistance prediction, LOGICA improves over prior state-of-the-art methods, including matched latent-contrastive and conditional MLM baselines, while retaining a token-level interface for interpretation and generation. On held-out-gene single-mutation drug-resistance prediction, LOGICA improves AUC from near-random latent-space baselines of $\sim$0.55 to $\sim$0.65.

Yanjun Shao, Yundi Chen, Yashvi Patel, Aurelien Pelissier, Mar\'ia Rodr\'iguez Mart\'inez• 2026

Related benchmarks

TaskDatasetResultRank
Drug-Target Interaction PredictionBIOSNAP
AUROC0.921
30
Drug-resistance variant scoringCoelho 10g
Rho0.271
14
Drug-resistance variant scoringKim EGFR
Correlation Coefficient (rho)0.295
14
Binary ClassificationePytope mutation sets
AUC67.2
12
TCR-epitope variant rankingePytope n = 26
Pearson Correlation0.296
11
TCR-epitope variant rankingBATCAVE
Pearson Correlation Coefficient0.223
11
TCR-epitope variant rankingATLAS-PEP n = 10
Pearson Correlation Coefficient0.632
11
TCR-epitope variant rankingATLAS-TCR (n = 7)
Pearson Correlation Coefficient0.131
11
TCR-epitope interaction predictionIMMREP25 unseen epitopes
AUC0.5
11
Protein-ligand binding predictionDAVIS
AUC92.4
9
Showing 10 of 14 rows

Other info

Follow for update