diffusion_design
Select and validate scalar diffusion factors for robust or heavy-tailed minimum Stein discrepancy estimators.
SKILL.mdbasicagent-skill/skill_library/paperbench/bam/skill/minimum_stein_discrepancy/diffusion_design/SKILL.md
GitHubDiffusion Choice For Robust Estimation
Use this skill when a Minimum Stein Discrepancy recovery needs to choose the diffusion factor used inside a Stein operator. The skill is appropriate for one-dimensional scalar proxies of the paper's diffusion choices, especially Student-t heavy-tail examples and robust decaying factors for outliers.
Inputs
- Model family or recovery scenario:
ordinary,student_t_heavy_tail, orrobust_decay. - Current parameter value and sample points.
- Optional hyperparameters such as scale, degrees of freedom, and decay exponent.
Outputs
- A diffusion function or JSON table of diffusion values.
- Diagnostics: min, max, positivity, finiteness, and monotonicity checks relevant to the chosen family.
- Metadata explaining why the diffusion is mechanism-faithful for the paper.
Workflow
- Use
ordinarywhen validating baseline Langevin KSD behavior. - Use
student_t_heavy_tailfor Section 4.2-style non-standardised Student-t recovery; values increase with distance from location. - Use
robust_decayfor Section 4.3-style corruption recovery; values decay for large absolute observations. - Validate all values before passing the function to a Stein-kernel loss.
- Save the configuration and diagnostics in the recovery logs.
Validation
Run python tests/test_diffusion_design.py or validate the whole skill tree with tests. The tests check positivity, finiteness, and intended directional behavior.
Limitations
The bundled implementation returns scalar one-dimensional factors. It does not claim to validate all matrix-valued diffusion tensors in the paper.
Refinement cycle 2 note
Robust-decay ablation confirmed outlier downweighting; recovery logs should preserve near_value and far_value when validating robust diffusions.