R-U-SURE? Uncertainty-Aware Code Suggestions By Maximizing Utility Across Random User Intents
Not on the map. Why?
Abstract (arXiv)
Large language models show impressive results at predicting structured text such as code, but also commonly introduce errors and hallucinations in their output. When used to assist software developers, these models may make mistakes that users must go back and fix, or worse, introduce subtle bugs that users may miss entirely. We propose Randomized Utility-driven Synthesis of Uncertain REgions (R-U-SURE), an approach for building uncertainty-aware suggestions based on a decision-theoretic model of goal-conditioned utility, using random samples from a generative model as a proxy for the unobserved possible intents of the end user. Our technique combines minimum-Bayes-risk decoding, dual decomposition, and decision diagrams in order to efficiently produce structured uncertainty summaries, given only sample access to an arbitrary generative model of code and an optional AST parser. We demonstrate R-U-SURE on three developer-assistance tasks, and show that it can be applied different user interaction patterns without retraining the model and leads to more accurate uncertainty estimates than token-probability baselines. We also release our implementation as an open-source library at https://github.com/google-research/r_u_sure.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 68 of its 108 references that are in the map. First posted on arXiv 1 Mar 2023.
Builds on
68 of 108 references.
References · 68
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
- 2022Language Models (Mostly) Know What They Knowcited by 1,783
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
38 more
- 2020On Faithfulness and Factuality in Abstractive Summarizationcited by 895
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2017Selective Classification for Deep Neural Networkscited by 799
- 2021A Gentle Introduction to Conformal Prediction and Distribution-Free Uncertainty Quantificationcited by 777
- 2022Teaching Models to Express Their Uncertainty in Wordscited by 731
- 2022Large Language Models Can Self-Improvecited by 656
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
- 2020DreamCoder: Growing generalizable, interpretable knowledge with wake-sleep Bayesian program learningcited by 159
- 2020Is MAP Decoding All You Need? The Inadequacy of the Mode in Neural Machine Translationcited by 137
- 2021A Token-level Reference-free Hallucination Detection Benchmark for Free-form Text Generationcited by 137
- 2018Analyzing Uncertainty in Neural Machine Translationcited by 126
- 2020The Language Interpretability Tool: Extensible, Interactive Visualizations and Analysis for NLP Modelscited by 125
- 2022Natural Language to Code Translation with Executioncited by 122
- 2021High Quality Rather than High Model Probability: Minimum Bayes Risk Decoding with Neural Metricscited by 104
- 2022Uncertainty Quantification with Pre-trained Language Models: A Large-Scale Empirical Analysiscited by 104
- 2022Plex: Towards Reliability using Pretrained Large Model Extensionscited by 102
- 2017Deeply AggreVaTeD: Differentiable Imitation Learning for Sequential Predictioncited by 93
- 2022Reading Between the Lines: Modeling User Behavior and Costs in AI-Assisted Programmingcited by 91
- 2022Coder Reviewer Reranking for Code Generationcited by 83
- 2016Stochastic Multiple Choice Learning for Training Diverse Deep Ensemblescited by 77
- 2019Deep Gamblers: Learning to Abstain with Portfolio Theorycited by 69
- 2017Minimum Word Error Rate Training for Attention-based Sequence-to-Sequence Modelscited by 68
- 2018Accurate and Diverse Sampling of Sequences based on a "Best of Many" Sample Objectivecited by 56
- 2021Understanding the Properties of Minimum Bayes Risk Decoding in Neural Machine Translationcited by 56
- 2021Machine Translation Decoding beyond Beam Searchcited by 55
- 2022Investigating Explainability of Generative AI for Code through Scenario-based Designcited by 47
- 2019Learning to Infer Program Sketchescited by 44
- 2020Energy-Based Reranking: Improving Neural Machine Translation Using Energy-Based Modelscited by 44
- 2021Perfection Not Required? Human-AI Partnerships in Code Translationcited by 42
- 2018Deep Reinforcement Learning For Sequence to Sequence Modelscited by 39
- 2019Program Synthesis and Semantic Parsing with Learned Code Idiomscited by 34
- 2018Confidence Modeling for Neural Semantic Parsingcited by 33
- 2021Learning to Complete Code with Sketchescited by 23
- 2017Neural Lattice-to-Sequence Models for Uncertain Inputscited by 20
- 2014Mining Idioms from Source Codecited by 19
- 2022The Calibration Generalization Gapcited by 18
50 most cited of 68 All 68 (JSON)
Built on by
Citing papers per year: 2023: 3; 2024: 1; 2025: 3; 2026: 3.
10 papers.
- 2023Uncertainty in Natural Language Generation: From Theory to Applicationscited by 61
- 2024Calibration and Correctness of Language Models for Codecited by 49
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
- 2023Guess & Sketch: Language Model Guided Transpilationcited by 3
- 2025Comparing Uncertainty Measurement and Mitigation Methods for Large Language Models: A Systematic Reviewcited by 3
- 2025Localized Calibrated Uncertainty in Code Language Modelscited by 3
- 2025Legal Requirements Translation from Lawcited by 1
- 2026Uncertainty-Aware Generation and Decision-Making Under Ambiguitycited by 1
- 2026Fine-grained Approaches for Confidence Calibration of LLMs in Automated Code Revisioncited by 0
- 2026Characterizing Overconfident Failure in LLM-Based Code Generationcited by 0
- 2026Characterizing Overconfident Failure in LLM-Based Code Generation8 Oct 2026
- 2026Uncertainty-Aware Generation and Decision-Making Under Ambiguity29 Jun 2026
- 2026Fine-grained Approaches for Confidence Calibration of LLMs in Automated Code Revision8 Apr 2026
- 2025Localized Calibrated Uncertainty in Code Language Models31 Dec 2025
- 2025Legal Requirements Translation from Law3 Jul 2025
- 2025Comparing Uncertainty Measurement and Mitigation Methods for Large Language Models: A Systematic Review25 Apr 2025
- 2024Calibration and Correctness of Language Models for Code3 Feb 2024
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey27 Oct 2023
- 2023Guess & Sketch: Language Model Guided Transpilation25 Sep 2023
- 2023Uncertainty in Natural Language Generation: From Theory to Applications28 Jul 2023