Task 01
Protective Antigen Recognition
Use the antigen sequence entered in this card to score whether it is likely to be protective.
Ready for prediction.
Introduction
AntigenLM Overview
A dedicated protein language model for microbial antigens, integrating lineage-guided transfer and structure-aware masking to boost immune-specific representation learning.
Large scale computational analysis of microbial antigen immunogenicity is central to vaccine discovery, yet progress remains limited by the absence of antigen representations that are both immune-aware and transferable. General protein language models are pretrained on corpora with limited antigen coverage, biasing them toward conserved evolutionary features rather than immune-relevant signals. Meanwhile, immunological determinants are often weak, sparse and localized, which would be lost when long proteins are handled by naive truncation. Here we introduce AntigenLM, a protein language model designed for microbial antigen representation. AntigenLM uses lineage guided hierarchical transfer to progressively adapt representations from broad microbial proteins to pathogen related and antigen enriched sequences. It further integrates structure-aware masking and overlapping sliding windows to improve sensitivity to localized immune signals while preserving contextual continuity. Across protective antigen prioritization, antigen presentation, and TCR recognition, AntigenLM outperforms general-purpose protein language models, achieving statistically significant performance gains in bacterial protective antigen prioritization, microbial peptide-HLA-I binding prediction, and microbial peptide-centered TCR recognition tasks. These results establish antigen-specialized representation learning as a robust foundation for vaccine discovery and computational immunology.
Each task uses its own antigen input together with the task-specific paired sequence when required.
AntigenLM Interface
Enter the antigen sequence for each task card separately, then run protective, antigen-TCR, or antigen-HLA-I prediction.
For large-scale offline prediction, please download and install AntigenLM locally. Details are available on the GitHub page.
Task 01
Use the antigen sequence entered in this card to score whether it is likely to be protective.
Ready for prediction.
Task 02
Use the antigen sequence in this card together with the paired TCR sequence below.
Ready for prediction.
Task 03
Use the antigen sequence in this card together with the paired HLA amino-acid sequence below.
Ready for prediction.
User guide for running the AntigenLM web server correctly.
AntigenLM Document
This section provides structured documentation for the AntigenLM web server, including task definitions, input requirements, score interpretation, and local environment setup. Links for datasets, pretrained checkpoints, and source code are centralized on the Download page rather than repeated here.
The Document page summarizes how to use the AntigenLM web interface for downstream prediction tasks. Each task card on the Server page works independently, includes a Load Example option for quick validation, and only uses the sequences entered within that specific panel, which helps researchers evaluate different inputs without cross-interference and verify the expected submission format before running custom sequences.
Each downstream task addresses a distinct biological question and therefore requires a different input configuration. Protective Antigen Prediction uses only an antigen amino-acid sequence, Antigen–HLA-I Binding requires an antigen sequence together with the paired HLA-I pseudo sequence, and Antigen–TCR Binding requires an antigen sequence together with the paired TCR sequence entered in the corresponding task card before inference. All returned scores range from 0 to 1, and higher values indicate stronger model confidence for the positive outcome, so higher Protective score values suggest a more likely protective antigen, higher Antigen–HLA-I score values suggest stronger predicted binding or presentation potential, and higher Antigen–TCR score values suggest stronger predicted recognition or binding potential; these scores should be used for prioritization rather than treated as direct experimental confirmation.
conda create -n antigenlm python=3.10 conda activate antigenlm
We recommend installing the local environment using the provided environment.yaml file to ensure compatibility across AntigenLM training and downstream evaluation workflows:
conda env update -f environment.yaml --prune
If this approach fails or Conda is not available, you can manually install the main dependencies as listed below.
torch==2.1.0+cu121 torchvision==0.16.0+cu121 torchaudio==2.1.0+cu121 transformers==4.46.3 tokenizers==0.20.3 sentencepiece==0.2.0 safetensors==0.5.3 huggingface-hub==0.36.2 accelerate==1.0.1 deepspeed==0.10.3 peft==0.13.2 fair-esm==2.0.0 numpy==1.24.1 pandas==2.0.3 scipy==1.10.1 scikit-learn==1.3.2 tqdm==4.67.1 biopython==1.83
Before execution, make sure the dataset paths, pretrained model locations, and checkpoint directories in the configuration files point to valid local resources. After setup, the training and downstream pipelines can be launched with the provided entry points, such as DeepSpeed for microLM pretraining and Python or torchrun for protective antigen, antigen–HLA-I, and antigen–TCR tasks.
Code, datasets, and pretrained checkpoints for AntigenLM.
Resources
Grab the GitHub repository, curated datasets, and pretrained models in a single place.
Five curated datasets for microbial antigen modeling and fine-tuning.
Pretrained checkpoints for immediate embedding and downstream evaluation.
Clone the full AntigenLM repository with training and downstream pipelines.
All datasets and models can also be downloaded from Zenodo.
If you have any questions, please contact us:
Bin Liu's lab at Beijing Institute of Technology (BIT) is focusing on developing techniques grounded in the natural language processing (NLP) to uncover the meanings of "book of life." The research areas of Bin Liu's lab include:
For more relevant research, please see http://bliulab.net.
We sincerely thank the laboratory members, partners, and reviewers for their dedicated efforts and valuable time invested in this project. Additionally, we thank the National Natural Science Foundation of China (No.62325202, 62473049) and the Zhongguancun Academy (Project No. 20240101).
The project referenced and used the free and open source CSS framework for UI.