Skip to content
Back to skills

Classifier Guidance Sampler

ASecurity

Apply noisy classifier log-probability gradients to reverse diffusion steps with explicit guidance-scale checks.

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 9, 2026
researchpython

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill classifier_guidance_sampler --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Classifier Guidance Sampler?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Classifier Guidance Sampler
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-classifier-guidance-sampler/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-classifier-guidance-sampler)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: classifier_guidance_sampler
description: Apply noisy classifier log-probability gradients to reverse diffusion steps with explicit guidance-scale checks.
---

# Classifier Guidance Sampler

Use this skill when implementing or auditing the paper's classifier-guided sampling mechanism. It is the central recovery skill for `Diffusion Models Beat GANs on Image Synthesis` because it verifies that `classifier_scale * grad_x log p(y | x_t, t)` changes the reverse update.

## Inputs

- Current noisy state or scalar proxy state.
- Target class label.
- Base reverse mean from a diffusion model or declared proxy update.
- Classifier log-probability gradient.
- Guidance scale and schedule variance or proxy step size.

## Outputs

- Guided state or guided reverse mean.
- Guidance vector.
- Log-probability and target-distance before and after guidance.
- Mechanism checks for recovery validation.

## Workflow

1. Compute the target class gradient with respect to the noisy input.
2. Multiply the gradient by the explicit classifier scale.
3. Add the scaled guidance contribution to the reverse diffusion mean.
4. Compare guided and unguided updates under the same base mean.
5. Record whether the target class log-probability increased and the target distance decreased.

## Validation

Run `python scripts/guidance_proxy.py --output /tmp/guidance.json`. The deterministic proxy uses a two-class Gaussian classifier and asserts that positive guidance improves the target mechanism checks.

## Limitations

This skill can support a reduced scalar proxy when checkpoints are unavailable. Such a run must be declared proxy evidence and must not be described as ImageNet FID recovery.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…