What is the main limitation of learned absolute positional embeddings?
mediumAnswer
- They can't extrapolate — at inference, positions beyond have never been trained and produce garbage.
- Also, they encode absolute rather than relative positions, so translating the sentence within a longer context changes the embedding.
- Solved by relative PE (Shaw), RoPE (rotational), or ALiBi (linear bias on attention scores) — all of which behave well at longer sequences.
Check yourself — multiple choice
- Learned PE extrapolates perfectly
- Can't extrapolate beyond and encodes absolute (not relative) position — RoPE/ALiBi solve both
- Learned PE is the modern standard
- Same as sinusoidal PE
Learned absolute PE fails past and encodes absolute — RoPE/ALiBi fix both.
#positional-encoding#transformers
Practise Deep Learning
214 interview questions in this topic.