skills/skillxiv-v0.0.2-claude-opus-4.6/adversarial-flow-models/SKILL.md
Combines adversarial training with optimal transport constraints enabling deterministic, transport-optimal one-step image generation with FID 2.38 on ImageNet-256. Apply when you need fast generative models without teacher-student distillation complexity.
npx skillsauth add ADu2021/skillXiv adversarial-flow-modelsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Adversarial Flow Models unifies adversarial training with flow-based generative models by adding an optimal transport regularization term that constrains generators to learn transport-optimal mappings. This enables native one-step generation without distillation, stabilizes adversarial training on transformers, and achieves FID 2.38 on ImageNet-256 with single-step generation.
The key innovation adds an optimal transport regularization to the adversarial objective. While adversarial training learns distribution matching through min-max optimization, it doesn't guarantee learning a deterministic, Wasserstein-2 optimal transport plan like flow matching does.
Optimal Transport Loss Term: ℒ_ot^G = E_z[1/n ||G(z) - z||²_2] constrains generator outputs to match the transport plan induced by random Gaussian noise. This ensures G(z) satisfies optimal transport properties—straightness and determinism—even under adversarial training.
Combined Objective: Minimize: ℒ_adv^G + λ * ℒ_ot^G where ℒ_adv^G is the standard adversarial generator loss and λ balances both objectives.
Regularization weight selection: Start with λ = 1.0 and adjust based on FID convergence. Too high prioritizes transport optimality over distribution matching; too low loses benefits of the constraint.
Noise handling: Sample z ~ N(0, I) and pass through generator G(z). Compute both the adversarial loss (discriminator feedback) and the L2 distance ||G(z) - z||², averaging over the batch.
One-step generation: Train for native one-step inference without teacher-student distillation. Sample z once and evaluate G(z) directly—no iterative denoising.
Transformer stability: The optimal transport constraint stabilizes transformer-based generators compared to pure adversarial training, reducing training divergence and gradient scaling issues.
testing
Uses flow maps as look-ahead operators to enable principled reward-guided diffusion by predicting trajectory endpoints at any denoising step. Deploy when applying rewards or preferences to diffusion trajectories with meaningful gradients throughout generation.
testing
Train language models where each expert learns independently on closed datasets, enabling flexible inference with selective data inclusion or exclusion. 41% performance improvement while allowing users to opt out of specific data sources without retraining.
data-ai
Understand how token generation flexibility in diffusion LMs paradoxically constrains reasoning, as models exploit ordering flexibility to avoid uncertain tokens, and apply simplified approaches that preserve parallel decoding benefits. Use when optimizing diffusion-based language models for reasoning tasks.
devops
Enable LLM agents to improve continuously during deployment by constructing structured experience libraries through self-reflection on successes and failures—achieving 23% improvement on reasoning without gradient-based parameter updates or external training.