TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework

Shuzheng Gao, Eric John Li, Man Ho Lam, Jingyu Xiao, Yuxuan Wan, Chaozheng Wang, Man Tik Ng, Michael R. Lyu · DOI

Introduction

As Large Language Models (LLMs) transition from experimental assistants to critical components of the software engineering lifecycle, the necessity for a rigorous evaluation of their reliability becomes paramount. While standard benchmarks like HumanEval focus on isolated code generation, they often fail to capture the complexities of real-world development, such as vulnerability detection, UI design, and robustness against adversarial inputs. To bridge this gap, researchers have introduced TREAT (Code LLMs Trustworthiness / REliability Assessment and Testing), a holistic framework designed to stress-test the current generation of AI coding partners.

The TREAT Framework

TREAT is structured to evaluate models across four critical dimensions that reflect the diverse needs of software engineers. It moves beyond simple text-to-code prompts to assess how models handle multi-modal inputs and maintain performance under pressure.

Overview of TREAT evaluation tasks, supported languages, and the multi-prompt evaluation strategy.
  1. Multi-Task Evaluation: The framework covers seven core coding areas, including summarization, translation, reasoning, code review, test generation, and vulnerability detection.
  2. Multi-Modality: TREAT incorporates tasks like UI2Code, Design Edit, and Design Repair, requiring models to interpret visual mockups and translate them into functional code.
  3. Robustness Assessment: This dimension applies "semantically-preserving" transformations—such as renaming variables or adding misleading comments—to determine if models rely on logical understanding or merely surface-level patterns.
  4. Multi-Prompt Strategy: To mitigate "prompt luck," TREAT utilizes multiple versions of the same request, ensuring that a model's ranking is based on consistent performance rather than phrasing coincidences.

Experimental Methodology

The researchers evaluated 26 state-of-the-art models using a massive dataset of 9,568 samples across 12 programming languages. Data was sourced from high-quality platforms like GitHub, GeeksForGeeks, and HackerRank (covering the 2023-2025 period). Robustness was tested using the CodeCrash methodology, injecting structural and contextual perturbations to observe performance degradation.

Key Findings and Analysis

The study revealed several critical insights into the current state of Code LLMs:

  • Surface Learning and Fragility: Models are surprisingly easy to mislead. Adding a comment that contradicts the code logic resulted in performance drops of up to 20%, suggesting that models often prioritize natural language cues over logical code structure.
  • The Multi-Modality Bottleneck: While models excel at generating UI code from scratch, they struggle with editing or repairing existing designs. This indicates a lack of "precise localization"—the ability to map a visual error in an image to a specific line of CSS or HTML.
  • Python Bias: Performance was consistently 10–20% higher on Python tasks compared to Java or C++, likely reflecting the dominance of Python in training corpora.

Comparative Performance

The evaluation included frontier models such as GPT-5, the Claude series, and DeepSeek. While no single model dominated every category, clear leaders emerged in specific domains.

Radar charts comparing top-tier models across the three primary evaluation dimensions.

On average, models experienced a 14.1% performance decline during robustness testing. However, "thinking" models (like DeepSeek-R1 and GPT-5) proved significantly more resilient, with performance drops often staying within 3%. In contrast, standard models showed high sensitivity to prompt wording, with rankings swinging by as many as 15 positions based on minor phrasing changes.

Conclusion

TREAT represents a significant advancement toward a standardized "driving test" for AI coders. By highlighting the "robustness tax" and the limitations of surface-level learning, the framework provides a roadmap for developing more reliable and trustworthy digital co-pilots. Future work will focus on expanding the framework to repository-level understanding and broader security compliance.

Summary updated

BibTeX
@misc{gao2025treat,
  author = {Shuzheng Gao and Eric John Li and Man Ho Lam and Jingyu Xiao and Yuxuan Wan and Chaozheng Wang and Man Tik Ng and Michael R. Lyu},
  title = {{TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework}},
  year = {2025},
  eprint = {2510.17163},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.17163},
}
Figure