acceptodds
Under review as a conference paper at ICLR 2027

Learning Error Patterns of Language Models

Abstract

When generating outputs for domains with specific validity constraints (e.g., a program should compile), LLMs often fail in a small number of focused ways: for example, by using Python function names when generating TypeScript. We observe that these error patterns can be represented using a small number of constraints that can be learned in practice. We propose prefix filters, which are per-domain-and-LLM symbolic functions, as objects to capture the error patterns, Palla as an algorithm to learn prefix filters efficiently in practice, and implement Palla. Prefix filters learned by Palla i) help us quantitatively analyze the error patterns of LLMs, and ii) can be used to constrain the outputs of a model via constrained sampling algorithms. For example, Palla learns 132 filters for Qwen2.5-1.5B on TypeScript generation, boosting compile rates by over 60% and allowing Qwen2.5-1.5B to achieve similar performance to Llama3.1-8B unconstrained.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.