Response to reviewer
We appreciate you taking a second look. See our responses below:
1. Other examples of languages definable in Kₜ[#] but not FOC[+;MOD] include:
- $a^nb^nc^n$ (§3.2), a context-sensitive language which is also observed to be learnable by [Bhattamishra, 2020].
- All piecewise testable languages, like $\Sigma^\*a\Sigma^\*b\Sigma^\*c\Sigma^\*$ (§3.3).
- All strings with the letter $a$ in the second position and nowhere else.
- All valid email addresses (name@domain.com)
We make no claim of novelty in showing that Kₜ[#] and therefore transformers can recognize Dyck-1. The paper already cites [Bhattamishra et al, 2020] for showing that transformers recognize a language similar to Dyck-1, and we thank you for pointing out [Yao et al, 2021], which is a better reference.
Our focus here is not just on individual languages, but on the formalisms Kₜ[#] and C-RASP, which provide building blocks that can be combined to show that transformers recognize a whole class of languages. The fact that [Yao et al, 2021] shows that transformers can recognize Dyck-1 strengthens, rather than weakens, our claim that Kₜ[#] is a better characterization of transformers than FOC[+;MOD].
At present, we don't know how to define Dyck-2 in Kₜ[#], so this would be a good target for future work. But we note that [Yao et al, 2021]'s Theorem B.3 appears to use hard attention, and also relies on Lemma B.1, which implicitly uses a nonstandard variant of layer normalization that can apply only to a subset of vector components (cf. multi-pre-norm from [Merrill and Sabharwal, 2024]). As such, it may not be straightforward to apply their construction directly to standard transformers, which is the setting we are working in.
2. By "deeper," we mean the number of transformer blocks (where a block is self-attention layer followed by a feed-forward layer). Our construction simulates a Kₜ[#] formula that has modal depth $k$ (§3.3) by a transformer with $4k+1$ blocks. (We are unsure what you mean by $t$, but to be clear, the depth of the transformer does not depend on the input string length.)
This is in contrast to FOC[+;MOD], which [Chiang et al, 2023] show can be simulated by a transformer that only needs $2$ blocks. Since in practice it seems that deeper transformers are better for more complex applications, it seems to be a strength of Kₜ[#] that it translates into deeper transformers.
Let us know if you have more questions or concerns, and we would be glad to elaborate!
[Bhattamishra et al, 2020]: https://aclanthology.org/2020.emnlp-main.576
[Chiang et al, 2023]:
https://arxiv.org/abs/2301.10743
[Merrill and Sabharwal, 2024]: https://arxiv.org/pdf/2310.07923
[Yao et al, 2021]:
https://aclanthology.org/2021.acl-long.292/