Search arXiv⌕ Search

arXiv · 2610.30920

DConstrain: Compiling Context-Parameterized Transitions for Diffusion Language Model Constrained Decoding

Abstract

Diffusion language models (DLMs) decode multiple tokens in parallel, so individually valid tokens can be incompatible together under a schema. Exact joint inference over a grammar graph enforces compatibility, but it requires token-labeled successors across many hypothetical parser configurations. Encoding stacks and field histories in compiled states can cause exponential growth, which forces prior exact decoders to fix property orders and exclude valid outputs. We present DConstrain, which compiles schemas into context-parameterized transition programs. Cold compilation specializes token consumption to local grammar states while retaining context-dependent stack operations, environment guards, and caller-dependent deferred parsing symbolically. Tracking field histories as runtime values supports arbitrary property order without enumerating field subsets offline. At runtime, warm compilation binds reached configurations to these programs to construct exact successors, overlapping with the model forward pass because graph construction requires no model scores. Furthermore, token-effect grouping merges tokens with identical compiled effects before runtime contexts are bound, so groups are reused across stacks and environments even when concrete successors differ. Objective-specific score aggregation and token restoration provably preserve both the Viterbi optimum and the token-labeled path distribution of ungrouped inference. Across three benchmarks and two DLM families, DConstrain compiles 100% of BFCL schemas under arbitrary property orders, whereas an optimized finite-state baseline compiles only 71.30-85.81%. Under arbitrary property order, it reduces BFCL end-to-end decoding latency by 6.65-46.26 times with 100% schema validity and raises DiffusionGemma's BFCL accuracy from 37.27% under fixed order to 81.56%.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Shidong Cao, Jing Ma, Wenhao Chai, Yuchen Tian, Lun Du, Da Zheng. 2026-10-22. DConstrain: Compiling Context-Parameterized Transitions for Diffusion Language Model Constrained Decoding. https://arxiv.org/abs/2610.30920

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Working with AI: Measuring the Applicability of Generative AI to Occupations

With generative AI emerging as a general-purpose technology, understanding its economic effects is among society's most pressing questions. Earlier work on AI impact largely relied on predictions of AI capabilities or focused narrowly on individual firms. Drawing instead on real-world AI usage, we analyze a dataset of 200k anonymized conversations with Microsoft Bing Copilot to measure AI applicability to occupations. We use an LLM-based pipeline to classify the O*NET work activities assisted or performed by AI in each conversation. We find that the most common and successful AI-assisted work activities involve information work--the creation, processing, and communication of information. At the occupation level, we find widespread AI applicability cutting across sectors, as most occupations have information work components. Our methodology also allows us to predict which occupations are more likely to delegate tasks to AI and which are more likely to use AI to assist existing workflows. Finally, we see an increase in occupation-level AI applicability over our 9-month data period, driven primarily by people using AI for more varied tasks. AI applicability scores and component usage and success metrics are available at https://github.com/microsoft/working-with-ai.

cs.AI↗

Spatial disparities in simulated patrol detection: a reproducible generative-model audit across Baltimore and Chicago

Auditing predictive policing requires distinguishing recorded crime incidents, simulated patrol observations, and the demographic characteristics of places. We present a reproducible spatial simulation audit combining a generative adversarial network (GAN) for patrol allocation with a probabilistic detection model. Using frozen archives of 145,178 Baltimore records (2017-2019) and 234,882 Chicago records (2022), we rebuild geographic covariates from Census tract boundaries and American Community Survey data. We compare GAN allocation with empirical-location sampling and uniform-area deployment under alternative observation streams. Twenty random seeds per condition yield 560 trajectories, each covering February through December. Under detection-only training, mean detection-rate differences between Black-majority and White-majority areas range from -2.03 to 0.75 percentage points across city-years, while total coverage ranges from 1.78% to 7.50%. Paired comparisons with full-record reference trajectories assess observation feedback conditional on the recorded incident archives. In an experiment using a conditional tabular generative model for balanced synthetic replacement, geographic consistency requirements fail in 107 of 220 seed-month fits, leaving no complete annual synthetic-replacement trajectories. Simulated disparities vary with the observation process, allocation policy, training budget, and random seed. These results support reproducible comparisons of modeled scenarios but do not estimate individual racial disparities in police contact or the distribution of unrecorded crime. We recommend reporting absolute detection differences, coverage, synthesis feasibility, and simulation uncertainty alongside ratio-based fairness metrics.

cs.AI↗

Agents and Tokens: Multi-Agent Autonomous Reasoning over a Hydrodynamic Token Store

Large language models and the agents built on them are the most capable reasoning machines ever built, and science is beginning to put them to work. Atmospheric and oceanic sciences are starting to see agentic integration, but coastal hydrodynamics remains largely untouched by AI. Simply, agents cannot easily read its data products without saturating their context windows. A time frame from a coastal model can hold hundreds of megabytes, and if the archive's chunking does not suit the query, the agent will spend more time downloading and compacting than gaining insights. After all, the archives were designed for storage, not for the fast, on-the-fly access agents need. Speech and music once hit the same wall. A minute of audio is millions of numbers, yet today's audio models hold conversations and write music. They "learned" to do this by "listening" to tokens. Neural audio codecs turn waveforms into short sequences of discrete symbols that a model reads like words and decodes back into sound. Coastal water is a similar signal: dense, finely sampled, and repeatable. We are convinced it has an analogous compact native representation that preserves the salient physics. Tokens are that representation: small integers, light enough for an agent to sweep six months of a coastline in seconds. Agents can then do more than simple lookup-related tasks; they can form and test their hypotheses as they explore the tokenized representation efficiently. Herein, we build this framework, using vector quantized variational autoencoders to compress tide level, the non-tidal residual, and surface wind speed into 16x16 grids of tokens along the US Atlantic and Gulf coasts. Agents traverse and explore these grids (e.g., tracking, spatiotemporal trend analysis) considerably faster than raw archives in both on-prem and off-prem modalities, while correctly answering several types of under-specified queries.

cs.AI↗