Skip to content
Back to skills

Proposal Posterior Transform

ASecurity

Apply APT proposal-prior log-density corrections to candidate posterior scores for likelihood-free inference.

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

Security analysis

A100/100

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Proposal Posterior Transform?

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

Security grade badge for Proposal Posterior Transform
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-proposal-posterior-transform/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-proposal-posterior-transform)

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

SKILL.md
---
name: proposal_posterior_transform
description: Apply APT proposal-prior log-density corrections to candidate posterior scores for likelihood-free inference.
---

# Proposal Posterior Transform

Use this skill when implementing Automatic Posterior Transformation (APT) training on simulations drawn from a proposal distribution rather than the prior. Do not use it for ordinary prior-only neural posterior estimation, where proposal and prior corrections cancel.

## Inputs
- `model_log_scores`: posterior log-score values for the same candidate atoms.
- `prior_log_probs`: log prior density for every candidate atom.
- `proposal_log_probs`: log proposal density for every candidate atom.

## Outputs
- `corrected_logits`: `model_log_score + proposal_log_prob - prior_log_prob` for every atom.
- `probabilities`: numerically stable softmax probabilities over corrected logits.

## Workflow
1. Confirm all arrays have equal non-zero length.
2. Add the proposal-minus-prior correction to every model score.
3. Normalize with a max-subtracted softmax.
4. Propagate impossible support through `-inf` log densities and fail if the normalized mass is invalid.

## Validation
Run `python scripts/apt_transform.py --self-test` or the skill-tree validator with tests enabled.

## Limitations
This skill implements deterministic correction math only. It does not train a neural density estimator or choose proposal schedules.

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…