Markov Constraint as Large Language Model Surrogate
Alexandre Bonlarron, Jean-Charles R\'egin

TL;DR
This paper introduces NgramMarkov, a novel Markov constraint variant that leverages large language models to improve text generation efficiency and quality in constraint programming, enabling larger corpora and lower n-gram sizes.
Contribution
It proposes a new Markov constraint that integrates LLM probabilities, reducing candidate sentences and enhancing computational efficiency in text generation tasks.
Findings
Generated text aligns with LLM perplexity measures.
Significant reduction in candidate sentences and computation time.
Enabled use of 4-grams instead of 5-grams in a real-world problem.
Abstract
This paper presents NgramMarkov, a variant of the Markov constraints. It is dedicated to text generation in constraint programming (CP). It involves a set of n-grams (i.e., sequence of n words) associated with probabilities given by a large language model (LLM). It limits the product of the probabilities of the n-gram of a sentence. The propagator of this constraint can be seen as an extension of the ElementaryMarkov constraint propagator, incorporating the LLM distribution instead of the maximum likelihood estimation of n-grams. It uses a gliding threshold, i.e., it rejects n-grams whose local probabilities are too low, to guarantee balanced solutions. It can also be combined with a "look-ahead" approach to remove n-grams that are very unlikely to lead to acceptable sentences for a fixed-length horizon. This idea is based on the MDDMarkovProcess constraint propagator, but without…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques
MethodsSparse Evolutionary Training
