An Empirical Study on the Correlation between Neuron Coverage and Code Coverage
Yahui Li, Guangjie Li · 2023
Deep learning techniques have been widely used in many important areas. Therefore, testing of deep neural network is very important. In recent years, a few neuron coverage metrics have been proposed that are similar to the concept of traditional code coverage metrics. However, it is little known how such neuron coverage metrics are related to the traditional code coverage metrics. In this paper, we propose an automated approach to correlating neuron coverage to traditional code coverage and based on the approach we conduct an empirical study on the correlation between neuron coverage and code coverage. The experimental results confirm that neuron coverage is positive correlate to code coverage in testing individual Java methods. Our result also suggests that we do not have to reach a high neuron coverage because it may request much more test cases than those requested by high code coverage. To the best of our knowledge, we are the first to investigate the correlation between neuron coverage and code coverage.