Top Pass: Improve Code Generation by Pass@k-Maximized Code Ranking
Not on the map. Why?
Abstract (arXiv)
Code generation has been greatly enhanced by the profound advancements in Large Language Models (LLMs) recently. Nevertheless, such LLM-based code generation approaches still struggle to generate error-free code in a few tries when faced with complex problems. To address this, the prevailing strategy is to sample a huge number of candidate programs, with the hope of any one in them could work. However, users of code generation systems usually expect to find a correct program by reviewing or testing only a small number of code candidates. Otherwise, the system would be unhelpful. In this paper, we propose Top Pass, a code ranking approach that identifies potential correct solutions from a large number of candidates. Top Pass directly optimizes the pass@k loss function, enhancing the quality at the top of the candidate list. This enables the user to find the correct solution within as few tries as possible. Experimental results on four benchmarks indicate that our Top Pass method enhances the usability of code generation models by producing better ranking results, particularly achieving a 32.9% relative improvement in pass@1 on CodeContests when compared to the state-of-the-art ranking method.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 32 of its 47 references that are in the map. First posted on arXiv 11 Aug 2024.
Builds on
32 of 47 references.
References · 32
- 2017Attention Is All You Needcited by 59,932
- 2023GPT-4 Technical Reportcited by 18,132
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2023PaLM 2 Technical Reportcited by 1,154
- 2023Teaching Large Language Models to Self-Debugcited by 963
20 more
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023StarCoder: may the source be with you!cited by 790
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2023Textbooks Are All You Needcited by 561
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
- 2022Large Language Models are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Modelscited by 102
- 2022Coder Reviewer Reranking for Code Generationcited by 83
- 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 68
- 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
- 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
- 2022Fault-Aware Neural Code Rankerscited by 33
- 2021Multimodal Representation for Neural Code Searchcited by 11
- 2022NS3: Neuro-Symbolic Semantic Code Searchcited by 3
Built on by
Citing papers per year: 2025: 6; 2026: 3.
9 papers.
- 2025The Debugging Decay Index: Rethinking Debugging Strategies for Code LLMscited by 5
- 2025Deep-Bench: Deep Learning Benchmark Dataset for Code Generationcited by 3
- 2026Exploring Pass-Rate Reward in Reinforcement Learning for Code Generationcited by 2
- 2025Large Language Models in Code Co-generation for Safe Autonomous Vehiclescited by 1
- 2025Stable Preference Optimization: A Bilevel Approach to Catastrophic Preference Shiftcited by 1
- 2025Verification Limits Code LLM Trainingcited by 1
- 2026InstructDiff: Domain-Adaptive Data Selection via Differential Entropy for Efficient LLM Fine-Tuningcited by 1
- 2025IndicEval-XL: Bridging Linguistic Diversity in Code Generation Across Indic Languagescited by 0
- 2026Design-Specification Tiling for ICL-based CAD Code Generationcited by 0
- 2026Exploring Pass-Rate Reward in Reinforcement Learning for Code Generation1 May 2026
- 2026Design-Specification Tiling for ICL-based CAD Code Generation13 Mar 2026
- 2026InstructDiff: Domain-Adaptive Data Selection via Differential Entropy for Efficient LLM Fine-Tuning30 Jan 2026
- 2025Verification Limits Code LLM Training25 Sep 2025
- 2025Stable Preference Optimization: A Bilevel Approach to Catastrophic Preference Shift10 Jul 2025
- 2025The Debugging Decay Index: Rethinking Debugging Strategies for Code LLMs23 Jun 2025
- 2025Large Language Models in Code Co-generation for Safe Autonomous Vehicles26 May 2025
- 2025IndicEval-XL: Bridging Linguistic Diversity in Code Generation Across Indic Languages26 Feb 2025
- 2025Deep-Bench: Deep Learning Benchmark Dataset for Code Generation26 Feb 2025