NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Cross-Dialect Generalization Without Retraining: Benchmarks and Evaluation of Schema-Derived Constrained Decoding for MLIR

Plawan Kumar Rath

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: LLM Reasoning, Memory & RAG › Chain-of-Thought Reasoning · Type: new method · Keywords: schema-derived constrained decoding, cross-dialect generalization, inference-time adaptation, compiler intermediate representation, code generation benchmarks

Areas: Code & Coding Agents › Code Generation and Optimization › Code Generation; Evaluation & Benchmarks › Language Model and Agent Benchmarks › Code Generation Benchmarks

Summary

We introduce a schema-derived constrained decoding approach that leverages dialect specifications to enable cross-dialect generalization without retraining, and release a suite of benchmarks for evaluation.

Explained to a 5-year-old

We have a smart robot that reads sentences and tries to write code for a special language used by computer programs. This robot can learn to write code for many different versions of the language without having to be taught each version separately. It uses a set of rules that are automatically made from the language’s own instructions, so it only needs to follow those rules while writing. This helps the robot write correct code faster and with less effort.

Explained to a 5-year-old, longer

Imagine you have a big book of instructions that tells you how to build different kinds of LEGO models. Each model has its own rules about how pieces can fit together. Instead of learning every single rule for each model, you can make a general rulebook that captures the common ideas, like how pieces can be connected and what shapes are allowed. You then use this rulebook when you try to build a new model, checking each step against the rules. This way, you can build many different models without having to memorize each one’s unique details. The paper does something similar for computer code: it creates a rule system from the language’s own definitions, uses that rule system while the robot writes code, and can apply it to many different dialects of the language without retraining the robot.

For a technical reader

The paper proposes a constraint-based decoding pipeline that extracts dialect specifications and enforces them at inference time. By constructing a grammar, type lattice, and SSA validator, the system guides the language model to produce syntactically and semantically valid code without any fine-tuning. Empirical evaluation on four benchmarks shows that a small model can match or exceed the performance of much larger models while being significantly faster, demonstrating the viability of inference-time adaptation for compiler dialects.

Problem

Adapting large language models to new dialects of a compiler intermediate representation via fine-tuning does not scale because each dialect requires its own model. The paper asks whether inference-time priors derived from each dialect’s operation specifications can replace gradient-based adaptation.

Method

The approach builds a three-layer constraint stack derived from each dialect’s operation definition specifications: a context-free grammar over operation signatures, type-domain splits from an extracted type lattice, and an SSA-scope validator that performs rejection sampling. This stack is applied during decoding to enforce dialect constraints without any model fine-tuning.

Results

On dialects where verifier semantics are dominated by structural constraints, the approach lets a 1.7B-parameter model achieve 80.0% verify-valid on the Linalg benchmark, outperforming larger code models by 21-44 pp while running 8-25× faster. On dialects where constraints depend on attribute values, the approach matches or exceeds baseline performance.

Contributions

We release four benchmark suites covering three dialects, a reusable schema-derived constraint stack that requires no per-dialect code changes, and empirical results showing that inference-time priors can replace fine-tuning for many dialects.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction