Self-Attention Sequence Processing Complexity
In a self-attention mechanism processing a sequence of length , the query, key, and value matrices each have dimensions . The scaled dot-product attention computes the product of an matrix with a matrix, and then multiplies the resulting matrix by an matrix. This yields a total computational complexity of . Since every token is directly connected to every other token, the computation requires only sequential operations (enabling full parallelization), and the maximum path length is the shortest possible at .
0
1
References
Tags
D2L
Dive into Deep Learning @ D2L
Related
RNN Sequence Processing Complexity
Trade-offs in Sequence Architecture Selection
CNN Sequence Processing Complexity
Match each sequence-to-sequence evaluation parameter or component to its definition.
When comparing architectures for sequence mapping, requiring a smaller number of sequential operations is desirable because it enables ___ computation.
Which architectural evaluation property should the team focus on addressing to resolve this issue, and what specific characteristic should they seek in an alternative architecture?
Related
RNN Sequence Processing Complexity
Trade-offs in Sequence Architecture Selection
CNN Sequence Processing Complexity
Match each sequence-to-sequence evaluation parameter or component to its definition.
When comparing architectures for sequence mapping, requiring a smaller number of sequential operations is desirable because it enables ___ computation.
Which architectural evaluation property should the team focus on addressing to resolve this issue, and what specific characteristic should they seek in an alternative architecture?