|
Download docs/api/ia_utils_adversarial_vector_attack.md from Tatopenn/dense-Evolution: direct link, hf CLI and curl.
- Browser
- Download file 1.95 kB
-
https://huggingface.co/Tatopenn/dense-Evolution/resolve/main/docs/api/ia_utils_adversarial_vector_attack.md
- Command line
-
hf download hf://Tatopenn/dense-Evolution/docs/api/ia_utils_adversarial_vector_attack.md
-
curl -L -o ia_utils_adversarial_vector_attack.md https://huggingface.co/Tatopenn/dense-Evolution/resolve/main/docs/api/ia_utils_adversarial_vector_attack.md
1.95 kB
| # IA Utils β Adversarial Vector Attack | |
| A gradient-based (PGD-style) stress test for | |
| [`enhanced_dense_healing_hybrid`](ia_utils_vector_healing.md)'s | |
| Phi-Trigger decision. `evaluate_phi_trigger` | |
| ([`dense_evolution.healing`](healing.md)) thresholds `|v_dinamic|` with a | |
| hard step (not differentiable at the boundary), but `v_dinamic` itself is | |
| built entirely from JAX-differentiable operations β this crafts the | |
| *minimal* perturbation (projected into an L2 epsilon-ball) that flips the | |
| trigger either direction, rather than adding random noise and hoping. | |
| Adapted from IGME's chained-differentiable-attack idea | |
| ([arXiv:2607.27465](https://arxiv.org/abs/2607.27465), "Efficient Chained | |
| Method Ensemble for Transferable Semantic Segmentation Attacks", He & | |
| Zhang), applied here to vector sequences instead of image segmentation. | |
| ::: ia_utils.adversarial_vector_attack | |
| --- | |
| **Two directions of attack**: | |
| - `flip_to_dynamic` (evade) β make static-looking corruption pass through | |
| unhealed. | |
| - `flip_to_static` (suppress) β make genuine dynamic signal get wrongly | |
| median-replaced. | |
| Two real bugs were found and fixed during this utility's own | |
| verification, not assumed correct: the default `step_size` used to scale | |
| with the epsilon budget (a *larger* budget converged to a *worse* | |
| result β verified directly, non-monotonic in epsilon β now a small fixed | |
| default independent of epsilon), and `calculate_phi_ab`'s `[0,1]` clip | |
| saturating for inputs whose semantic distance exceeds | |
| `MAX_SEMANTIC_DISTANCE`, giving an exact-zero gradient (a real property | |
| of the formula, now detected and reported β `perturbation_norm == 0`, | |
| `success == False` β rather than silently misreported as "no better | |
| point found"). | |
| **See also**: [`ia_utils.vector_healing`](ia_utils_vector_healing.md) for | |
| the function under test, and [`dense_evolution.healing`](healing.md) for | |
| the underlying Phi-Trigger primitives. | |