arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.10269cs.CLcs.AIcs.LG
收藏

Markov约束作为大语言模型代理

Markov Constraint as Large Language Model Surrogate

Inria(法国国家信息与自动化研究所);CNRS(法国国家科学研究中心)

Alexandre Bonlarron, Jean-Charles Régin

AI总结:

本文提出用于约束编程文本生成的NgramMarkov约束,以LLM概率驱动n元组筛选与前瞻剪枝,减少候选句并提升求解效率。

摘要:

本文提出NgramMarkov,它是Markov约束的一种变体,专门用于约束编程(CP)中的文本生成。该约束涉及一组n元组(即由n个词组成的序列),并关联由大语言模型(LLM)给出的概率。它限制一个句子中各n元组概率的乘积。该约束的传播器可视为ElementaryMarkov约束传播器的扩展,纳入LLM分布,而不是使用n元组的最大似然估计。它采用滑动阈值,即拒绝局部概率过低的n元组,以保证解的均衡性。它还可以与“前瞻”方法相结合,在固定长度视野内移除那些极不可能产生可接受句子的n元组。这一思想基于MDDMarkovProcess约束传播器,但没有显式使用MDD(多值决策图)。实验结果表明,生成文本所获得的评价与LLM困惑度函数的评价方式相似。使用这一新约束显著减少了所产生候选句子的数量,改善了计算时间,并允许使用更大的语料库或更小的n元组。一个实际问题首次通过使用4元组而非5元组得到解决。

英文摘要:

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 explicitly using an MDD (Multi-Valued Decision Diagram). The experimental results show that the generated text is valued in a similar way to the LLM perplexity function. Using this new constraint dramatically reduces the number of candidate sentences produced, improves computation times, and allows larger corpora or smaller n-grams to be used. A real-world problem has been solved for the first time using 4-grams instead of 5-grams.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑