arrow
Return

CoCoFuzzing: Testing Neural Code Models With Coverage-Guided Fuzzing

delete2023-09-01
delete5
PRE
AI
M
Moshi Wei *
Y
Yuchao Huang
J
Jinqiu Yang
J
Junjie Wang
S
Song Wang
DOI:10.1109/TR.2022.3208239delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Deep learning (DL)-based code processing models have demonstrated good performance for tasks such as method name prediction, program summarization, and comment generation. However, despite the tremendous advancements, DL models are frequently susceptible to adversarial attacks, which pose a significant threat to the robustness and generalizability of these models by causing them to misclassify unexpected inputs. To address the issue above, numerous DL testing approaches have been proposed; however, these approaches primarily target testing DL applications in the domains of image, audio, and text analysis, etc., and cannot be directly applied to neural models for code due to the unique properties of programs. In this article, we propose a coverage-based fuzzing framework, CoCoFuzzing, for testing DL-based code processing models. In particular, we first propose 10 mutation operators to automatically generate validly and semantically preserving source code examples as tests, followed by a neuron coverage (NC)-based approach for guiding the generation of tests. The performance of CoCoFuzzing is evaluated using three state-of-the-art neural code models, i.e., NeuralCodeSum, CODE2SEQ, and CODE2VEC. Our experiment results indicate that CoCoFuzzing can generate validly and semantically preserving source code examples for testing the robustness and generalizability of these models and enhancing NC. Furthermore, these tests can be used for adversarial retraining to improve the performance of neural code models.
Keywords:
Codes
Testing
Fuzzing
Neurons
Software
Biological neural networks
Task analysis
Code model
deep learning (DL)
fuzzy logic
language model
robustness

Journal

IEEE Transactions on Reliability cover
IEEE Transactions on Reliability
IF:
5.7
Papers:
2.8K
Citations:
8.5K

Organization

I
institute of software, cas
Scholars:
446
Papers: 388
Citations: 0
Y
york university - canada
Scholars:
8.3K
Papers: 9.0K
Citations: 10
C
chinese academy of sciences
Scholars:
56.7W
Papers: 45.0W
Citations: 704
researcher View more organizations
Cited Papers

Cited Papers

err
IF0
err
err0
errOAAI
err
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
errShare
errSave
Regulation of urease activity inRhizobium meliloti
err1994-07-01
err0
PREAI
errGerhard Miksch; Ulrich Eberhardt
errShare
errSave
Investigation of Structural and Optical Properties of MoO[sub 3]-PbO-B[sub 2]O[sub 3]:V[sub 2]O[sub 5] Glasses
err2011-01-01
err0
PREAI
errSanjay; N. Kishore; A. Agarwal; S. K. Tripathi; Keya Dharamvir; Ranjan Kumar; G. S. S. Saini
errShare
errSave
On the generalizability of Neural Program Models with respect to semantic-preserving program transformations
err2021-07-01
err40
errOAAI
errRabin, Md Rafiqul Islam; Bui, Nghi D. Q.; Wang, Ke; Yu, Yijun; Jiang, Lingxiao; Alipour, Mohammad Amin
errShare
errSave
Acid catalysis in hydrolytic reactions
err1929-01-01
err0
PREAI
errJ. N. Brönsted; W. F. K. Wynne-Jones
errShare
errSave
researcher View more