We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs.SE

Change to browse by:

cs

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Software Engineering

Title: An Annotation-based Approach for Finding Bugs in Neural Network Programs

Abstract: As neural networks are increasingly included as core components of safety-critical systems, developing effective testing techniques specialized for them becomes crucial. The bulk of the research has focused on testing neural-network models; but these models are defined by writing programs, and there is growing evidence that these neural-network programs often have bugs too.
This paper presents aNNoTest: an approach to generating test inputs for neural-network programs. A fundamental challenge is that the dynamically-typed languages (e.g., Python) commonly used to program neural networks cannot express detailed constraints about valid function inputs (e.g., matrices with certain dimensions). Without knowing these constraints, automated test-case generation is prone to producing invalid inputs, which trigger spurious failures and are useless for identifying real bugs. To address this problem, we introduce a simple annotation language tailored for concisely expressing valid function inputs in neural-network programs. aNNoTest takes as input an annotated program, and uses property-based testing to generate random inputs that satisfy the validity constraints. In the paper, we also outline guidelines that simplify writing aNNoTest annotations.
We evaluated aNNoTest on 19 neural-network programs from Islam et al's survey., which we manually annotated following our guidelines -- producing 6 annotations per tested function on average. aNNoTest automatically generated test inputs that revealed 94 bugs, including 63 bugs that the survey reported for these projects. These results suggest that aNNoTest can be a valuable approach to finding widespread bugs in real-world neural-network programs.
Comments: New content: (1) discussing test oracles in the related work section, (2) adding future work, and (3) discussing the possibility of using other back-ends
Subjects: Software Engineering (cs.SE)
DOI: 10.1016/j.jss.2023.111669
Cite as: arXiv:2112.05567 [cs.SE]
  (or arXiv:2112.05567v4 [cs.SE] for this version)

Submission history

From: Mohammad Rezaalipour [view email]
[v1] Fri, 10 Dec 2021 14:28:54 GMT (169kb,D)
[v2] Tue, 28 Dec 2021 19:09:59 GMT (169kb,D)
[v3] Mon, 24 Oct 2022 10:23:56 GMT (260kb,D)
[v4] Tue, 24 Jan 2023 11:08:35 GMT (264kb,D)

Link back to: arXiv, form interface, contact.