Latent Anchor-Driven Test Generation for Deep Neural Networks
Title: Latent Anchor-Driven Test Generation for Deep Neural Networks
Original: arXiv:2606.04310v1 Announce Type: new Abstract: Deep Neural Networks (DNNs) are increasingly being deployed in security-critical and safety-sensitive applications, which makes rigorous testing essential to identify and mitigate model weaknesses. Existing DNN testing approaches explore either the input space or a learned latent space. While latent-space generation can better maintain plausibility than direct input-space mutation, current methods still face a trade-off among exploration controllability, failure diversity, and seed-relative semantic drift. To overcome these limitations, we propose Latte, a black-box testing framework that generates semantically proximate, diverse, and fault-revealing test cases by leveraging the latent space. Specifically, Latte encodes each input seed with a pre-trained VQ-VAE and performs a seed-centered, one-step latent mutation along directions defined by anchors sampled from alternative classes, followed by quantization and decoding back to the input space. This explores local neighborhoods around each seed within the learned latent manifold, resulting in a larger number and broader diversity of oracle-triggering prediction discrepancies under the same budget. We evaluated Latte on 5 datasets and 10 DNN models in single-model and multi-model testing scenarios. Across the evaluated datasets and models, Latte improves fault exposure and behavioral diversity under matched testing budgets. Under the single-model setting, it also maintains low seed-relative semantic drift with respect to the source seeds.
Rewritten:
Title: Latent Anchor-Driven Test Generation for Deep Neural Networks
Abstract: As Deep Neural Networks (DNNs) are increasingly integrated into applications where safety and security are paramount, rigorous testing has become crucial for detecting and addressing model vulnerabilities. Current DNN testing strategies typically focus on either the raw input space or a learned latent representation. Although generating tests within a latent space generally preserves plausibility more effectively than mutating inputs directly, existing techniques struggle to balance exploration control, the diversity of failures uncovered, and semantic drift relative to the original seeds. To address these challenges, we introduce Latte, a black-box testing framework designed to produce test cases that are semantically close to the original inputs, highly diverse, and effective at revealing faults by utilizing the latent space.
Latte operates by encoding input seeds using a pre-trained VQ-VAE. It then executes a single-step mutation in the latent space, centered on each seed and directed by anchors derived from different classes. Afterward, the mutated vectors are quantized and decoded to return to the input space. By probing the local neighborhoods surrounding each seed within the learned latent manifold, Latte identifies a greater volume and wider variety of prediction discrepancies that trigger oracles, all within the same computational budget. Our evaluation of Latte involved 10 DNN models across 5 datasets, covering both single-model and multi-model testing contexts. The results demonstrate that Latte enhances both fault exposure and behavioral diversity compared to baseline methods under equivalent testing budgets. Furthermore, in single-model scenarios, Latte successfully preserves low seed-relative semantic drift relative to the initial seeds.
Source: arXiv Generated at: 2026-06-04 00:00:00 UTC




