Skip to content
Back to skills

Annealed Langevin Sampling

ASecurity

Run bounded annealed Langevin posterior sampling from composed score functions for score-based SBI recovery.

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
testingpython

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Annealed Langevin Sampling?

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

Security grade badge for Annealed Langevin Sampling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-annealed-langevin-sampling/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-annealed-langevin-sampling)

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

SKILL.md
---
name: annealed_langevin_sampling
description: Run bounded annealed Langevin posterior sampling from composed score functions for score-based SBI recovery.
---

# Annealed Langevin Sampling

Use this skill when a recovery needs to turn a composed F-NPSE or PF-NPSE score into posterior samples. It implements the paper's score-driven sampler in a bounded, deterministic form suitable for reduced experiments.

## Inputs

- A score callable or Gaussian target parameters for the script interface.
- Number of samples, noise levels, Langevin steps per level, step size, reference variance, and random seed.
- Optional trace output path.

## Outputs

- Posterior samples.
- Sampler trace with seed, score evaluations, reference variance, step size, and finite-sample diagnostics.

## Workflow

1. Initialize particles from the F-NPSE reference distribution, typically `N(0, I/n)`.
2. Iterate over noise/progress levels from reference to target.
3. Apply Langevin updates with the composed score and Gaussian noise.
4. Return final samples and trace details for recovery logs.
5. Use bounded sample counts and fixed seeds for fast validation.

## Validation

Run `python tests/test_annealed_langevin_sampling.py` or validate the whole skill tree.

## Limitations

This skill is a sampler. It assumes score composition has already been defined and does not validate whether the learned score is accurate.

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…