Encoder-Only Architecture

Category: Neural Networks & Architectures

A transformer variant that uses only the encoder with bidirectional self-attention, producing contextual representations for understanding tasks.

Full Explanation

Encoder-only architectures use only the encoder portion of the transformer with bidirectional self-attention, where every position can attend to all other positions. This produces rich contextual representations of the input that are well-suited for understanding and classification tasks. BERT is the most well-known encoder-only model, trained with masked language modeling and next sentence prediction. Encoder-only models excel at tasks like text classification, named entity recognition, question answering, and semantic similarity. They are typically used with task-specific output heads added on top of the encoded representations. While encoder-only models cannot directly generate text, they produce high-quality embeddings and are widely used for sentence and document representations. RoBERTa, DeBERTa, and ELECTRA are notable encoder-only models.

Related Terms

More in Neural Networks & Architectures

Explore More

  • AI Tools Library — Discover AI tools related to Encoder-Only Architecture
  • AI Education — Courses to learn about Neural Networks & Architectures
  • AI News — Latest news and updates