DDPM-PA Recovery Harness
Use this skill when full DDPM-PA few-shot image generation is blocked by missing checkpoints, datasets, or image-quality evaluators, but soft-mode recovery permits a declared mechanism-faithful proxy. The skill combines the adaptation protocol, pairwise image preservation, high-frequency preservation, high-frequency MSE, and an optimizer update into an auditable reduced experiment.
Do not use this skill to claim full FID or Intra-LPIPS reproduction unless a real pretrained DDPM, target images, sampling loop, and evaluators ran. In proxy mode it validates the adaptation mechanism, not the paper's final image metric.
Inputs
- Module-plan recovery target metadata.
- Runtime handoff explaining full-runtime blockers and soft-mode permission.
- Generated skill script roots for protocol, pairwise loss, and Haar high-frequency loss.
- Lambda weights consistent with the paper:
lambda2andlambda3in[0.1, 1.0],lambda4in[0.01, 0.08]unless an ablation intentionally changes them.
Outputs
training_trace.jsonwith loss values, component losses,params_before,params_after, and optimizer evidence.- Mechanism checks for shared noising, x0 reconstruction, image pairwise KL, high-frequency pairwise KL, high-frequency MSE, and parameter update.
- A recovery metric such as
combined_loss_deltagenerated by an executable command.
Workflow
- Read the module plan and runtime handoff before selecting proxy mode.
- Construct a tiny deterministic target batch and scalar trainable adapted-denoiser parameters.
- Use generated module scripts to compute noised/reconstructed samples, pairwise KL, and high-frequency losses.
- Combine loss components using paper-consistent lambda weights.
- Estimate a deterministic finite-difference gradient and update adapted parameters.
- Save traces and mechanism checks; never hand-write final metrics outside the command.
Validation
Run:
python scripts/proxy_step.py --output /tmp/ddpm_pa_proxy.json
python -m pytest tests
The tests assert finite loss, changed parameters, complete mechanism booleans, and target-compatible output fields.
Limitations
The default script is intentionally tiny and standard-library only. It is a proxy for the DDPM-PA loss geometry and optimizer execution, not an image generation benchmark.
Cycle 1 refinement note
A zero-pairwise ablation must be recorded as an ablation rather than a valid DDPM-PA mechanism run, because it removes both source-referenced preservation losses even if the base proxy loss still decreases.