atlas

Research map / Probabilistic and scientific modeling / Variational and generative sampling

Principled Gradient-Based MCMC for Conditional Sampling of Text

ICML 2024 · Probabilistic and scientific modeling › Variational and generative sampling · approach: Posterior sampling with diffusion guidance

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 faithful gradient-based MCMC samplers (p-NCG Langevin-style, Gibbs-with-Langevin, and a hybrid) for sampling text from energy-based LMs with soft constraints, and shows prior gradient-based text samplers (COLD, MUCOLA, SVS) are unfaithful.

Problem

Sampling discrete text from energy-based models defined by pretrained language models with soft constraints; existing gradient-based MCMC text samplers do not converge to the intended target distribution.

Approach

Construct discrete gradient-informed proposals (ℓp-norm constrained gradient proposal, and a Gibbs-style single-position variant) whose transition probabilities are computable in closed form so they can be corrected with Metropolis-Hastings, yielding samplers with the correct stationary distribution; also a hybrid that switches from p-NCG to GwL.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use p-NCG instead of SVSGPT-2-small fine-tuned on E2E · Topic controlSuccess: 0.92 ± 0.05 -> 0.96 ± 0.03Helped
Use p-NCG instead of SVSGPT-2-small fine-tuned on E2E · Topic controlPPL: 13.9 ± 2.04 -> 6.82 ± 0.47Helped
Add GwL after p-NCG (ablation)p-NCG · Topic controlPPL: 6.82 ± 0.47 -> 5.17 ± 0.38Helped
Add GwL after p-NCG (ablation)p-NCG · Topic controlSuccess: 0.96 ± 0.03 -> 0.99 ± 0.02Helped
Use p-NCG instead of SVSGPT-2-large · Sentiment controlSuccess: 0.84 ± 0.06 -> 0.92 ± 0.05Helped
Use p-NCG instead of SVSGPT-2-large · Sentiment controlPPL: 32.73 ± 4.09 -> 39.03 ± 5.67Hurt
Add GwL after p-NCG (ablation)p-NCG · Sentiment controlPPL: 39.03 ± 5.67 -> 23.61 ± 2.09Helped
Add GwL after p-NCG (ablation)p-NCG · Sentiment controlSuccess: 0.92 ± 0.05 -> 0.96 ± 0.04Helped
Add GwL after p-NCG (ablation)p-NCG · Position-constrained generation (COLLIE)PPL: 71.46 ± 17.41 -> 55.06 ± 9.53Helped
Use lower p values for the p-norm constraint (tested from 1.0 to 2.0) (ablation)p-NCG · Unconditional sampling from GPT-2-largeperformanceHelped
Use random scan instead of systematic scan (ablation)GwL · Text generation experimentsperformanceHelped

Surprising findings

Limitations

Experimental setup

Datasets: E2E SST2 COLLIE (Gutenberg subset, filtered to 43 constraint examples) Project Gutenberg

Benchmarks: E2E topic control SST2 sentiment control COLLIE positional constraints unconditional GPT-2 sampling

Metrics: success rate perplexity Distinct-n total variation distance energy

Baselines: COLD MUCOLA SVS SVS-LANGEVIN FUDGE GPT2

Builds on: MUCOLA COLD SVS Norm Constrained Gradient sampler D-MALA

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