Masked Language Modeling for Proteins via Linearly Scalable Long-Context Transformers

Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane +6 more
6/5/2020
cs.LGcs.CLstat.ML
transformer-attention

Official code: google-research/google-research (39,251 stars, Jupyter Notebook, Apache-2.0, last commit 2026-04-30).

Abstract

Transformer models have achieved state-of-the-art results across a diverse range of domains. However, concern over the cost of training the attention mechanism to learn complex dependencies between distant inputs continues to grow.

Show full abstract

In response, solutions that exploit the structure and sparsity of the learned attention matrix have blossomed. However, real-world applications that involve long sequences, such as biological sequence analysis, may fall short of meeting these assumptions, precluding exploration of these models. To address this challenge, we present a new Transformer architecture, Performer, based on Fast Attention Via Orthogonal Random features (FAVOR). Our mechanism scales linearly rather than quadratically in the number of tokens in the sequence, is characterized by sub-quadratic space complexity and does not incorporate any sparsity pattern priors. Furthermore, it provides strong theoretical guarantees: unbiased estimation of the attention matrix and uniform convergence. It is also backwards-compatible with pre-trained regular Transformers. We demonstrate its effectiveness on the challenging task of protein sequence modeling and provide detailed theoretical analysis.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Google Research

39,2518,516Jupyter Notebook, PythonOct 4, 20187 months agoApache-2.0
aimachine-learningresearch

Similar Papers

Cite this paper

@article{choromanski2020masked,
  title  = {Masked Language Modeling for Proteins via Linearly Scalable Long-Context Transformers},
  author = {Krzysztof Choromanski and Valerii Likhosherstov and David Dohan and Xingyou Song and Andreea Gane and Tamas Sarlos and Peter Hawkins and Jared Davis and David Belanger and Lucy Colwell and Adrian Weller},
  year   = {2020},
  eprint = {2006.03555},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.03555}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2006.03555.svg)](https://codeofpaper.com/paper/2006.03555)

Discussion