Counting and Algorithmic Generalization with Transformers
This addresses a specific bottleneck in machine learning for tasks requiring counting, offering an incremental improvement for researchers working on algorithmic generalization.
The paper tackled the problem of algorithmic generalization in Transformers when counting is required, showing that standard architectural choices like layer normalization and softmax attention hinder out-of-distribution performance. By ablating these operations, they demonstrated that a modified Transformer achieves good algorithmic generalization on counting tasks with a lightweight architecture.
Algorithmic generalization in machine learning refers to the ability to learn the underlying algorithm that generates data in a way that generalizes out-of-distribution. This is generally considered a difficult task for most machine learning algorithms. Here, we analyze algorithmic generalization when counting is required, either implicitly or explicitly. We show that standard Transformers are based on architectural decisions that hinder out-of-distribution performance for such tasks. In particular, we discuss the consequences of using layer normalization and of normalizing the attention weights via softmax. With ablation of the problematic operations, we demonstrate that a modified transformer can exhibit a good algorithmic generalization performance on counting while using a very lightweight architecture.