mlsanityData to 14 Oct 2026

TreeCoder: Systematic Exploration and Optimisation of Decoding and Constraints for LLM Code Generation

arXiv 2511.22277 ↗First posted 27 Nov 2025cs.LGcited by 5

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have shown remarkable ability to generate code, yet their outputs often violate syntactic or semantic constraints when guided only through natural language prompts. We introduce TreeCoder, the most general and flexible framework to date for exploring decoding strategies, constraints, and hyperparameters in LLMs, and use it in code generation to enforce correctness and structure during decoding rather than relying on prompt engineering. TreeCoder represents decoding as a tree search over candidate programs, where both decoding strategies and constraint functions - such as style, syntax, execution - are treated as first-class, optimisable components. This design enables systematic exploration and automatic tuning of decoding configurations using standard optimisation techniques. Experiments on the MBPP (Python) and SQL-Spider benchmarks show that TreeCoder consistently improves accuracy across open-source models such as CodeLlama, Mistral and DeepSeek, often outperforming their unconstrained baselines by considerable margins.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 25 of its 46 references that are in the map. First posted on arXiv 27 Nov 2025.

Builds on

25 of 46 references.

References · 25

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  3. 2021Program Synthesis with Large Language Modelscited by 3,637
  4. 2019Optuna: A Next-generation Hyperparameter Optimization Frameworkcited by 2,501
  5. 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
  6. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
  7. 2022Competition-Level Code Generation with AlphaCodecited by 1,462
  8. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  9. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
  10. 2025rStar-Math: Small LLMs Can Master Math Reasoning with Self-Evolved Deep Thinkingcited by 313
  11. 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 197
  12. 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
13 more
  1. 2020NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraintscited by 149
  2. 2020If beam search is the answer, what was the question?cited by 116
  3. 2024Grammar-Aligned Decodingcited by 54
  4. 2023Hot or Cold? Adaptive Temperature Sampling for Code Generation with Large Language Modelscited by 38
  5. 2025CRANE: Reasoning with constrained LLM generationcited by 38
  6. 2024IterGen: Iterative Semantic-aware Structured LLM Generation with Backtrackingcited by 29
  7. 2025Constrained Sampling for Language Models Should Be Easy: An MCMC Perspectivecited by 14
  8. 2025KV Cache Compression for Inference Efficiency in LLMs: A Reviewcited by 12
  9. 2024Controllable Generation via Locally Constrained Resamplingcited by 11
  10. 2018When to Finish? Optimal Beam Search for Neural Text Generation (modulo beam size)cited by 10
  11. 2024Sketch-Guided Constrained Decoding for Boosting Blackbox Large Language Models without Logit Accesscited by 9
  12. 2024Enhancing SQL Query Generation with Neurosymbolic Reasoningcited by 3
  13. 2025A Systematic Literature Review on Neural Code Translationcited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 5.

5 papers.