技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
attacks【数据与研究】Foolbox adversarial-attack guidance for selecting fixed-epsilon, minimization, gradient, decision-based, score-based, stochastic, spatial, dataset, EOT, and custom attack workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route when the task is to generate adversarial examples, compare
robust accuracy, choose an attack by threat model, configure criteria or
distances, or implement a new attack. Read
references/attack-overview.md to choose a
family, references/api-reference.md for call
semantics, and references/workflows.md for recipes.
The scripts/ path below is relative to the generated Foolbox skill root, not
to a native Foolbox checkout and not to the caller's current directory. From
any cwd, use the directory containing the root SKILL.md:
# Replace this non-executable placeholder with the absolute directory containing the root SKILL.md.
export SKILL_ROOT=/path/to/installed/skills/disco/foolbox
cd "$SKILL_ROOT"
Use the actual skill-root path when it differs from this installation. Keep
plots and other generated artifacts in an explicit absolute output directory or
"$SKILL_ROOT/outputs/"; never rely on a plot filename resolving to the native
checkout or overwrite files under references/ or scripts/.
models route, check clean
accuracy, and ensure inputs lie inside the declared bounds.TargetedMisclassification criterion. Confirm
the concrete attack supports that criterion.epsilons as a scalar for one budget or a sequence to compare
budgets in one call.clipped outputs for visualizing or measuring budgeted adversarials; use
success to calculate attack success and robust accuracy.Run the helper below for a safe NumPy noise plus DatasetAttack check. Framework gradient attacks require an installed framework and are not proved by the CPU smoke.
cd "$SKILL_ROOT"
python sub-skills/attacks/scripts/smoke_attacks.py --help
python sub-skills/attacks/scripts/smoke_attacks.py
The helper is also linked at scripts/smoke_attacks.py.
FGSM/FGM, LinfPGD, L2PGD, basic iterative, momentum,
Adam-PGD; requires differentiable framework tensors.SpatialAttack searches rotations/translations and has
no normal epsilon argument; it expects 4-D image batches.Use references/troubleshooting.md for
unsupported criteria, missing distances, invalid epsilons, bounds, channel
axes, and optional-backend failures. For authoring, read
references/attack-authoring.md.