Passer au contenu

Bitcoin accepté au paiement  |  Expédié depuis Laval, QC, Canada  |  Soutien expert depuis 2016

Encoder-Decoder Architecture

Sovereign AI

Definition

The encoder-decoder architecture is a neural network design built from two cooperating components: an encoder that compresses an input into an internal representation, and a decoder that expands that representation into an output. It is the foundation of sequence-to-sequence (seq2seq) learning, where input and output can be sequences of different lengths and even different kinds — a French sentence in, an English sentence out; audio in, a transcript out; an image in, a caption out. The pattern's power is exactly this decoupling: once meaning is captured in an intermediate representation, what comes out no longer has to mirror what went in.

How it works

The encoder processes the input and folds its information into an internal state — historically a single fixed-size context vector, today usually a full set of contextual embeddings, one per input element. The decoder then generates the output step by step, each step conditioned on the encoded representation and on everything it has produced so far (autoregressive generation). Training typically uses teacher forcing: the decoder is fed the correct previous tokens during training so errors do not compound while the model is still learning. Because the input is fully summarized before generation begins, the architecture cleanly handles variable-length inputs and outputs that a single-pass classifier cannot.

The bottleneck, attention, and the transformer

Early seq2seq systems built on Recurrent Neural Networks (RNNs) had a famous flaw: squeezing a long input into one fixed-size vector loses detail, so translation quality degraded with sentence length. The attention mechanism (Bahdanau and colleagues, 2014) solved it by letting the decoder look back at all encoder states at every step and weight them dynamically — no more single bottleneck. The 2017 transformer took the logical final step, discarding recurrence entirely and building both halves out of attention alone. Modern practice then split the family three ways: encoder-only models (BERT-style) for understanding and classification, decoder-only models (the GPT lineage, and most local LLMs you can self-host) for generation, and full encoder-decoder models (T5-style, plus most machine-translation and speech-recognition systems) where distinct input and output domains still favor the two-component design.

Why the pattern keeps recurring

Encoder-decoder thinking shows up wherever data must change shape or domain: the Variational Autoencoder (VAE) pairs the two halves probabilistically for generation, speech pipelines encode audio and decode text, and multimodal models use per-modality encoders feeding a shared decoder. For someone assembling a sovereign AI stack, the taxonomy is practical, not academic: it tells you what a model can do (encoder-only models cannot generate), what its compute profile looks like (encoders run once per input; decoders run once per generated token, which is why local LLM speed is measured in tokens per second), and how to read a model card's architecture line before committing your bandwidth and disk to the weights. D-Central covers it as one of the few genuinely load-bearing ideas in modern AI — a design so general it survived the replacement of every component inside it. Recurrent cells gave way to attention, fixed context vectors gave way to full state access, and the pattern itself never blinked. When an idea in engineering outlives three generations of its own implementation, it is telling you something about the shape of the problem — here, that transformation between representations is what intelligence-shaped computation fundamentally does, and that separating "understand the input" from "produce the output" is a division of labor reality itself seems to respect. For the self-hoster picking models today, that history is also a practical filter: architectures descended from this pattern have a decade of tooling, quantization support, and community knowledge behind them, which is exactly what you want when the hardware, the debugging, and the consequences are all yours.

In Simple Terms

The encoder-decoder architecture is a neural network design built from two cooperating components: an encoder that compresses an input into an internal representation, and a…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Glossaire du minage

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Comparer les mineurs