Skip to content
Back to skills

Posterior Mmd Recovery

ASecurity

Compute squared MMD for posterior samples and package score-based SBI recovery-result metadata.

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

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Posterior Mmd Recovery?

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

Security grade badge for Posterior Mmd Recovery
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-posterior-mmd-recovery/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-posterior-mmd-recovery)

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

SKILL.md
---
name: posterior_mmd_recovery
description: Compute squared MMD for posterior samples and package score-based SBI recovery-result metadata.
---

# Posterior MMD Recovery

Use this skill when evaluating posterior samples from a score-based SBI recovery against true, analytic, or reference posterior samples. It owns the metric calculation and target-metadata preservation.

## Inputs

- Recovered posterior samples.
- Reference posterior samples.
- Target metadata from `module_plan.json.fast_recovery_target`.
- Mechanism checks generated by recovery.

## Outputs

- Squared MMD using a Gaussian kernel with median-distance bandwidth.
- A threshold decision for reduced recovery.
- Recovery-result JSON fields that keep the module-plan target unchanged.

## Workflow

1. Validate that recovered and reference sample arrays are non-empty and have matching dimension.
2. Compute pairwise squared distances and median-heuristic bandwidth.
3. Compute stable biased squared MMD.
4. Copy target metadata exactly into the recovery result.
5. Record mechanism checks separately from the numeric metric.

## Validation

Run `python tests/test_posterior_mmd_recovery.py` or the Distiller skill-tree validator.

## Limitations

A low MMD is not sufficient evidence for proxy acceptance unless mechanism checks also prove the paper's score-training, score-composition, and sampling contracts were exercised.

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.