Skip to main navigation Skip to search Skip to main content

Copy Automata as a Diagnostic Tool for Pattern-Copying in Transformers: Hierarchy, Bounds, and the Limits of Hard-Attention Theory

  • Yanming Cheng
  • , Di Zhang*
  • *Corresponding author for this work
  • Xi'an Jiaotong-Liverpool University

Research output: Chapter in Book or Report/Conference proceeding › Conference Proceeding › peer-review

Abstract

We study pattern copying in Transformers through Copy Automata, deterministic finite automata equipped with a copy output function, used as a diagnostic abstraction rather than a predictive theory We establish three results: an Encoding Theorem for bounded-precision Transformers, a Hard-Attention Separation Theorem giving task-specific head-count requirements, and a counting bound for level-k identification Empirically, small-scale and GPT-2-scale experiments show that Level-3 context-dependent bijections remain the hardest case Five probes, covering gradients, non-gradient solvers, structured mappings, capacity scaling, and induction-score recovery, suggest that Level-3 failure is better explained by a combination of soft-attention capacity mismatch and optimisation difficulty than by raw hard-attention capacity alone We summarise this gap with a soft-attention capacity-discount heuristic The main contribution is a diagnostic account of where hard-attention theory breaks down for softmax Transformers.

Original languageEnglish
Title of host publicationAdvanced Intelligent Computing Technology and Applications - 22nd International Conference on Intelligent Computing, ICIC 2026, Proceedings
EditorsDe-Shuang Huang, Qinhu Zhang, Yijie Pan, Chuanlei Zhang, Wei Chen, Bo Li, Wenzheng Bao, Prashan Premaratne
PublisherSpringer Science and Business Media Deutschland GmbH
Pages251-263
Number of pages13
ISBN (Print)9789819234097
DOIs
Publication statusPublished - 2027
Externally publishedYes
Event22nd International Conference on Intelligent Computing, ICIC 2026 - Toronto, Canada
Duration: 22 Jul 2026 → 26 Jul 2026

Publication series

NameLecture Notes in Computer Science
Volume16650 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference22nd International Conference on Intelligent Computing, ICIC 2026
Country/TerritoryCanada
CityToronto
Period22/07/26 → 26/07/26

Keywords

  • Copy Automata
  • Hard Attention
  • In-context Learning
  • Induction Heads
  • Mechanistic Interpretability
  • Transformers

Cite this