What problem does it solve?
This Skill helps construct probability distributions that meet precise statistical constraints such as target forward/backward KL divergence, target entropy, or specified moment conditions, reducing trial-and-error and ensuring mathematically consistent solutions.
Core Features & Use Cases
- Feasibility and degrees-of-freedom analysis: Assess whether constraints are solvable and how many parameters are required.
- Efficient parameterizations: Use two-group or multi-group closed-form parameterizations, softmax/exponential-family logits, or continuous parameterizations for large vocabularies.
- Optimization strategies: Recommend root-finding, least-squares, gradient-free optimizers, and discrete grid searches for mixed discrete/continuous parameter spaces.
- Verification and robustness: Provide numerical checks for positivity, normalization, KL/entropy tolerances, and common pitfalls for large-scale problems.
- Use case: Calibrate a discrete token distribution to achieve specified forward and backward KL relative to a known prior while minimizing parameter complexity.
Quick Start
Construct a discrete distribution over the specified vocabulary that attains the given forward and backward KL targets relative to the provided prior and return the probability vector plus verification metrics.