gaussian_mixture_recovery
Run a bounded 1D Gaussian-mixture KSD-U recovery experiment for the Kernelized Stein Discrepancy paper.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- gaussian_mixture_recovery
- description
- Run a bounded 1D Gaussian-mixture KSD-U recovery experiment for the Kernelized Stein Discrepancy paper.
02 资源文件 2
03 SKILL.md 正文
Gaussian Mixture Recovery Harness
Use this skill to create a fast, mechanism-faithful proxy recovery for the KSD goodness-of-fit paper. It constructs the paper's 1D Gaussian-mixture setting, evaluates a null model and a mean-perturbed model using KSD-U, and reports a recovery metric based on the rejection-rate gap.
Do not use this skill as a full reproduction of every Figure 1 baseline; it intentionally omits likelihood-ratio, MMD, classical CDF tests, and RBM experiments to keep recovery bounded.
Inputs
- Generated
stein_kernel_scoringskill directory. - Generated
ksd_bootstrap_gofskill directory. - Experiment parameters: sample size, trial count, bootstrap count, perturbation magnitude, alpha, and seed.
- Optional output path for recovery-compatible JSON.
Outputs
- Trial-level null and alternative decisions.
- Aggregate null and alternative rejection rates.
alternative_rejection_rate_minus_null_rejection_ratemetric.- Mechanism checks proving score-only model access, RBF Stein kernel use, U-statistic use, centered bootstrap use, and generated skill invocation.
Workflow
- Define a fixed five-component 1D Gaussian mixture with equal weights and shared variance.
- Generate samples from the true mixture for every trial.
- Evaluate null trials with the true mixture score and alternative trials with a perturbed model score.
- Compute the pairwise Stein matrix using
stein_kernel_scoring. - Calibrate each test using
ksd_bootstrap_gof. - Aggregate rejection rates and emit recovery-result-compatible JSON.
Validation
Run:
python tests/test_gaussian_mixture_recovery.py
The tests check mixture score behavior and a tiny end-to-end recovery smoke run.
Limitations
- This is a declared reduced/proxy recovery target.
- The result is seed- and budget-dependent and should be interpreted as mechanism evidence, not an exact paper-figure value.
- It does not require or read an original source repository.
Refinement Guards
Refinement guard: perturbation zero is a null-control edge case. The alternative and null scores coincide, so the rejection-rate gap should remain near zero and must not be reported as a successful sample-quality recovery.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).