Summary
The paper investigates the approximation capabilities of transformers with relative positional encodings and derives approximation rates for three types of sequence modeling tasks. Each task corresponds to a particular choice of target function class. Namely, a first class of mappings are fixed, long but sparse memories (equation (5)), and the authors focus on dot-product free transformers. A second class are adaptive, long but sparse memories (equation (8)), and the authors consider deep transformers with specific precision and no SoftMax. The last class of mappings are essentially sparse memories and consist of convolving the input sequence with different kernels where, again, the considered Transformers are dot-product free.
Each approximation rate is commented on the role of the feedforward and self-attention components, the role of dot-product attention (that is, the fact that the attention maps depend on the input sequence through pairwise interactions), and the effect of relative position encoding (whether it is of linear or logarithmic type).
Strengths
- The paper is well written and easy to follow.
- The mathematical results are all supported with detailed and rigorous proofs.
- Each Theorem is structured in the same way which eases the understanding of the whole paper.
- The paper adresses the important question of approximation rates of Transformers in sequence modeling.
- The paper establishes rigorous approximation results for Transformers on sequences modeling tasks. These results are significant and give insights on the role of the different Transformer components on their approximation capabilities.
- The three problem formulations are clearly defined and commented.
Weaknesses
- Unless I missed something, the "true" attention mechanism (line 104) is never used in the paper to derive approximation rates. In sections 3 and 5 the attention is DPF, while in section 4 there is no softmax and quantization is used. I don't think this is a major problem, but it should be emphasised (perhaps by extending remark 2.2) that you never consider the transformer with all the bells and whistles.
- I understand that the dimension of the embeddings grows with $Md$. This is not mentioned in the main text, nor commented on in the supplement. How does this compare with previous work?
- Also, you mention that the number of heads needed grows at least polynomially with the $T_i$'s. I understand that this is due to the particular choice of RPE. Would other types of PE give a better dependency in the $T_i$'s ? How does the current dependency compare with previous works?
- Paragraph l. 274 to l. 277 is unclear. When do you use this alternative in the rest of the paper?
- Typo in l. 281
- l. 282, I don't understand the notation for the lower bound on $m$.
Questions
- Please see some questions in the Weaknesses part.
- What do you mean by rate $n$ in all the theorems ? Is there an optimal choice for $n$ ?
- What is the main reason why you did not consider the SoftMax in section 4 ?
- How does $C(n)$ behaves with $n$ ?
- Could you approximate the model with specific precision with another Transformer which does not rely on specific precision ?
- Overall, the spirit of the approximation in the paper is always to form augmented tokens $(x_{t}, x_{t-t_1}, \dots x_{t-t_M})$ using attention and to apply the MLP on top of it. Do you think this is the "optimal" way ? And if so, what are the reasons behind it ?
Limitations
Yes, the authors adequately addressed the limitations of their work.