HackerPapers

arXiv:2310.08661cs.LG

Counting and Algorithmic Generalization with Transformers

Simon Ouellette, Rolf Pfister, Hansueli Jud

HN submission. Found in a submission link or body. Submitters do not count as commenters in the main ranking; a submission is not an endorsement.

Abstract

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.

arXiv comments
Applied AAAI 2024 reviewer comments. We clarified notation in the main algorithm pseudo-code (alg. 1). Removed superfluous experiments on Universal Transformers which did not yield interesting results and added confusion to the main insights of the paper. The paper is now more concise and straight to the point. Clarified our main contributions
Journal reference
DOI
Subjects
cs.LGMachine Learning

On Hacker News

No comments linking this paper were found in the collected sources. Found in 1 HN submission from Oct 2023 to Oct 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments0 threads

No comments linking this paper were found in the collected sources. Open submission discussions.

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.