Compose F-NPSE and PF-NPSE posterior scores from learned score terms and prior corrections for SBI.
Scanned 9/9/2026
Install to Claude Code
npx -y skills add VectorSpaceLab/AREX-Skill --skill factorized_score_composition --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Factorized Score Composition?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/vectorspacelab-factorized-score-composition)More formats (shields.io, HTML) on the badges page.
---
name: factorized_score_composition
description: Compose F-NPSE and PF-NPSE posterior scores from learned score terms and prior corrections for SBI.
---
# Factorized Score Composition
Use this skill when implementing the central compositional step from F-NPSE or PF-NPSE. It turns score estimates for individual observations or small observation groups into one score for a multi-observation posterior approximation.
Do not use this skill for denoising score training or for sampling. It expects a score predictor to already exist and returns a composed score that a sampler can consume.
## Inputs
- Current `theta`.
- Time index `t` and total diffusion levels `T`.
- Observations for F-NPSE or groups for PF-NPSE.
- Prior score function, such as `-theta` for a standard normal prior.
- Score predictor for one observation or one group.
## Outputs
- Composed score vector.
- Metadata with method, observation count, group count, and prior coefficient.
- Per-term score diagnostics that can be logged for recovery evidence.
## Workflow
For F-NPSE, compute:
```text
((1 - n) * (T - t) / T) * grad_log_prior(theta) + sum_j s(theta, t, x_j)
```
For PF-NPSE, partition observations into groups of size at most `m`, compute `k` groups, and use the same formula with `k` replacing `n` and group score predictions replacing single-observation scores.
## Validation
Run:
```bash
python /share/project/yuyang/workspace/Paper2Skills/Distiller/skills/module-to-skill/scripts/validate_skill_tree.py <skill_dir> --run-tests
```
The tests verify the paper formulas, grouping behavior, and invariance to group order for deterministic score terms.
## Limitations
This skill does not decide whether score estimates are accurate. It only enforces the algebraic composition contract from the paper.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!