atlas

Research map / Architectures and efficiency / Attention and transformers

Logical Languages Accepted by Transformer Encoders with Hard Attention

ICLR 2024 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that unique hard attention transformer encoders (UHAT) recognize all FO(Mon) languages (hence regular AC0 languages) but not all AC0 languages, and that average hard attention transformers (AHAT) recognize LTL(C,+) languages including majority and parity.

Problem

Which formal languages can transformer encoders with hard attention recognize, relative to circuit complexity classes AC0 and TC0 and logical characterizations?

Approach

Proves UHAT encoders accept all languages definable in FO with arbitrary unary numerical predicates by routing through Kamp's theorem and LTL(Mon) with position-wise induction; extends AHAT to LTL with counting terms and linear inequalities, which captures majority, parity, and permutation closures.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use UHAT to recognize languages definable in FO(Mon)UHAT · FO(Mon)-definable languageslanguage recognitionHelped
Use UHAT to recognize approximate majorityUHAT · Approximate majoritylanguage recognitionHurt
Replace unique hard attention with average hard attentionTransformer encoder · LTL(C,+)-definable languagesrecognition capabilityHelped
Use UHAT to recognize regular languages in AC^0UHAT · Regular languages in AC^0language recognitionHelped
Use AHAT to recognize permutation closures of regular languagesAHAT · Permutation closure of regular languageslanguage recognitionHelped
Use AHAT to recognize permutation-closed languages over a binary alphabetAHAT · Permutation-closed languages over a binary alphabetlanguage recognitionHelped
Use AHAT to recognize parityAHAT · Paritylanguage recognitionHelped

Surprising findings

Limitations

Experimental setup

Builds on: Kamp's theorem Parikh's theorem average hard attention transformers

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy