mlsanityData to 7 Oct 2026

Toward Automated Validation of Language Model Synthesized Test Cases using Semantic Entropy

arXiv 2411.08254 ↗First posted 13 Nov 2024cs.SE cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

Modern Large Language Model (LLM)-based programming agents often rely on test execution feedback to refine their generated code. These tests are synthetically generated by LLMs. However, LLMs may produce invalid or hallucinated test cases, which can mislead feedback loops and degrade the performance of agents in refining and improving code. This paper introduces VALTEST, a novel framework that leverages semantic entropy to automatically validate test cases generated by LLMs. Analyzing the semantic structure of test cases and computing entropy-based uncertainty measures, VALTEST trains a machine learning model to classify test cases as valid or invalid and filters out invalid test cases. Experiments on multiple benchmark datasets and various LLMs show that VALTEST not only boosts test validity by up to 29% but also improves code generation performance, as evidenced by significant increases in pass@1 scores. Our extensive experiments also reveal that semantic entropy is a reliable indicator to distinguish between valid and invalid test cases, which provides a robust solution for improving the correctness of LLM-generated test cases used in software testing and code generation.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 37 of its 62 references that are in the map. First posted on arXiv 13 Nov 2024.

Builds on

37 of 62 references.

References · 37

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2022Survey of Hallucination in Natural Language Generationcited by 2,056
  5. 2022Language Models (Mostly) Know What They Knowcited by 1,783
  6. 2023Language Agent Tree Search Unifies Reasoning Acting and Planning in Language Modelscited by 551
  7. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
  8. 2022CodeT: Code Generation with Generated Testscited by 369
  9. 2024Semantic Entropy Probes: Robust and Cheap Hallucination Detection in LLMscited by 246
  10. 2024LLMs Know More Than They Show: On the Intrinsic Representation of LLM Hallucinationscited by 230
  11. 2023A Stitch in Time Saves Nine: Detecting and Mitigating Hallucinations of LLMs by Validating Low-Confidence Generationcited by 202
  12. 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 178
25 more
  1. 2023Software Testing with Large Language Models: Survey, Landscape, and Visioncited by 163
  2. 2021The Curious Case of Hallucinations in Neural Machine Translationcited by 161
  3. 2024Fact-Checking the Output of Large Language Models via Token-Level Uncertainty Quantificationcited by 159
  4. 2020Detecting Hallucinated Content in Conditional Neural Sequence Generationcited by 151
  5. 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
  6. 2023No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generationcited by 82
  7. 2023Effective Test Generation Using Pre-trained Large Language Models and Mutation Testingcited by 51
  8. 2024Detecting Hallucinations in Large Language Model Generation: A Token Probability Approachcited by 40
  9. 2024TESTEVAL: Benchmarking Large Language Models for Test Case Generationcited by 38
  10. 2023A3Test: Assertion-Augmented Automated Test Case Generationcited by 33
  11. 2023ChatGPT vs SBST: A Comparative Assessment of Unit Test Suite Generationcited by 32
  12. 2023Can Large Language Models Write Good Property-Based Tests?cited by 30
  13. 2023CAT-LM: Training Language Models on Aligned Code And Testscited by 28
  14. 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancementcited by 27
  15. 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
  16. 2023Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration Toolscited by 13
  17. 2023Automatic Generation of Test Cases based on Bug Reports: a Feasibility Study with Large Language Modelscited by 8
  18. 2023Assessing Evaluation Metrics for Neural Test Oracle Generationcited by 7
  19. 2024Code Hallucinationcited by 5
  20. 2024Large-scale, Independent and Comprehensive study of the power of LLMs for test case generationcited by 4
  21. 2024LLM4VV: Exploring LLM-as-a-Judge for Validation and Verification Testsuitescited by 4
  22. 2023Prompting Code Interpreter to Write Better Unit Tests on Quixbugs Functionscited by 3
  23. 2024InterEvo-TR: Interactive Evolutionary Test Generation With Readability Assessmentcited by 3
  24. 2021A Pragmatic Approach for Hyper-Parameter Tuning in Search-based Test Case Generationcited by 2
  25. 2019Revisiting Hyper-Parameter Tuning for Search-based Test Data Generationcited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.