[2510.02524] Unraveling Syntax: How Language Models Learn Context-Free Grammars

[2510.02524] Unraveling Syntax: How Language Models Learn Context-Free Grammars

arXiv - Machine Learning 4 min read

About this article

Abstract page for arXiv paper 2510.02524: Unraveling Syntax: How Language Models Learn Context-Free Grammars

Computer Science > Computation and Language arXiv:2510.02524 (cs) [Submitted on 2 Oct 2025 (v1), last revised 27 Feb 2026 (this version, v2)] Title:Unraveling Syntax: How Language Models Learn Context-Free Grammars Authors:Laura Ying Schulz, Daniel Mitropolsky, Tomaso Poggio View a PDF of the paper titled Unraveling Syntax: How Language Models Learn Context-Free Grammars, by Laura Ying Schulz and 2 other authors View PDF HTML (experimental) Abstract: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). In this work, we extend prior work on neural language modeling of CFGs in a novel direction: how language modeling behaves with respect to CFG substructure, namely "subgrammars". We first define subgrammars, and prove a set of fundamental theorems regarding language modeling and subgrammars. We show that language modeling loss (or equivalently the Kullback-Leibler divergence) recurses linearly over its top-level subgrammars; applied recursively, the loss decomposes into losses for "irreducible" subgrammars. We also prove that the constant in this linear recurrence is a function of the expected recursion, a notion we introduce. We show that under additional assumptions, parametrized models learn subgrammars in parallel. Empirically, we confirm that small transformers learn subgrammars in paral...

Originally published on March 02, 2026. Curated by AI News.

Related Articles

Llms

Combining the robot operating system with LLMs for natural-language control

Over the past few decades, robotics researchers have developed a wide range of increasingly advanced robots that can autonomously complet...

Reddit - Artificial Intelligence · 1 min ·
Llms

Which LLM is the best for writing a scientific paper?

I'll need to write a scientifc research paper for university. We're allowed and encouraged to use AI for our work. Be it for language or ...

Reddit - Artificial Intelligence · 1 min ·
Llms

Anthropic is training Claude to recognize when its own tools are trying to manipulate it

One thing from Claude Code's source that I think is underappreciated. There's an explicit instruction in the system prompt: if the AI sus...

Reddit - Artificial Intelligence · 1 min ·
Llms

The Claude Code leak accidentally published the first complete blueprint for production AI agents. Here's what it tells us about where this is all going.

Most coverage of the Claude Code leak focuses on the drama or the hidden features. But the bigger story is that this is the first time we...

Reddit - Artificial Intelligence · 1 min ·
More in Llms: This Week Guide Trending

No comments

No comments yet. Be the first to comment!

Stay updated with AI News

Get the latest news, tools, and insights delivered to your inbox.

Daily or weekly digest • Unsubscribe anytime