Skip to content

Likelihood hacking in probabilistic program synthesis

Mar 2026 · arXiv.org · Vol abs/2603.24126 · 2 citations · 66 references
Computer Science

TL;DR

This work formalises LH in a core probabilistic programming language (PPL) and gives sufficient syntactic conditions for its prevention, proving that a safe language fragment satisfying these conditions cannot produce likelihood-hacking programs.

Abstract

When language models are trained by reinforcement learning (RL) to write probabilistic programs, they can artificially inflate their marginal-likelihood reward by producing programs whose data distribution fails to normalise instead of fitting the data better. We call this failure likelihood hacking (LH). We formalise LH in a core probabilistic programming language (PPL) and give sufficient syntactic conditions for its prevention, proving that a safe language fragment $\mathcal{L}_{\text{safe}}$ satisfying these conditions cannot produce likelihood-hacking programs. Empirically, we show that GRPO-trained models generating PyMC code discover LH exploits within the first few training steps, driving violation rates well above the untrained-model baseline. We implement $\mathcal{L}_{\text{safe}}$'s conditions as $\texttt{SafeStan}$, a LH-resistant modification of Stan, and show empirically that it suppresses LH under optimisation pressure. These results show that language-level safety constraints are both theoretically grounded and effective in practice for automated Bayesian model discovery.

View source

Similar papers

#artificial intelligence Preprint Aug 2026

Program Learning with Verifiable Rewards: Symbolic Backpropagation for Post-Training LLMs

PLVR (Program Learning with Verifiable Rewards): a post training method that learns such programs directly from input-output examples and is released with the symbolic backpropagation library and a conformance checker so the method can be applied to primitive libraries other than the authors' own.

Vishvesh Bhat · 0 citations

Reinforcement Learning for Code Optimization

This work makes execution time learnable through three stages: how code is tested, by building DMC-Optim with large optimization tests and a calibrated sandbox; how speed is turned into reward, by composing correctness and speed in the RL environment and using an offline simulator to predict the most promising configur...

Pierre Chambon, Kun-Hao Zheng, Juliette Decugis et al. · 0 citations
Jul 2026

RLPF: Reinforcement Learning from Performance Feedback for Code Generation

This work proposes RLPF, reinforcement learning from performance feedback, which turns execution outcomes into a staged reward, and suggests that code agents can be trained not only to pass tests, but also to optimize the programs they write.

Huihao Jing, Hao-Zhe Cui, Wenbin Hu et al. · 0 citations

Off-Context GRPO: Learning to Reason on Hard Problems using Privileged Information

Off-Context GRPO (OC-GRPO), a minimally modified variant of GRPO that uses guided rollouts but applies an importance-corrected objective to steer the update back toward the original unguided objective, avoiding the mismatch that destabilizes uncorrected guided training.

Priyank Agrawal, Ankur Samanta, S. Ghasemlou et al. · 1 citation
Jul 2026

From Black Box to Executable Logic: Explainable Reinforcement Learning through Prolog Expert Systems

A three-stage post-hoc transformation that extracts a frozen proximal policy optimization teacher, induces an ordered rule list from its decisions in the manner of classical relational learning, and emits the result as a Prolog program whose every decision is executed by an off-the-shelf logic engine is presented.

Eduardo C. Garrido-Merchán · 0 citations

Related blog posts

Microsoft Research Blog Oct 12, 2026

Simulating student learning for better AI tutoring

StudentSim is a research system for evaluating and improving AI tutoring tools before they are tested with learners. It models how individuals may engage with tutors, giving feedback to improve tutor performance across subjects like chess, writing, and mathematics. The post Simulating student learning for better AI tutoring appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.