Intuition
One representation asks questions of another representation, such as generated text looking back at an image or source sentence.
Technical definition
Cross-attention usually forms queries from one stream and keys and values from another stream, enabling conditional information flow across inputs.
Example
An image captioning model may use text queries that attend to visual features.
Common misunderstandings
- Cross-attention is not the same as concatenating inputs.
- It is a mechanism used inside many architectures, not only translation models.