Practice free →
HomeClaudeaifoundationstransformer_attention › What is the maximum path length in self-attentio…

What is the maximum path length in self-attention layers?

AO(n), linear in the length of the sequence
BO(log_k n), logarithmic via convolutions of size k
CO(n / r), in restricted-neighbourhood attention
DO(1), constant regardless of sequence length
Answer & Solution
Correct answer: D. O(1), constant regardless of sequence length
Any two positions are O(1) apart in self-attention — direct attention edges. Recurrent layers have O(n) maximum path length, hindering long-range learning.
Solve this in the app — Claude practice & 24k+ MCQs →
Related questions