Approximation Bounds for Transformer Networks with Application to Regression
Abstract
Lay Summary
Transformers are the core technology behind many modern AI systems that process text, speech, and other sequential data. Yet despite their practical success, we still lack a precise mathematical understanding of what sequence-to-sequence rules they can represent and learn reliably. This paper develops theoretical guarantees for standard Transformer networks. We show how many model parameters are sufficient for a Transformer to accurately approximate broad classes of smooth sequence-to-sequence functions, including guarantees for worst-case prediction error. We also analyze learning from dependent sequential observations, where nearby data points may influence each other, as commonly occurs in language, time series, and sensor data. Our results help explain why the attention mechanism in Transformers is powerful from a theoretical perspective. More broadly, they provide a step toward understanding when Transformer-based methods can be expected to learn reliably from complex sequential data.