All models

AbLang

A RoBERTa-style language model trained only on antibody sequences, used to fill in missing residues.

Molecules, proteins and genomics · 521 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (35 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
85.8M
Operations
521
Framework
PyTorch
Recurrent
No
Published
2022, Bioinformatics Advances
Cited by
196 (as of 17 October 2026)
Authors
Tobias H. Olsen, Iain H. Moal, Charlotte M. Deane
License
BSD-3-Clause
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m73
Graph hash
05bd63cc4e335f3b85ed44a910ca842a18a180ca0b541cd77e4b3622ed193399
Skeleton hash
5e7fd7e32dd7ff4389e533212ca1fc9f2b5a930b9447c12879a0d79d3d60ba2a
Architecture hash
584aa6b3a71a81fee93c6ab53195888b2f790ba5cf5c5b11b08353f5897b56c8
Diagram SHA-256
5ad9fced645043a2b6b04bbab1528b43441c1def883cf8174197fe0201d15a5b
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

AbLang is a language model trained only on antibody sequences, built to do for antibodies what general protein language models do for proteins at large. The paper's headline use is practical: restoring residues lost to sequencing errors, since over 40% of the sequences in the Observed Antibody Space database are missing the first 15 amino acids. Two models were trained, one for heavy chains and one for light chains; the captured member is the heavy-chain configuration.

Each AbLang model has two parts: AbRep, which turns a sequence into per-residue representations, and AbHead, which converts those into the likelihood of each amino acid at each position. AbRep follows the RoBERTa architecture, with a learned positional embedding up to length 160, and stacks 12 transformer blocks of 12 heads, hidden size 768 and inner size 3072. Pre-training was masked-residue prediction in the RoBERTa style: between 1% and 25% of residues were selected per sequence, of which 80% were masked, 10% swapped for another residue and 10% left unchanged. The heavy-chain model saw 20 epochs at batch size 8192 over a training set of 14 126 724 heavy sequences.

On restoring the first 15 positions, AbLang and IMGT germlines are comparable at around 98% for heavy chains, while the general protein model ESM-1b reaches only 64%. AbLang also needs no knowledge of the antibody's germline and is seven times faster than ESM-1b. The output of the traced heavy-chain model is one row of 24 amino-acid likelihoods for each of 128 positions, the res-likelihoods the package exposes for exploring possible mutations.

Key idea. An antibody-specific language model that restores missing residues in antibody sequences more accurately than IMGT germlines or the general protein model ESM-1b, without needing the germline.

  • ablang
  • AbLang-heavy
  • AbLang-light
  • antibody language model
  • antibody
  • heavy chain
  • light chain
  • AbRep
  • AbHead
  • protein language model
  • OAS
  • observed antibody space
  • antibody sequence restoration
  • missing residues
  • roberta
  • masked language model
  • res-codings
  • seq-codings
  • res-likelihoods

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Olsen_2022, title={AbLang: an antibody language model for completing antibody sequences}, volume={2}, ISSN={2635-0041}, url={http://dx.doi.org/10.1093/bioadv/vbac046}, DOI={10.1093/bioadv/vbac046}, number={1}, journal={Bioinformatics Advances}, publisher={Oxford University Press (OUP)}, author={Olsen, Tobias H and Moal, Iain H and Deane, Charlotte M}, editor={Lengauer, Thomas}, year={2022}, month=Jan }