atlas

Research map / Large language models / Agents, code and math

Adaptable Logical Control for Large Language Models

NeurIPS 2024 · Large language models › Agents, code and math · approach: LLMs for optimization and heuristics · 2 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.

Ctrl-G distills an HMM from an LLM and conditions generation on logical constraints expressed as DFAs, enabling guaranteed constraint satisfaction with a frozen LLM and HMM.

Problem

Controlling LLM generation at inference time to reliably satisfy logical constraints (keyphrases, length, order) is intractable because the probability of future constraint satisfaction cannot be computed efficiently.

Approach

Distill an HMM as a white-box approximation of the LLM, represent constraints as DFAs, and compute the probability of DFA acceptance under the HMM via a dynamic-programming recurrence so that next-token sampling is reweighted by p_hmm(alpha | x_t, x_<t); the LLM and HMM stay frozen once trained and constraints can change without retraining.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Ctrl-G instead of GeLaToGPT2-large on CommonGen · CommonGen devBLEU-4: 30.3 -> 32.1Helped
Use Ctrl-G instead of GeLaToGPT2-large on CommonGen · CommonGen testBLEU-4: 29.0 -> 31.5Helped
Use Ctrl-G instead of ILMGPT2-small on text infilling · Text infilling, 40% maskingBLEU-4: +3.4Helped
Use Ctrl-G instead of ILMGPT2-small on text infilling · Text infilling, 13% maskingROUGE-L: -$0.3Hurt
Use Ctrl-G instead of GPT4TULU2-7B on interactive text editing · Continuation, averageOverall satisfaction: 56% -> 92%Helped
Use Ctrl-G instead of GPT4TULU2-7B on interactive text editing · Insertion, averageOverall satisfaction: 24% -> 79%Helped
Constrain chain-of-thought to use the problem numbersTULU2-7B · GSM, 293 examples where model omitted numbersAccuracy: 14.6% -> 28.3%Helped
Use Ctrl-G rather than unconstrained TULU2-7BTULU2-7B on interactive text editing · Continuation and insertion, constrained settingsConstraint success: GPT4: 57% / 36%; Ctrl-G: 100% / 100%Helped

Surprising findings

Limitations

Experimental setup

Datasets: CommonGen ROCStories text infilling benchmark CoAuthor WritingPrompt GSM8K

Benchmarks: CommonGen CommonGen+ ROCStories text infilling CoAuthor-based interactive text editing GSM

Metrics: BLEU-4 ROUGE-L CIDEr SPICE constraint satisfaction rate human quality score overall satisfaction rate accuracy

Baselines: GPT3.5 GPT4 FUDGE NADO NeuroLogic A*esque GeLaTo ILM TULU2 instruction-tuned

Builds on: GeLaTo NeuroLogic decoding Knuth-Morris-Pratt Aho-Corasick

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