Skip to content

    Cross-Attention

    AI fundamentals & modelsEncoder decoder AttentionCross-Source Attention
    Reading time: 2 min.Editorially reviewed on:

    Definition

    Attention mechanism, where queries access keys and values from another representation.

    Cross-attention connects two streams of information. In the classic encoder-decoder transformer, queries come from the decoder and keys as well as values from the encoder. In self-attention, they come from the same stream. The mechanism can also connect text and image information.

    Simply explained

    When formulating, you look specifically at the appropriate places of another template.

    Why it matters in practice

    Relevant to understanding translation models and multimodal information linking.

    Example from business

    Example scenario: A translation decoder uses the representation of the initial set for the next output words.

    Limits and pitfalls

    • Confuse cross-attention with cross-encoder; interpret attention weights as a safe explanation; consider any transformer to be encoder decoder.

    Origin & history

    The Transformer architecture of Vaswani and colleagues made Encoder-Decoder Attention 2017 a central building block.

    Use in mid-sized companies

    • When selecting models, check how different inputs are connected; evaluate practical quality based on the task.

    Frequently asked questions

    Is this self-attention?

    No. Does every LLM contain cross-attention? No. Is it only for translation? No.

    Sources

    Source check: 10/09/2026. Definition and documented classification verified; examples describe possible applications.

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice