Saved in:
Bibliographic Details
Main Authors: Mozumder, Nusrat Jahan, Toledo, Felipe, Dola, Swaroopa, Dwyer, Matthew B.
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2504.02737
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915477984378880
author Mozumder, Nusrat Jahan
Toledo, Felipe
Dola, Swaroopa
Dwyer, Matthew B.
author_facet Mozumder, Nusrat Jahan
Toledo, Felipe
Dola, Swaroopa
Dwyer, Matthew B.
contents Testing allows developers to determine whether a system functions as expected. When such systems include deep neural networks (DNNs), Testing becomes challenging, as DNNs approximate functions for which the formalization of functional requirements is intractable. This prevents the application of well-developed approaches to requirements-based testing to DNNs. To address this, we propose a requirements-based testing method (RBT4DNN) that uses natural language requirements statements. These statements use a glossary of terms to define a semantic feature space that can be leveraged for test input generation. RBT4DNN formalizes preconditions of functional requirements as logical combinations of those semantic features. Training data matching these feature combinations can be used to fine-tune a generative model to reliably produce test inputs satisfying the precondition. Executing these tests on a trained DNN enables comparing its output to the expected requirement postcondition behavior. We propose two use cases for RBT4DNN: (1) given requirements defining DNN correctness properties, RBT4DNN comprises a novel approach for detecting faults, and (2) during development, requirements-guided exploration of model behavior can provide developers with feedback on model generalization. Our further evaluation shows that RBT4DNN-generated tests are realistic, diverse, and aligned with requirement preconditions, enabling targeted analysis of model behavior and effective fault detection.
format Preprint
id arxiv_https___arxiv_org_abs_2504_02737
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle RBT4DNN: Requirements-based Testing of Neural Networks
Mozumder, Nusrat Jahan
Toledo, Felipe
Dola, Swaroopa
Dwyer, Matthew B.
Software Engineering
Artificial Intelligence
Machine Learning
Testing allows developers to determine whether a system functions as expected. When such systems include deep neural networks (DNNs), Testing becomes challenging, as DNNs approximate functions for which the formalization of functional requirements is intractable. This prevents the application of well-developed approaches to requirements-based testing to DNNs. To address this, we propose a requirements-based testing method (RBT4DNN) that uses natural language requirements statements. These statements use a glossary of terms to define a semantic feature space that can be leveraged for test input generation. RBT4DNN formalizes preconditions of functional requirements as logical combinations of those semantic features. Training data matching these feature combinations can be used to fine-tune a generative model to reliably produce test inputs satisfying the precondition. Executing these tests on a trained DNN enables comparing its output to the expected requirement postcondition behavior. We propose two use cases for RBT4DNN: (1) given requirements defining DNN correctness properties, RBT4DNN comprises a novel approach for detecting faults, and (2) during development, requirements-guided exploration of model behavior can provide developers with feedback on model generalization. Our further evaluation shows that RBT4DNN-generated tests are realistic, diverse, and aligned with requirement preconditions, enabling targeted analysis of model behavior and effective fault detection.
title RBT4DNN: Requirements-based Testing of Neural Networks
topic Software Engineering
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2504.02737