paper-with-me

홈 › Papers

Benchmarking and Explaining Large Language Model-based Code Generation: A Causality-Centric Approach

2023-10-10 · Zhenlan Ji, Pingchuan Ma, Zongjie Li, Shuai Wang

While code generation has been widely used in various software development scenarios, the quality of the generated code is not guaranteed. This has been a particular concern in the era of large language models (LLMs)- based code generation, where LLMs, deemed a complex and powerful black-box model, is instructed by a high-level natural language specification, namely a prompt, to generate code. Nevertheless, effectively evaluating and explaining the code generation capability of LLMs is inherently challenging, given the complexity of LLMs and the lack of transparency. Inspired by the recent progress in causality analysis and its application in software engineering, this paper launches a causality analysis-based approach to systematically analyze the causal relations between the LLM input prompts and the generated code. To handle various technical challenges in this study, we first propose a novel causal graph-based representation of the prompt and the generated code, which is established over the fine-grained, human-understandable concepts in the input prompts. The formed causal graph is then used to identify the causal relations between the prompt and the derived code. We illustrate the insights that our framework can provide by studying over 3 popular LLMs with over 12 prompt adjustment strategies. The results of these studies illustrate the potential of our technique to provide insights into LLM effectiveness, and aid end-users in understanding predictions. Additionally, we demonstrate that our approach provides actionable insights to improve the quality of the LLM-generated code by properly calibrating the prompt.

📄 PDF Abstract BibTeX arXiv:2310.06680

Code (1)

brucewlee/lftk

Tasks

BenchmarkingCode GenerationLanguage ModelingLanguage ModellingLarge Language Model

Similar Papers 제목 키워드 기반

Dynamic Benchmarking of Reasoning Capabilities in Code Large Language Models Under Data Contamination

2025-03-06 · Simin Chen, Pranav Pusarla, Baishakhi Ray

The rapid evolution of code largelanguage models underscores the need for effective and transparent benchmarking of their reasoning capabilities. However, the current benchmarking approach heavily depends on publicly ava…

Benchmarking

Rule-Based Moral Principles for Explaining Uncertainty in Natural Language Generation

2025-09-08 · Zahra Atf, Peter R Lewis arxiv

Large language models (LLMs) are increasingly used in high-stakes settings, where explaining uncertainty is both technical and ethical. Probabilistic methods are often opaque and misaligned with expectations of transpare…

AD-LLM: Benchmarking Large Language Models for Anomaly Detection

2024-12-15 · Tiankai Yang, Yi Nian, Shawn Li, Ruiyao Xu 외

Anomaly detection (AD) is an important machine learning task with many real-world uses, including fraud detection, medical diagnosis, and industrial monitoring. Within natural language processing (NLP), AD helps detect i…

Anomaly DetectionBenchmarkingData AugmentationFraud Detection+4

BLAST: Benchmarking LLMs with ASP-based Structured Testing

2026-04-24 · Manuel Alejandro Borroto Santana, Erica Coppolillo, Francesco Calimeri, Giuseppe Manco 외 arxiv

Large Language Models (LLMs) have demonstrated remarkable performance across a broad spectrum of tasks, including natural language understanding, dialogue systems, and code generation. Despite evident progress, less atte…

Natural Language UnderstandingCode Generation

DualGauge: Automated Joint Security-Functionality Benchmarking of Specification-Only Code Generation by LLMs and Coding Agents

2025-11-24 · Rupam Patir, Keyan Guo, Suvadra Barua, Abhijeet Pathak 외 arxiv

Large language models (LLMs) and LLM-based coding agents are now used to generate code from natural-language specifications, yet ensuring such code is both functionally correct and secure remains a challenge. We present …

Code Generation