Few-shot in-context learning with large language models for antibody characterization

Read the full article See related articles

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

Abstract

Large language models (LLMs) exhibit the emergent ability of few-shot in-context learning (ICL), allowing them to learn from demonstrations in simple prompts without task-specific training. However, applying few-shot ICL to biological sequences for classification, especially in computational immunology, remains underexplored. Here, we apply few-shot ICL with 18 general-purpose LLMs across five families to three antibody characterization scenarios, including predicting antibody humanness, specificity, and isotype. We evaluate performance under zero-shot, few-shot, and few-shot Chain-of-Thought ICL settings. We propose similarity-based few-shot demonstration selection strategies, which significantly improve performance of few-shot ICL compared to random selection. In all three scenarios, few-shot ICL, with as few as 32 examples, matches or exceeds the performance of established machine learning (ML) models trained on large datasets using traditional feature encodings. In two of the evaluated scenarios, few-shot ICL even matches or outperforms ML models that use state-of-the-art protein language model-based embeddings. Moreover, combining few-shot ICL with fine-tuning further enhances performance. We also demonstrate the reproducibility and stability of few-shot ICL results. Our findings establish few-shot ICL as a powerful method for efficiently characterizing antibody properties without task-specific training, enabling a single model to perform multiple tasks immediately. Its simplicity and versatility make few-shot ICL a promising approach to antibody characterization for researchers from diverse backgrounds, especially those without coding knowledge.

Article activity feed