Skip to content
Back to skills

Sbi Snpe Training Loop

ASecurity

Run a bounded SNPE-style conditional posterior training loop for mechanism-faithful SBI recovery.

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

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Sbi Snpe Training Loop?

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

Security grade badge for Sbi Snpe Training Loop
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-sbi-snpe-training-loop/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-sbi-snpe-training-loop)

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

SKILL.md
---
name: sbi_snpe_training_loop
description: Run a bounded SNPE-style conditional posterior training loop for mechanism-faithful SBI recovery.
---

# SBI SNPE Training Loop

Use this skill to train or emulate a small conditional neural posterior estimator from simulated `(theta, x)` pairs and query it at an observation.

Do not use it for SNLE/SNRE objectives or for posterior validation alone.

## Inputs
- Simulated `theta` and `x` pairs.
- Prior bounds or prior metadata.
- Observation `x_o`.
- Bounded training hyperparameters and seed.

## Outputs
- Posterior samples for `x_o`.
- Training diagnostics and mechanism checks.
- Declaration of full-package or reduced/proxy execution.

## Workflow
1. Validate that `theta` and `x` are aligned and finite.
2. Fit a conditional posterior estimator that depends on `x`.
3. Sample from the estimated posterior conditioned on `x_o`.
4. Record loss/proxy diagnostics and sample summaries.
5. Mark reduced implementations as proxy recovery.

## Validation
Run:

```bash
python scripts/snpe_proxy.py --num-simulations 256 --observation 1.25
python tests/test_snpe_proxy.py
```

## Limitations
- The included script is a reduced Gaussian SNPE-style proxy for fast recovery, not the full `sbi` package.
- It must be declared as proxy recovery in soft mode.

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…