1
Return

Transformers as Transducers

delete2025-02-28
delete0
delete
OA
AI
L
Lena Strobl *
D
Dana Angluin
D
David Chiang
J
Jonathan Rawski
A
Ashish Sabharwal
DOI:10.1162/tacl_a_00736delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
We study the sequence-to-sequence mapping capacity of transformers by relating them to finite transducers, and find that they can express surprisingly large classes of (total functional) transductions. We do so using variants of RASP, a programming language designed to help people think like transformers,as an intermediate representation. We extend the existing Boolean variant B-RASP to sequence-to-sequence transductions and show that it computes exactly the first-order rational transductions (such as string rotation). Then, we introduce two new extensions. B-RASP[pos] enables calculations on positions (such as copying the first half of a string) and contains all first-order regular transductions. S-RASP adds prefix sum, which enables additional arithmetic operations (such as squaring a string) and contains all first-order polyregular transductions. Finally, we show that masked average-hard attention transformers can simulate S-RASP.

Journal

T
Transactions of the Association for Computational Linguistics
IF:
6.9
Papers:
486
Citations:
5.7K

Organization

S
San Jose State University
Scholars:
1.3K
Papers: 1.0K
Citations: 15
A
allen inst ai
Scholars:
4
Papers: 3
Citations: 0
U
Univ Notre Dame
Scholars:
576
Papers: 324
Citations: 106
U
Umea University
Scholars:
1.4W
Papers: 1.4W
Citations: 134
Cited Papers

Cited Papers

Citing Papers

Citing Papers