Learning to Reason in LLMs by Expectation Maximization

Junghyun Lee, Branislav Kveton, Sunav Choudhary, Subhojyoti Mukherjee, Anup Rao +2 more
12/23/2025
cs.LGcs.CLstat.ML

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) solve reasoning problems by first generating a rationale and then answering. We formalize reasoning as a latent variable model and derive an expectation-maximization (EM) objective for learning to reason. This view connects EM and modern reward-based optimization, and shows that the main challenge lies in designing a sampling distribution that generates rationales that justify correct answers. We instantiate and compare several sampling schemes: rejection sampling with a budget, self-taught reasoner (STaR), and prompt posterior sampling (PPS), which only keeps the rationalization stage of STaR. Our experiments on the ARC, MMLU, and OpenBookQA datasets with the Llama and Qwen models show that the sampling scheme can significantly affect the accuracy of learned reasoning models. Despite its simplicity, we observe that PPS outperforms the other sampling schemes.

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{lee2025learning,
  title  = {Learning to Reason in LLMs by Expectation Maximization},
  author = {Junghyun Lee and Branislav Kveton and Sunav Choudhary and Subhojyoti Mukherjee and Anup Rao and Ryan A. Rossi and Alexa Siu},
  year   = {2025},
  eprint = {2512.20169},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.20169v1}
}

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/2512.20169.svg)](https://codeofpaper.com/paper/2512.20169)

Discussion