计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
linf_pgd_first_order_adversary【效率与协作】Generate random-start l-infinity PGD adversarial examples with projection diagnostics for first-order robust optimization experiments.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill to implement or verify the inner maximization step in Madry-style adversarial training and evaluation. It is appropriate when the threat model is an l-infinity ball and the model exposes an input-loss gradient.
Do not use it for l2 attacks, decision-only attacks, or natural-only evaluation.
epsilon, step_size, steps, restarts, input clip range, and random seed.step_size * sign(gradient).Run:
python scripts/linf_pgd.py --self-test
python tests/test_linf_pgd.py
This skill supplies the attack mechanism, not the outer training loop. It assumes gradients are available or analytically supplied by the model wrapper.