RobuNFR: Evaluating the Robustness of Large Language Models on Non-Functional Requirements Aware Code Generation
Not on the map. Why?
Abstract (arXiv)
When using LLMs to address Non-Functional Requirements (NFRs), developers may behave differently (e.g., expressing the same NFR in different words). Robust LLMs should output consistent results across these variations; however, this aspect remains underexplored. We propose RobuNFR for evaluating the robustness of LLMs in NFR-aware code generation across four NFR dimensions: design, readability, reliability, and performance, using three methodologies: prompt variation, regression testing, and diverse workflows. Our experiments show that RobuNFR reveals robustness issues in the tested LLMs when considering NFRs in code generation. Specifically, under prompt variation, including NFRs leads to a decrease in Pass@1 by up to 39 percent and an increase in the standard deviation from 0.48 to 2.48 compared to the baseline without NFRs (i.e., Function-Only). While incorporating NFRs generally improves overall NFR metrics, it also results in higher prompt sensitivity. In regression settings, some LLMs exhibit differences across versions, with improvements in one aspect (e.g., reduced code smells) often accompanied by regressions in another (e.g., decreased correctness), revealing inconsistencies that challenge their robustness. When varying workflows, the tested LLMs show significantly different NFR-aware code generation capabilities between two workflows: (1) integrating NFRs and functional requirements into the initial prompt and (2) enhancing Function-Only-generated code with the same NFR.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 20 of its 42 references that are in the map. First posted on arXiv 28 Mar 2025.
Builds on
20 of 42 references.
References · 20
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2024Large Language Models: A Surveycited by 525
- 2023How is ChatGPT's behavior changing over time?cited by 270
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
- 2023CodeScore: Evaluating Code Generation by Learning Code Executioncited by 67
- 2023A Survey on Large Language Models for Software Engineeringcited by 59
- 2024SOEN-101: Code Generation by Emulating Software Process Models Using Large Language Model Agentscited by 34
- 2024Search-Based LLMs for Code Optimizationcited by 28
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 27
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctnesscited by 26
- 2024AI-powered Code Review with LLMs: Early Resultscited by 22
8 more
- 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variationscited by 20
- 2023Exploring the Robustness of Large Language Models for Solving Programming Problemscited by 16
- 2025MANTRA: Enhancing Automated Method-Level Refactoring with Contextual RAG and Multi-Agent LLM Collaborationcited by 10
- 2023Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messagescited by 4
- 2023PACE: A Program Analysis Framework for Continuous Performance Predictioncited by 3
- 2017Revisiting Exception Handling Practices with Exception Flow Analysiscited by 2
- 2024Exploring Language Model's Code Generation Ability with Auxiliary Functionscited by 2
- 2023EasyView: Bringing Performance Profiles into Integrated Development Environmentscited by 1
Built on by
Citing papers per year: 2025: 3; 2026: 2.
5 papers.
- 2025Success is in the Details: Evaluate and Enhance Details Sensitivity of Code LLMs through Counterfactualscited by 1
- 2025Instance-level Randomization: Toward More Stable LLM Evaluationscited by 1
- 2025BabelCoder: Agentic Code Translation with Specification Alignmentcited by 1
- 2026Accuracy and Satisfaction in Multi-Turn LLM Dialogues for NFR Assessmentcited by 0
- 2026Noisy Test-Time Reinforcement Learning for Code LLMscited by 0
- 2026Noisy Test-Time Reinforcement Learning for Code LLMs26 Sep 2026
- 2026Accuracy and Satisfaction in Multi-Turn LLM Dialogues for NFR Assessment23 Jun 2026
- 2025BabelCoder: Agentic Code Translation with Specification Alignment7 Dec 2025
- 2025Instance-level Randomization: Toward More Stable LLM Evaluations16 Sep 2025
- 2025Success is in the Details: Evaluate and Enhance Details Sensitivity of Code LLMs through Counterfactuals20 May 2025