Decoder

In deep learning and neural networks, the decoder is the specialised part of a model whose task is to transform an internal, often abstract and compressed representation of data into a target format intelligible to a human or required for the output task. It typically follows the encoder, which first processes the input data (text or an image, say) into condensed form, the so-called context vector or latent space. The decoder then takes this vector and generates an output sequence from it step by step – a translated sentence, a description of an image or an audio track. Its function is central to sequential models such as transformers or recurrent neural networks.


Imagine somebody telling you the main idea of a complicated story in a single short sentence. That is the encoder’s work – condensing a great deal of information into a small package. The decoder’s task is then to take that one condensed sentence and unfold the whole original story from it again, with all its detail, characters and plot. In artificial intelligence, then, the decoder converts the model’s abstract, mathematical idea back into a form we understand, whether that is readable text, an image or a sound.

Is this article useful to you and are you citing it? Copy the citation