Who Evaluates the Evaluators? On Automatic Metrics for Assessing AI-based Offensive Code Generators
Not on the map. Why?
Abstract (arXiv)
AI-based code generators are an emerging solution for automatically writing programs starting from descriptions in natural language, by using deep neural networks (Neural Machine Translation, NMT). In particular, code generators have been used for ethical hacking and offensive security testing by generating proof-of-concept attacks. Unfortunately, the evaluation of code generators still faces several issues. The current practice uses output similarity metrics, i.e., automatic metrics that compute the textual similarity of generated code with ground-truth references. However, it is not clear what metric to use, and which metric is most suitable for specific contexts. This work analyzes a large set of output similarity metrics on offensive code generators. We apply the metrics on two state-of-the-art NMT models using two datasets containing offensive assembly and Python code with their descriptions in the English language. We compare the estimates from the automatic metrics with human evaluation and provide practical insights into their strengths and limitations.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 35 of its 85 references that are in the map. First posted on arXiv 12 Dec 2022.
Builds on
35 of 85 references.
References · 35
- 2017Attention Is All You Needcited by 59,932
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2020The Creation and Detection of Deepfakes: A Surveycited by 246
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
23 more
- 2018Dear Sir or Madam, May I introduce the GYAFC Dataset: Corpus, Benchmarks and Metrics for Formality Style Transfercited by 209
- 2019SPoC: Search-based Pseudocode to Codecited by 176
- 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
- 2020PyMT5: multi-mode translation of natural language and Python code with transformerscited by 80
- 2016Latent Predictor Networks for Code Generationcited by 73
- 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
- 2021CoTexT: Multi-task Learning with Code-Text Transformercited by 61
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
- 2019Does BLEU Score Work for Code Migration?cited by 49
- 2019JuICe: A Large Scale Distantly Supervised Dataset for Open Domain Context-based Code Generationcited by 49
- 2021Applying CodeBERT for Automated Program Repair of Java Simple Bugscited by 44
- 2021Multilingual training for Software Engineeringcited by 43
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2021The Threat of Offensive AI to Organizationscited by 37
- 2022Human Evaluation and Correlation with Automatic Metrics in Consultation Note Generationcited by 33
- 2021Translation Quality Assessment: A Brief Survey on Manual and Automatic Methodscited by 23
- 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generationcited by 16
- 2018XNMT: The eXtensible Neural Machine Translation Toolkitcited by 14
- 2021EVIL: Exploiting Software via Natural Languagecited by 11
- 2022BashExplainer: Retrieval-Augmented Bash Code Comment Generation based on Fine-tuned CodeBERTcited by 9
- 2022DualSC: Automatic Generation and Summarization of Shellcode via Transformer and Dual Learningcited by 8
- 2018Human vs Automatic Metrics: on the Importance of Correlation Designcited by 6
- 2020Relevance Transformer: Generating Concise Code Snippets with Relevance Feedbackcited by 6
Built on by
Citing papers per year: 2023: 4; 2024: 4; 2025: 2.
10 papers.
- 2023Vulnerabilities in AI Code Generators: Exploring Targeted Data Poisoning Attackscited by 29
- 2023Assessing Evaluation Metrics for Neural Test Oracle Generationcited by 7
- 2023Automating the Correctness Assessment of AI-generated Code for Security Contextscited by 6
- 2024Poisoning Programs by Un-Repairing Code: Security Concerns of AI-generated Codecited by 5
- 2023Enhancing Robustness of AI Offensive Code Generators via Data Augmentationcited by 3
- 2024Enhancing AI-based Generation of Software Exploits with Contextual Informationcited by 3
- 2024AI Code Generators for Security: Friend or Foe?cited by 2
- 2025CODE-DITING: A Reasoning-Based Metric for Functional Alignment in Code Evaluationcited by 1
- 2024Can Neural Decompilation Assist Vulnerability Prediction on Binary Code?cited by 0
- 2025The illusion of a perfect metric: Why evaluating AI's words is harder than it lookscited by 0
- 2025The illusion of a perfect metric: Why evaluating AI's words is harder than it looks19 Aug 2025
- 2025CODE-DITING: A Reasoning-Based Metric for Functional Alignment in Code Evaluation26 May 2025
- 2024Can Neural Decompilation Assist Vulnerability Prediction on Binary Code?10 Dec 2024
- 2024Enhancing AI-based Generation of Software Exploits with Contextual Information5 Aug 2024
- 2024Poisoning Programs by Un-Repairing Code: Security Concerns of AI-generated Code11 Mar 2024
- 2024AI Code Generators for Security: Friend or Foe?2 Feb 2024
- 2023Automating the Correctness Assessment of AI-generated Code for Security Contexts28 Oct 2023
- 2023Assessing Evaluation Metrics for Neural Test Oracle Generation11 Oct 2023
- 2023Vulnerabilities in AI Code Generators: Exploring Targeted Data Poisoning Attacks4 Aug 2023
- 2023Enhancing Robustness of AI Offensive Code Generators via Data Augmentation8 Jun 2023