AI
New Testing Framework Uses Latent Space to Expose Hidden Flaws in Neural Networks
Researchers introduce Latte, a black-box testing method that generates diverse, realistic test cases by exploring the learned latent space of deep neural networks.
Ensuring reliability in deep neural networks deployed in safety-critical systems requires robust testing methods that can uncover model vulnerabilities. A new research paper presents Latte, a testing framework designed to generate semantically similar yet diverse test cases that reveal previously hidden failures in DNNs.
The Challenge of DNN Testing#
Existing approaches to testing neural networks face a fundamental tension. Methods that mutate inputs directly often produce unrealistic examples that may not reflect real-world conditions. By contrast, testing in the learned latent space—a compressed representation learned by the model—can create more plausible variations but struggles with balancing three competing needs: exploration controllability (guided search), failure diversity (finding many different types of faults), and semantic stability (staying close to original inputs).
How Latte Works#
The framework operates in the latent space by encoding seed inputs using a pre-trained VQ-VAE (a type of neural autoencoder). Rather than random exploration, Latte performs targeted one-step mutations along directions defined by anchors—reference points sampled from alternative data classes. After mutation and quantization, the modified latent vectors are decoded back into the input space, creating test cases that explore neighborhoods around each seed within the learned manifold.
This approach yields several benefits:
- More oracle-triggering discrepancies (prediction failures) within the same testing budget
- Broader diversity of behavioral failures
- Reduced semantic drift relative to source inputs
Validation and Results#
The researchers evaluated Latte across 5 datasets and 10 DNN models under both single-model and multi-model testing scenarios. Across all evaluations, the method demonstrated improved fault exposure and behavioral diversity compared to matched baselines, while maintaining low semantic deviation from the original seeds in single-model settings.
The work addresses a real gap in neural network testing for safety-sensitive applications, offering a more systematic way to explore latent representations and uncover model weaknesses.

