Counting and Algorithmic Generalization with Transformers

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Ouellette, Simon, Pfister, Rolf, Jud, Hansueli
Format: Preprint
Veröffentlicht: 2023
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911756651069440
author Ouellette, Simon
Pfister, Rolf
Jud, Hansueli
author_facet Ouellette, Simon
Pfister, Rolf
Jud, Hansueli
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2310_08661
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Counting and Algorithmic Generalization with Transformers
Ouellette, Simon
Pfister, Rolf
Jud, Hansueli
Machine Learning
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.
title Counting and Algorithmic Generalization with Transformers
topic Machine Learning
url https://arxiv.org/abs/2310.08661