English
Related papers

Related papers: Context-Free Recognition with Transformers

200 papers

In-context learning (ICL) of large language models has proven to be a surprisingly effective method of learning a new task from only a few demonstrative examples. In this paper, we study the efficacy of ICL from the viewpoint of statistical…

Machine Learning · Statistics 2024-10-03 Juno Kim , Tai Nakamaki , Taiji Suzuki

Causal transformer language models (LMs), such as GPT-3, typically require some form of positional encoding, such as positional embeddings. However, we show that LMs without any explicit positional encoding are still competitive with…

Computation and Language · Computer Science 2022-12-07 Adi Haviv , Ori Ram , Ofir Press , Peter Izsak , Omer Levy

Instead of pretraining multilingual language models from scratch, a more efficient method is to adapt existing pretrained language models (PLMs) to new languages via vocabulary extension and continued pretraining. However, this method…

Computation and Language · Computer Science 2024-03-26 Yihong Liu , Peiqin Lin , Mingyang Wang , Hinrich Schütze

Recent theoretical results show transformers cannot express sequential reasoning problems over long inputs, intuitively because their computational depth is bounded. However, prior work treats the depth as a constant, leaving it unclear to…

Machine Learning · Computer Science 2025-11-07 William Merrill , Ashish Sabharwal

Transformer-based Large Language Models (LLMs) have demonstrated powerful in-context learning capabilities. However, their predictions can be disrupted by factually correct context, a phenomenon known as context hijacking, revealing a…

Computation and Language · Computer Science 2025-02-24 Tianle Li , Chenyang Zhang , Xingwu Chen , Yuan Cao , Difan Zou

In-context learning refers to the ability of a model to condition on a prompt sequence consisting of in-context examples (input-output pairs corresponding to some task) along with a new query input, and generate the corresponding output.…

Computation and Language · Computer Science 2023-08-15 Shivam Garg , Dimitris Tsipras , Percy Liang , Gregory Valiant

In 1975, Valiant showed that Boolean matrix multiplication can be used for parsing context-free grammars (CFGs), yielding the asympotically fastest (although not practical) CFG parsing algorithm known. We prove a dual result: any CFG parser…

Computation and Language · Computer Science 2007-05-23 Lillian Lee

Transformers have become the dominant architecture for sequence modeling tasks such as natural language processing or audio processing, and they are now even considered for tasks that are not naturally sequential such as image…

Machine Learning · Computer Science 2024-03-05 Jorg Bornschein , Yazhe Li , Amal Rannen-Triki

Transformers are widely used to extract semantic meanings from input tokens, yet they usually operate as black-box models. In this paper, we present a simple yet informative decomposition of hidden states (or embeddings) of trained…

Machine Learning · Computer Science 2024-02-06 Jiajun Song , Yiqiao Zhong

Large language models (LLMs) exhibit a strong capacity for in-context learning: Given labeled examples, they can generate good predictions without parameter updates. However, many interactive settings go beyond static prediction to online…

Machine Learning · Computer Science 2026-05-12 Emile Anand , Abdullah Ateyeh , Xinyuan Cao , Max Dabagia

Transformer layers, which use an alternating pattern of multi-head attention and multi-layer perceptron (MLP) layers, provide an effective tool for a variety of machine learning problems. As the transformer layers use residual connections…

Machine Learning · Computer Science 2022-12-13 Yaofeng Desmond Zhong , Tongtao Zhang , Amit Chakraborty , Biswadip Dey

Classifying formal languages according to the expressiveness of grammars able to generate them is a fundamental problem in computational linguistics and, therefore, in the theory of computation. Furthermore, such kind of analysis can give…

Formal Languages and Automata Theory · Computer Science 2024-05-16 Marco B. Caminati

Recent years have witnessed increasing interests in prompt-based learning in which models can be trained on only a few annotated instances, making them suitable in low-resource settings. When using prompt-based learning for text…

Computation and Language · Computer Science 2023-05-11 Hongjing Li , Hanqi Yan , Yanran Li , Li Qian , Yulan He , Lin Gui

Traditional recurrent neural networks (RNNs) have a fixed, finite number of memory cells. In theory (assuming bounded range and precision), this limits their formal language recognition power to regular languages, and in practice, RNNs have…

Computation and Language · Computer Science 2023-03-14 Brian DuSell , David Chiang

Attention-based neural networks such as transformers have demonstrated a remarkable ability to exhibit in-context learning (ICL): Given a short prompt sequence of tokens from an unseen task, they can formulate relevant per-token and…

Machine Learning · Statistics 2023-10-23 Ruiqi Zhang , Spencer Frei , Peter L. Bartlett

Transformer-based models have transformed the landscape of natural language processing (NLP) and are increasingly applied to computer vision tasks with remarkable success. These models, renowned for their ability to capture long-range…

Computer Vision and Pattern Recognition · Computer Science 2024-08-28 Gracile Astlin Pereira , Muhammad Hussain

Natural languages are believed to be (mildly) context-sensitive. Despite underpinning remarkably capable large language models, transformers are unable to model many context-free language tasks. In an attempt to address this limitation in…

Computation and Language · Computer Science 2024-05-15 Jiaoda Li , Jennifer C. White , Mrinmaya Sachan , Ryan Cotterell

While large models achieve impressive results, their learning dynamics are far from understood. Many domains of interest, such as natural language syntax, coding languages, arithmetic problems, are captured by context-free grammars (CFGs).…

Computation and Language · Computer Science 2026-03-02 Laura Ying Schulz , Daniel Mitropolsky , Tomaso Poggio

Despite significant progress in transformer interpretability, an understanding of the computational mechanisms of large language models (LLMs) remains a fundamental challenge. Many approaches interpret a network's hidden representations but…

Machine Learning · Computer Science 2025-10-14 James R. Golden

We investigate the in-context learning capabilities of transformers for the $d$-dimensional mixture of linear regression model, providing theoretical insights into their existence, generalization bounds, and training dynamics. Specifically,…

Machine Learning · Statistics 2025-02-11 Yanhao Jin , Krishnakumar Balasubramanian , Lifeng Lai