Immune2vec: Embedding B/T Cell Receptor Sequences in ℝ N Using Natural Language Processing

Miri Ostrovsky-Berman, Boaz Frankel, Pazit Polak, Gur Yaari

Research output: Contribution to journalArticlepeer-review

19 Scopus citations


The adaptive branch of the immune system learns pathogenic patterns and remembers them for future encounters. It does so through dynamic and diverse repertoires of T- and B- cell receptors (TCR and BCRs, respectively). These huge immune repertoires in each individual present investigators with the challenge of extracting meaningful biological information from multi-dimensional data. The ability to embed these DNA and amino acid textual sequences in a vector-space is an important step towards developing effective analysis methods. Here we present Immune2vec, an adaptation of a natural language processing (NLP)-based embedding technique for BCR repertoire sequencing data. We validate Immune2vec on amino acid 3-gram sequences, continuing to longer BCR sequences, and finally to entire repertoires. Our work demonstrates Immune2vec to be a reliable low-dimensional representation that preserves relevant information of immune sequencing data, such as n-gram properties and IGHV gene family classification. Applying Immune2vec along with machine learning approaches to patient data exemplifies how distinct clinical conditions can be effectively stratified, indicating that the embedding space can be used for feature extraction and exploratory data analysis.

Original languageEnglish
Article number680687
JournalFrontiers in Immunology
StatePublished - 22 Jul 2021

Bibliographical note

Publisher Copyright:
© Copyright © 2021 Ostrovsky-Berman, Frankel, Polak and Yaari.


  • BCR repertoire
  • NLP
  • biological sequence embedding
  • computational immunology
  • word2vec


Dive into the research topics of 'Immune2vec: Embedding B/T Cell Receptor Sequences in ℝ N Using Natural Language Processing'. Together they form a unique fingerprint.

Cite this