atlas

Research map / Large language models / Language, safety and interpretability

Earley-Driven Dynamic Pruning for Efficient Structured Decoding

ICML 2025 · Large language models › Language, safety and interpretability · approach: Parallel and early-exit decoding · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes ZapFormat, a dependency-graph-based dynamic pruning of Earley states plus a state cache, implemented in the Formatron constrained decoding engine, reporting up to ~2x throughput gains over XGrammar, Outlines, and lm-format-enforcer on JSON, JSON Schema, and GeoQuery tasks.

Problem

Constrained decoding with context-free grammars via Earley parsing accumulates dead or redundant parser states at every decoding step, which increases memory use and slows LLM structured generation.

Approach

Track dependencies among Earley items in a dependency graph and prune items not reachable from the last Earley set, combined with an Earley state cache, plus token mask caching, rejection prefixes and grammar transformation in one engine.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Formatron instead of XGrammarGemma-2-9B · Geoquerythroughput (tokens/s): 616.66 -> 12174.68Helped
Use Formatron instead of XGrammarGemma-2-9B · JSON Grammarthroughput (tokens/s): 10245.04 -> 8668.69Hurt
Use Formatron instead of XGrammarMistral-7B · JSON Grammarthroughput (tokens/s): 15273.72 -> 12046.54Hurt
Add dynamic pruning (ablation)Formatron · JSON Schema, 3 runs (Gemma-2-9B)throughput (tokens/s): 6981.35 -> 10609.08Helped
Add dynamic pruning (ablation)Formatron · JSON Schema, 3 runs (Llama-3-8B)throughput (tokens/s): 6269.24 -> 10271.73Helped
Add dynamic pruning (ablation)Formatron · JSON Schema, 3 runs (Mistral-7B)throughput (tokens/s): 9727.00 -> 13522.77Helped
Add dynamic pruning (ablation)Formatron · JSON Schema, 3 runs (Qwen2.5-7B)throughput (tokens/s): 8635.20 -> 10537.26Helped
Add caching alongside pruning (ablation)Formatron · JSON Schema, 3 runs (Gemma-2-9B)throughput (tokens/s): 3595.48 -> 10609.08Helped
Add caching alongside pruning (ablation)Formatron · JSON Schema, 3 runs (Llama-3-8B)throughput (tokens/s): 3464.36 -> 10271.73Helped
Add caching alongside pruning (ablation)Formatron · JSON Schema, 3 runs (Mistral-7B)throughput (tokens/s): 8845.90 -> 13522.77Helped
Add caching alongside pruning (ablation)Formatron · JSON Schema, 3 runs (Qwen2.5-7B)throughput (tokens/s): 4189.57 -> 10537.26Helped
Add dynamic pruning (ablation)Formatron · Constrained decoding (Llama-3-8B)maximum memory usage (MB): 1655.48 -> 1635.92Helped

Surprising findings

Limitations

Experimental setup

Datasets: Geoquery JSON Schema examples JSON grammar examples

Benchmarks: Geoquery JSON Schema generation JSON grammar generation

Metrics: throughput (tokens/s) maximum memory usage (MB) accuracy

Baselines: lm-format-enforcer Outlines XGrammar

Builds on: Earley algorithm XGrammar lm-format-enforcer Outlines

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy