Abstract:The existing neural network fuzz testing techniques typically apply random mutations to initial samples during the test sample generation phase, resulting in low-quality generated samples and, consequently, low test coverage. To address these issues, we propose a neural network fuzz testing technique based on reinforcement learning algorithms. In this approach, we model the fuzz testing process as a Markov decision process. In this model, test samples are regarded as environmental states, and different mutation methods form a set of available actions, neuron coverage serves as a reward feedback Reinforcement learning algorithms are used to learn the optimal mutation strategy, guiding the generation of optimal test samples to achieve highest neuron coverage. Comparative experiments with mainstream neural network fuzz testing methods demonstrate that the neural network fuzz testing technique based on reinforcement learning algorithms can enhance neuron coverage at different granularities.