Thompson Sampling via Fine-Tuning of LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Menet, Nicolas, Terzić, Aleksandar, Hersche, Michael, Krause, Andreas, Rahimi, Abbas
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915822611464192
author Menet, Nicolas
Terzić, Aleksandar
Hersche, Michael
Krause, Andreas
Rahimi, Abbas
author_facet Menet, Nicolas
Terzić, Aleksandar
Hersche, Michael
Krause, Andreas
Rahimi, Abbas
contents Bayesian optimization in large unstructured discrete spaces is often hindered by the computational cost of maximizing acquisition functions due to the absence of gradients. We propose a scalable alternative based on Thompson sampling that eliminates the need for acquisition function maximization by directly parameterizing the probability that a candidate yields the maximum reward. Our approach, Thompson Sampling via Fine-Tuning (ToSFiT) leverages the prior knowledge embedded in prompt-conditioned large language models, and incrementally adapts them toward the posterior. Theoretically, we derive a novel regret bound for a variational formulation of Thompson Sampling that matches the strong guarantees of its standard counterpart. Our analysis reveals the critical role of careful adaptation to the posterior probability of maximality -- a principle that underpins our ToSFiT algorithm. Empirically, we validate our method on three diverse tasks: FAQ response refinement, thermally stable protein search, and quantum circuit design. Within a collection of methods covering in-context Bayesian optimization, reinforcement learning, and evolutionary search, ToSFiT exhibits both state-of-the-art sample efficiency and computational efficiency.
format Preprint
id arxiv_https___arxiv_org_abs_2510_13328
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Thompson Sampling via Fine-Tuning of LLMs
Menet, Nicolas
Terzić, Aleksandar
Hersche, Michael
Krause, Andreas
Rahimi, Abbas
Machine Learning
Artificial Intelligence
Bayesian optimization in large unstructured discrete spaces is often hindered by the computational cost of maximizing acquisition functions due to the absence of gradients. We propose a scalable alternative based on Thompson sampling that eliminates the need for acquisition function maximization by directly parameterizing the probability that a candidate yields the maximum reward. Our approach, Thompson Sampling via Fine-Tuning (ToSFiT) leverages the prior knowledge embedded in prompt-conditioned large language models, and incrementally adapts them toward the posterior. Theoretically, we derive a novel regret bound for a variational formulation of Thompson Sampling that matches the strong guarantees of its standard counterpart. Our analysis reveals the critical role of careful adaptation to the posterior probability of maximality -- a principle that underpins our ToSFiT algorithm. Empirically, we validate our method on three diverse tasks: FAQ response refinement, thermally stable protein search, and quantum circuit design. Within a collection of methods covering in-context Bayesian optimization, reinforcement learning, and evolutionary search, ToSFiT exhibits both state-of-the-art sample efficiency and computational efficiency.
title Thompson Sampling via Fine-Tuning of LLMs
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2510.13328