Mitigating Bias in Locally Constrained Decoding via Tractable Proposals

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Dang, Meihua, Song, Linxin, Zhang, Honghua, Zhao, Jieyu, Broeck, Guy Van den, Ermon, Stefano
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916072521728000
author Dang, Meihua
Song, Linxin
Zhang, Honghua
Zhao, Jieyu
Broeck, Guy Van den
Ermon, Stefano
author_facet Dang, Meihua
Song, Linxin
Zhang, Honghua
Zhao, Jieyu
Broeck, Guy Van den
Ermon, Stefano
contents Generations from large language models often fail to conform to desired constraints such as JSON schema. Existing locally constrained decoding (LCD) approaches enforce constraints by myopically masking out next tokens, resulting in biased sampling and degradation in performance. Recent work uses sequential Monte Carlo (SMC) methods to mitigate such biases, but designing effective proposal distributions or potential functions remains a key challenge. In this work, we propose a generic approach to construct proposals and potentials for SMC sampling from $p_{\mathrm{lm}}( \cdot \mid \mathrm{constraint})$. First, we show that constraints specified as finite automata can be tensorized for efficient execution on GPUs, which we use to construct globally constrained decoding (GCD) proposals. In addition, leveraging the fact that tensorized finite automata share the same circuit structure as hidden Markov models, we circuit-multiply them to obtain the probabilistic GCD (P-GCD) proposals encoding both logical and probabilistic information about the target distributions. We evaluate (P-)GCD on the tasks of function calling, keyword-based generation, and SQL generation. Experiments show that under the same SMC sampling setup, compared to LCD proposals, (P-)GCD converges faster to the target distribution with significantly fewer particles.
format Preprint
id arxiv_https___arxiv_org_abs_2606_01926
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Mitigating Bias in Locally Constrained Decoding via Tractable Proposals
Dang, Meihua
Song, Linxin
Zhang, Honghua
Zhao, Jieyu
Broeck, Guy Van den
Ermon, Stefano
Computation and Language
Generations from large language models often fail to conform to desired constraints such as JSON schema. Existing locally constrained decoding (LCD) approaches enforce constraints by myopically masking out next tokens, resulting in biased sampling and degradation in performance. Recent work uses sequential Monte Carlo (SMC) methods to mitigate such biases, but designing effective proposal distributions or potential functions remains a key challenge. In this work, we propose a generic approach to construct proposals and potentials for SMC sampling from $p_{\mathrm{lm}}( \cdot \mid \mathrm{constraint})$. First, we show that constraints specified as finite automata can be tensorized for efficient execution on GPUs, which we use to construct globally constrained decoding (GCD) proposals. In addition, leveraging the fact that tensorized finite automata share the same circuit structure as hidden Markov models, we circuit-multiply them to obtain the probabilistic GCD (P-GCD) proposals encoding both logical and probabilistic information about the target distributions. We evaluate (P-)GCD on the tasks of function calling, keyword-based generation, and SQL generation. Experiments show that under the same SMC sampling setup, compared to LCD proposals, (P-)GCD converges faster to the target distribution with significantly fewer particles.
title Mitigating Bias in Locally Constrained Decoding via Tractable Proposals
topic Computation and Language
url https://arxiv.org/abs/2606.01926