Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlo

要約

幅広いLMアプリケーションでは、構文またはセマンティックの制約に準拠するテキストを生成する必要があります。
このような制約を課すことは、確率的条件付けとして自然に枠組みすることができますが、結果として生成される分布からの正確な生成 – LMの基本分布とは大幅に異なる可能性がありますが、一般に手に負えないものです。
この作業では、シーケンシャルモンテカルロ(SMC)に基づいて、制御されたLM生成のアーキテクチャを開発します。
SMCフレームワークにより、推論時にドメインおよび問題固有の制約を柔軟に組み込み、世代中に新しい情報に照らして計算リソースを効率的に再割り当てすることができます。
データサイエンス、テキスト間、目標推論、分子合成のPythonコード生成の4つの挑戦的なドメインの多くの代替案とアブレーションと比較することにより、オーバーヘッドがほとんどないため、私たちのアプローチにより、小さなオープンソース言語モデルが8倍以上のモデルを上回ることができることを示しています。
確率論的な視点をサポートするために、これらのパフォーマンスの改善は、後部分布のより良い近似によって促進されることを示します。
私たちのシステムは、Lew et alの枠組みに基づいています。
(2023)言語モデルの確率的プログラミング言語と統合し、ユーザーがSMCをさまざまな制御された生成問題に適用するためのシンプルでプログラム可能な方法を提供します。

要約(オリジナル)

A wide range of LM applications require generating text that conforms to syntactic or semantic constraints. Imposing such constraints can be naturally framed as probabilistic conditioning, but exact generation from the resulting distribution — which can differ substantially from the LM’s base distribution — is generally intractable. In this work, we develop an architecture for controlled LM generation based on sequential Monte Carlo (SMC). Our SMC framework allows us to flexibly incorporate domain- and problem-specific constraints at inference time, and efficiently reallocate computational resources in light of new information during the course of generation. By comparing to a number of alternatives and ablations on four challenging domains — Python code generation for data science, text-to-SQL, goal inference, and molecule synthesis — we demonstrate that, with little overhead, our approach allows small open-source language models to outperform models over 8x larger, as well as closed-source, fine-tuned ones. In support of the probabilistic perspective, we show that these performance improvements are driven by better approximation to the posterior distribution. Our system builds on the framework of Lew et al. (2023) and integrates with its language model probabilistic programming language, giving users a simple, programmable way to apply SMC to a broad variety of controlled generation problems.

arxiv情報

著者 João Loula,Benjamin LeBrun,Li Du,Ben Lipkin,Clemente Pasti,Gabriel Grand,Tianyu Liu,Yahya Emara,Marjorie Freedman,Jason Eisner,Ryan Cotterel,Vikash Mansinghka,Alexander K. Lew,Tim Vieira,Timothy J. O’Donnell
発行日 2025-04-17 17:49:40+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.LG パーマリンク