mlsanityData to 7 Oct 2026

Probabilistic Programs of Thought

arXiv 2604.17290 ↗First posted 19 Apr 2026cs.CL cs.AI cs.PLcited by 1

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

LLMs are widely used for code generation and mathematical reasoning tasks where they are required to generate structured output. They either need to reason about code, generate code for a given specification, or reason using programs of thought. The typical approach to code generation is to prompt the model and generate samples until an appropriate program is obtained. Within this process, sampling n programs from the language model requires n GPU compute-intensive generations which becomes prohibitively expensive for larger values of n. In this work, we address this limitation by exposing the LLM's distribution within the generated programs themselves. We propose a novel test-time framework we dub probabilistic programs of thought to obtain more samples from the model with fewer LLM generations. Given a program generated by a model and the associated next-token probabilities, we build a probabilistic program that compactly represents exponentially many deterministic programs. Since performing probabilistic reasoning in this probabilistic program is much cheaper, our approach allows sampling new programs without any additional GPU compute and little CPU overhead. We instantiate our approach on benchmarks for code generation, code understanding and mathematical reasoning and report improvements in performance with fewer generations from the LLM.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 28 of its 56 references that are in the map. First posted on arXiv 19 Apr 2026.

Builds on

28 of 56 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024Qwen2.5-Coder Technical Report18 Sep

Other references · 27

  1. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2020Scaling Laws for Neural Language Modelscited by 6,411
  4. 2025Qwen2.5-VL Technical Reportcited by 5,418
  5. 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,928
  6. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
  7. 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 803
  8. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
  9. 2022RL with KL penalties is better viewed as Bayesian inferencecited by 130
  10. 2023From Word Models to World Models: Translating from Natural Language to the Probabilistic Language of Thoughtcited by 118
  11. 2022Language Model Cascadescited by 104
  12. 2023Sequential Monte Carlo Steering of Large Language Models using Probabilistic Programscited by 79
15 more
  1. 2025Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlocited by 45
  2. 2025How Do Large Language Monkeys Get Their Power (Laws)?cited by 40
  3. 2023DSPy Assertions: Computational Constraints for Self-Refining Language Model Pipelinescited by 27
  4. 2023A Pseudo-Semantic Loss for Autoregressive Models with Logical Constraintscited by 21
  5. 2025Sample, Don't Search: Rethinking Test-Time Alignment for Language Modelscited by 21
  6. 2024Plot2Code: A Comprehensive Benchmark for Evaluating Multi-modal Large Language Models in Code Generation from Scientific Plotscited by 20
  7. 2024BIRD: A Trustworthy Bayesian Inference Framework for Large Language Modelscited by 18
  8. 2025Probabilistic Soundness Guarantees in LLM Reasoning Chainscited by 13
  9. 2025NAVER: A Neuro-Symbolic Compositional Automaton for Visual Grounding with Explicit Logic Reasoningcited by 12
  10. 2025Large Language Bayescited by 10
  11. 2025NePTune: A Neuro-Pythonic Framework for Tunable Compositional Reasoning on Vision-Languagecited by 8
  12. 2023Scaling Integer Arithmetic in Probabilistic Programscited by 6
  13. 2025RefineStat: Efficient Exploration for Probabilistic Program Synthesiscited by 5
  14. 2026Likelihood Hacking in Probabilistic Program Synthesiscited by 2
  15. 2025Enhancing Visual Programming for Visual Reasoning via Probabilistic Graphscited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving
  2. 2025Evaluating the Generalization Capabilities of Large Language Models on Code Reasoning
  3. 2025Can LLMs Generate Reliable Test Case Generators? A Study on Competition-Level Programming Problems
  4. 2025Evaluating Intermediate Reasoning of Code-Assisted Large Language Models for Mathematics
  5. 2025S*: Test Time Scaling for Code Generation
  6. 2026CodeGolf Bench: A Multi-Language Benchmark for Evaluating Concise Code Generation Capabilities of Large Language Models
  7. 2021flip-hoisting: Exploiting Repeated Parameters in Discrete Probabilistic Programs
  8. 2025Evaluating and Improving Large Language Models for Competitive Program Generation