REVIEW 3 major objections 5 minor 32 references
A Study on Mixup-Inspired Augmentation Methods for Software Vulnerability Detection
T0 review · 3 major / 5 minor · reviewed 2026-08-16 · deepseek-v4-flash
Pith's one-line read Simple oversampling beats embedding augmentation for vulnerabilities
desk verdict Useful first systematic study of embedding-level augmentation for vulnerability detection, but the single-run evaluation can't support the claimed ordering or the 'can't beat ROS' conclusion. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central object is the generic augmentation formula $h^+ = \alpha \odot h + \beta \odot h'$, where $h$ and $h'$ are embedding vectors of vulnerable samples and $\alpha, \beta$ are method-specific coefficient vectors: uniform interpolation for Linear Interpolation, Bernoulli dropout scaling for Stochastic Perturbation, extrapolation outside the data hull, binary feature exchange, and Gaussian multiplicative noise. The paper's novel adaptation is conditioned augmentation: using the dataset's line-level vulnerability labels and byte-pair tokenization, it locates the tokens belonging to vulnerable lines, excludes them from the augmentation operation, and re-inserts the original vulnerable-token embeddings afterward. This mechanism is what lets the paper test whether preserving the vulnerable part of the representation, rather than allowing it to be mixed or dropped, helps the detector. The same machinery yields the explanation for Stochastic Perturbation's peculiar behaviour: in the conditioned setting the re-insertion breaks the dropout's expectation-preserving regularization, and its F1 drops from 38.10 to 37.84 while most other conditioned methods improve.
What would settle it
Rerun each configuration (no augmentation, ROS, VGX, and the five methods in both blind and conditioned form) at least ten times with different random seeds on the same dataset and model, and plot the F1 distributions with confidence intervals; if the intervals for Stochastic Perturbation and Random Oversampling overlap substantially, the paper's headline ordering and its recommendation to prefer ROS would not be reproduced.
Extended reading notes
Core claim
On the paper's own terms, the discovery is that representation-level augmentation, previously effective for code search and code classification, transfers only weakly to vulnerability detection. The best blind method, Stochastic Perturbation, improves F1 from 34.74 to 38.10 (a 9.67% relative gain), while the conditioned variants generally outperform their blind counterparts, with Stochastic Perturbation again best at 37.84 F1. Random Oversampling — simply repeating vulnerable training samples until the classes balance — improves F1 to 38.50 (10.82% relative gain) and beats every augmentation method in both settings. The paper also finds that the vulnerability-generation baseline VGX fails to improve over no augmentation, and concludes that all five representation-level methods are preferable to VGX for large-scale balancing.
Load-bearing premise
The entire comparison rests on a single training run per configuration; the gaps between Stochastic Perturbation, its conditioned variant, and Random Oversampling are small enough that unmeasured run-to-run variance could reorder the methods.
Editorial extensions
If this is right
- Random Oversampling should be the default baseline for class-imbalance handling in deep learning-based vulnerability detection, since it outperforms all five representation-level methods despite being the simplest approach.
- Stochastic Perturbation is the best representation-level choice when the class ratio is kept and only the minority class is augmented, giving the largest F1 gain among the augmentation methods.
- Conditioning augmentation on vulnerable lines helps most methods, so future representation-level augmentation should exploit line-level vulnerability labels rather than augmenting blindly.
- The vulnerability-generation approach VGX is not useful for large-scale balancing of real-world datasets without manual checking, since it failed to beat no augmentation in this setup.
- Noise injection at the embedding level is a weak substitute for duplicating real vulnerable samples; the paper attributes this to the noise in synthetically mixed vectors acting as a regularizer that limits learning.
Reading between the lines
- The noise explanation suggests a testable extension: augmentation methods that constrain the generated embedding to stay near the vulnerable-sample manifold, for example by projecting the mixed vector back toward the original embedding, should outperform naive stochastic perturbation if the noise story is right.
- If the result generalizes across models and languages, then the practical value of embedding-level Mixup-style augmentation for vulnerability detection is limited to settings where sampling is impossible, such as privacy-preserving or continuously changing code representations.
- The small F1 gaps between Stochastic Perturbation and Random Oversampling, together with the single-run protocol, imply that the ordering should be re-examined with repeated runs before being treated as a stable ranking.
- The finding that conditioned augmentation helps most methods but hurts Stochastic Perturbation suggests that the interaction between augmentation and the model's own regularization, such as dropout in the classifier, deserves direct study.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents an empirical study of five representation-level (embedding) augmentation methods—Linear Interpolation, Stochastic Perturbation, Linear Extrapolation, Binary Interpolation, and Gaussian Scaling—for deep learning-based vulnerability detection using LineVul and the BigVul dataset. Each method is applied in a blind form and in a novel conditioned form that keeps the embeddings of vulnerable lines fixed. The authors compare against no augmentation, Random Oversampling (ROS), and the VGX generation method. The central findings are that Stochastic Perturbation is the best representation-level method (blind F1 38.10 versus baseline 34.74, relative improvement 9.67%), that all representation-level methods beat VGX, and that none of them surpasses ROS (F1 38.50, improvement 10.82%). The paper recommends ROS for class balancing and identifies Stochastic Perturbation as the best embedding-level alternative.
Significance. If the findings are reproducible, the paper provides useful practical guidance for vulnerability detection research: ROS remains a strong, simple baseline, and embedding-level augmentation is a weak secondary option. The first systematic study of representation-level augmentation for DLVD and the conditioned augmentation variant are novel contributions. The artifact is publicly available on Zenodo, supporting replication. However, the empirical foundation is currently too weak to support the specific ordering of methods because all results come from single runs with no variance reporting or significance testing, and several differences between key methods are smaller than typical run-to-run variation.
major comments (3)
- [Section 4 (Tables 3 and 4)] All results in Tables 3 and 4 come from a single training run per configuration, and no standard deviations, confidence intervals, or significance tests are reported. The paper's central comparative claims rest on small differences: ROS (F1 38.50) versus blind Stochastic Perturbation (38.10) is a 0.40-point gap, and blind Stochastic Perturbation (38.10) versus the conditioned variant (37.84) is a 0.26-point gap. Because LineVul and BigVul are known to exhibit nontrivial seed-to-seed variance, these gaps may be within run-to-run noise. Without repeated runs (e.g., 5–10 seeds) and accompanying statistical tests, Findings 1 and 2 (SP is the best augmentation; none can beat ROS) are not established. Please provide multi-seed results with means and standard deviations and a paired significance test (e.g., Wilcoxon signed-rank or bootstrap) across seeds, or otherwise justify why a single run is sufficient for the claimed ordering.
- [Section 5.1] The discussion attributes the 0.26-point F1 drop of Stochastic Perturbation under conditioning (38.10 vs 37.84) to a mechanistic difference in dropout expectation. Given that no variance information is reported, this difference is plausibly noise, and the mechanistic explanation is therefore speculative. Please either support the claim with significance testing and, ideally, an ablation that isolates the conditioning effect, or reframe the passage as a hypothesis rather than a finding.
- [Section 3.3] All augmentation methods are evaluated at a single augmentation ratio (23 copies per line-annotated vulnerable sample), and no sensitivity analysis is provided. The relative ordering of methods, and in particular the claim that no representation-level method can beat ROS, may depend on this ratio. Please either vary the augmentation ratio (e.g., 10, 23, 50) or explicitly justify why the chosen ratio is sufficient to support the general recommendation in Section 5.4.
minor comments (5)
- [Abstract and Section 1] The Abstract reports the best augmentation gain as 9.67%, whereas the Introduction (Section 1) reports 9.96% for the same Stochastic Perturbation result; please correct the inconsistency.
- [Section 2.3] In the Gaussian Scaling bullet, "with small values of α" appears to mean "small values of σ", since α is set to 1; please fix the notation. Also, in Binary Interpolation, α∈{0,1}^e uses the symbol e without defining it; please define the embedding dimension.
- [Section 1] The sentence "Sections 5, 6 and 6" should be "Sections 5 and 6".
- [Section 3.3] The phrase "augmented the data at a rate of 23" is ambiguous; clarify that this means each of the 5,895 line-annotated vulnerable samples is used to generate 22 additional copies, so the total number of generated items is 129,690.
- [Tables 3 and 4] The statement that results are "marked in blue/red" may be inaccessible in grayscale; consider adding symbols (e.g., ▲/▼) to indicate improvement/degradation.
Circularity Check
No significant circularity: the evaluation is an empirical comparison with fixed hyperparameters and independent test data; self-citations are corroborated by the paper's own experiments.
full rationale
The paper reports a direct empirical comparison of five representation-level augmentation methods, ROS, and VGX on the BigVul test split using LineVul. I find no circular reduction: no fitted parameter is estimated from the test set and then reported as a prediction; the augmentation hyperparameters (alpha ranges, p=0.1, sigma, augmentation ratio 23) are fixed a priori, mostly from prior work, and applied uniformly to all methods. The conditioned variant uses line-level vulnerability labels from the BigVul training set, which are input data rather than outputs of the method. The self-citations to Daneshvar et al. are contextual: the current paper's Tables 3 and 4 independently reproduce the claims that VGX does not beat no augmentation (F1 33.96 vs 34.74) and that ROS outperforms all augmentation methods (F1 38.50 vs best augmentation 38.10), so the central comparative findings do not rest on the self-citation. The manuscript's own limitations section acknowledges single-model and C++-only scope, and the single-run evaluation without variance reporting is a statistical robustness concern, but that is not a form of circularity. The equations in Section 2.3 define the augmentation operators and are not used to derive the empirical results tautologically. Therefore no significant circularity is present.
Assumptions & free parameters
free parameters (6)
- Linear interpolation alpha range =
U(0.9, 1.0)
- Linear extrapolation alpha range =
U(1.0, 1.1)
- Stochastic perturbation dropout probability =
p = 0.1
- Binary interpolation swap ratio =
25% of cells
- Gaussian scaling sigma =
sigma = 0.1
- Augmentation multiplicity =
22 generated per vulnerable sample (total 23x)
assumptions (4)
- domain assumption Embedding-space interpolation of two vulnerable samples preserves the vulnerability label.
- domain assumption Vulnerability is localized in specific lines, and freezing those tokens in the embedding preserves the label during augmentation.
- domain assumption Byte-Pair Encoding token-to-line matching correctly identifies the vulnerable tokens in the embedding.
- domain assumption BigVul's line-level vulnerability labels are accurate enough for supervision.
Cite this review
Pith. "Pith review of A Study on Mixup-Inspired Augmentation Methods for Software Vulnerability Detection." pith.science (2026). https://pith.science/paper/D5VPG36S
@misc{pith2026250415632,
author = {Pith},
title = {Pith review of: A Study on Mixup-Inspired Augmentation Methods for Software Vulnerability Detection},
year = {2026},
howpublished = {\url{https://pith.science/paper/D5VPG36S}},
note = {Machine review of arXiv:2504.15632}
}
read the original abstract
Various deep learning (DL) methods have recently been utilized to detect software vulnerabilities. Real-world software vulnerability datasets are rare and hard to acquire, as there is no simple metric for classifying vulnerability. Such datasets are heavily imbalanced, and none of the current datasets are considered huge for DL models. To tackle these problems, a recent work has tried to augment the dataset using the source code and generate realistic single-statement vulnerabilities, which is not quite practical and requires manual checking of the generated vulnerabilities. In this paper, we aim to explore the augmentation of vulnerabilities at the representation level to help current models learn better, which has never been done before to the best of our knowledge. We implement and evaluate five augmentation techniques that augment the embedding of the data and have recently been used for code search, which is a completely different software engineering task. We also introduced a conditioned version of those augmentation methods, which ensures the augmentation does not change the vulnerable section of the vector representation. We show that such augmentation methods can be helpful and increase the F1-score by up to 9.67%, yet they cannot beat Random Oversampling when balancing datasets, which increases the F1-score by 10.82%.
Figures
Reference graph
Works this paper leans on
-
[1]
Chris M. Bishop. 1995. Training with Noise is Equivalent to Tikhonov Regularization. Neural Computation 7, 1 (01 1995), 108–116. doi:10.1162/neco.1995.7.1.108 arXiv:https://direct.mit.edu/neco/article- pdf/7/1/108/812990/neco.1995.7.1.108.pdf Daneshvar et al
-
[2]
Nghi D. Q. Bui, Yijun Yu, and Lingxiao Jiang. 2021. Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Trans- formations. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval (<conf-loc>, <city>Virtual Event</city>, <country>Canada</country>, </con...
arXiv 2021
-
[3]
S. Chakraborty, R. Krishna, Y. Ding, and B. Ray. 2022. Deep Learning Based Vulnerability Detection: Are We There Yet? IEEE Transactions on Software Engineering 48, 09 (sep 2022), 3280–3296. doi:10.1109/TSE.2021.3087402
arXiv 2022
-
[4]
Chawla, Kevin W
Nitesh V. Chawla, Kevin W. Bowyer, Lawrence O. Hall, and W. Philip Kegelmeyer
-
[5]
Seyed Shayan Daneshvar, Yu Nong, Xu Yang, Shaowei Wang, and Haipeng Cai
-
[6]
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In North American Chapter of the Association for Computational Linguistics . https: //api.semanticscholar.org/CorpusID:52967399
2019
-
[7]
Zeming Dong, Qiang Hu, Yuejun Guo, Maxime Cordy, Mike Papadakis, Zhenya Zhang, Yves Le Traon, and Jianjun Zhao. 2023. MixCode: Enhancing Code Classification by Mixup-Based Data Augmentation. In 2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) . 379–390. doi:10.1109/SANER56733.2023.00043
arXiv 2023
-
[8]
Zeming Dong, Qiang Hu, Yuejun Guo, Zhenya Zhang, Maxime Cordy, Mike Papadakis, Yves Le Traon, and Jianjun Zhao. 2023. Boosting Source Code Learning with Data Augmentation: An Empirical Study. http://arxiv.org/abs/2303.06808 arXiv:2303.06808 [cs]
arXiv 2023
Show all 32 references
-
[9]
Jiahao Fan, Yi Li, Shaohua Wang, and Tien N. Nguyen. 2020. A C/C++ Code Vulnerability Dataset with Code Changes and CVE Summaries. In Proceedings of the 17th International Conference on Mining Software Repositories (MSR ’20) . Association for Computing Machinery, New York, NY,...
2020
- [10]
-
[11]
Michael Fu and Chakkrit Tantithamthavorn. 2022. LineVul: a transformer-based line-level vulnerability prediction. In Proceedings of the 19th International Con- ference on Mining Software Repositories (MSR ’22) . Association for Computing Machinery, New York, NY, USA, 608–620. ...
2022
-
[12]
Hongyu Guo, Yongyi Mao, and Richong Zhang. 2019. Augmenting Data with Mixup for Sentence Classification: An Empirical Study. ArXiv abs/1905.08941 (2019). https://api.semanticscholar.org/CorpusID:162168620
2019 arXiv
-
[13]
Ali Babar
David Hin, Andrey Kan, Huaming Chen, and M. Ali Babar. 2022. LineVD: Statement-Level Vulnerability Detection Using Graph Neural Networks. In Pro- ceedings of the 19th International Conference on Mining Software Repositories (Pittsburgh, Pennsylvania) (MSR ’22). Association for...
2022
-
[14]
Haochen Li, Chunyan Miao, Cyril Leung, Yanxian Huang, Yuan Huang, Hongyu Zhang, and Yanlin Wang. 2022. Exploring Representation-level Augmentation for Code Search. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing , Yoav Goldberg, Zornit...
2022 doi
-
[15]
Yi Li, Shaohua Wang, and Tien N. Nguyen. 2021. Vulnerability Detection with Fine-Grained Interpretations. In Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Athens, Greece) (ESEC/FS...
2021
-
[16]
Zhen Li, Deqing Zou, Shouhuai Xu, Xinyu Ou, Hai Jin, Sujuan Wang, Zhijun Deng, and Yuyi Zhong. 2018. VulDeePecker: A Deep Learning-Based System for Vulnerability Detection. In 25th Annual Network and Distributed System Security Symposium, NDSS 2018, San Diego, California, USA,...
2018
-
[17]
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. RoBERTa: A Robustly Optimized BERT Pretraining Approach. CoRR abs/1907.11692 (2019). arXiv:1907.11692 http://arxiv.org/abs/1907.11692
2019 arXiv
-
[18]
Corrado, and Jeffrey Dean
Tomas Mikolov, Kai Chen, Gregory S. Corrado, and Jeffrey Dean. 2013. Efficient Estimation of Word Representations in Vector Space. In International Conference on Learning Representations. https://api.semanticscholar.org/CorpusID:5959482
2013
-
[19]
Tuan Nguyen, Trung Le, Khanh Nguyen, Olivier de Vel, Paul Montague, John Grundy, and Dinh Phung. 2020. Deep Cost-Sensitive Kernel Machine for Binary Software Vulnerability Detection. In Advances in Knowledge Discovery and Data Mining, Hady W. Lauw, Raymond Chi-Wing Wong, Alexa...
2020
-
[20]
Yu Nong, Richard Fang, Guangbei Yi, Kunsong Zhao, Xiapu Luo, Feng Chen, and Haipeng Cai. 2024. VGX: Large-Scale Sample Generation for Boosting Learning- Based Software Vulnerability Analyses. In Proceedings of the IEEE/ACM 46th International Conference on Software Engineering ...
2024
-
[22]
David Powers. 2011. Evaluation: From Precision, Recall and F-Measure to ROC, Informedness, Markedness & Correlation. Journal of Machine Learning Technolo- gies 2, 1 (2011), 37–63
2011
-
[23]
Gopi Krishnan Rajbahadur, Shaowei Wang, Yasutaka Kamei, and Ahmed E. Hassan. 2021. Impact of Discretization Noise of the Dependent Variable on Machine Learning Classifiers in Software Engineering. IEEE Transactions on Software Engineering 47, 7 (2021), 1414–1430. doi:10.1109/T...
2021
-
[24]
Oliva, Yasutaka Kamei, and Ahmed E
Gopi Krishnan Rajbahadur, Shaowei Wang, Gustavo A. Oliva, Yasutaka Kamei, and Ahmed E. Hassan. 2022. The Impact of Feature Importance Methods on the Interpretation of Defect Classifiers. IEEE Transactions on Software Engineering 48, 7 (2022), 2245–2261. doi:10.1109/TSE.2021.3056941
2022
-
[25]
Riccardo Scandariato, James Walden, Aram Hovsepyan, and Wouter Joosen. 2014. Predicting Vulnerable Software Components via Text Mining. IEEE Transactions on Software Engineering 40, 10 (2014), 993–1006. doi:10.1109/TSE.2014.2340398
2014
-
[26]
Khoshgoftaar, and Jason Van Hulse
Chris Seiffert, Taghi M. Khoshgoftaar, and Jason Van Hulse. 2009. Improving software-quality predictions with data sampling and boosting. Trans. Sys. Man Cyber. Part A 39, 6 (Nov. 2009), 1283–1294. doi:10.1109/TSMCA.2009.2027131
2009
-
[27]
Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N
Ashish Vaswani, Noam M. Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is All you Need. In Neural Information Processing Systems . https://api.semanticscholar.org/ CorpusID:13756489
2017
-
[28]
Nguyen, Shaohua Wang, Yi Li, Jiyuan Zhang, and Aashish Yadavally
Wenbo Wang, Tien N. Nguyen, Shaohua Wang, Yi Li, Jiyuan Zhang, and Aashish Yadavally. 2023. DeepVD: Toward Class-Separation Features for Neural Network Vulnerability Detection. In Proceedings of the 45th International Conference on Software Engineering (Melbourne, Victoria, Au...
2023
-
[29]
Xu Yang, Shaowei Wang, Yi Li, and Shaohua Wang. 2023. Does Data Sampling Improve Deep Learning-Based Vulnerability Detection? Yeas! and Nays!. In Proceedings of the 45th International Conference on Software Engineering (ICSE ’23). IEEE Press, Melbourne, Victoria, Australia, 22...
2023
-
[30]
Hongyi Zhang, Moustapha Cissé, Yann Dauphin, and David Lopez-Paz. 2017. mixup: Beyond Empirical Risk Minimization. ArXiv abs/1710.09412 (2017). https: //api.semanticscholar.org/CorpusID:3162051
2017 arXiv
-
[31]
Yaqin Zhou, Shangqing Liu, Jingkai Siow, Xiaoning Du, and Yang Liu. 2019. De- vign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networks. In Advances in Neural Information Pro- cessing Systems, H. Wallach, H. Larochelle, ...
2019
-
[2002]
SMOTE: Synthetic Minority over-Sampling Technique. J. Artif. Int. Res. 16, 1 (jun 2002), 321–357
2002
-
[2024]
arXiv preprint arXiv:2408.04125 (2024)
Exploring RAG-based Vulnerability Augmentation with LLMs. arXiv preprint arXiv:2408.04125 (2024)
2024 arXiv
Reviewed August 16, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.