Frustratingly Simple Black-Box Adaptation of Language Models via Logit Bias

Ofek I. Cohen, Lior Shani, Aviv Rosenberg, Ankur Samanta, Tal Wagner +1 more
7/24/2026
cs.LGcs.AIcs.CL
rl

No confident code implementation found for this paper.

Abstract

Many organizations aim to adapt language models for internal use, both to improve performance on domain-specific tasks and to address privacy concerns around sensitive data. However, such adaptation remains non-trivial: it often requires operationally challenging fine-tuning of open-source models or ad hoc prompt optimization.

Show full abstract

We study a minimal alternative based on a simple API-level control: allowing users to bias the model's logits with a user-defined vector. We develop a black-box method for learning a single context-independent logit-bias vector, added at every decoding step, without modifying model weights or requiring gradients. Starting from a KL-regularized reinforcement learning (RL) objective, we characterize when such a fixed logit-bias vector can approximate the optimal prefix-dependent correction and derive a closed-form inverse-propensity estimator from rollouts, rewards, and token probabilities. Empirically, this simple decoding-time intervention improves over base models on mathematical and reasoning benchmarks while using far fewer trainable parameters than conventional fine-tuning. Our results suggest that learned logit bias is a lightweight mechanism for adapting language models under minimal access requirements.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cohen2026frustratingly,
  title  = {Frustratingly Simple Black-Box Adaptation of Language Models via Logit Bias},
  author = {Ofek I. Cohen and Lior Shani and Aviv Rosenberg and Ankur Samanta and Tal Wagner and Yonathan Efroni},
  year   = {2026},
  eprint = {2607.22837},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.22837v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.22837.svg)](https://codeofpaper.com/paper/2607.22837)

Discussion