distribution-search

Construct probability distributions satisfying KL divergence, entropy, or moment constraints.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/bianhaifeng789-hue/openclaw-config --skill distribution-search-bianhaifeng789-hue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distribution-search
Source: https://github.com/bianhaifeng789-hue/openclaw-config/tree/main/skills/tb2/distribution-search
Command: npx skills add https://github.com/bianhaifeng789-hue/openclaw-config --skill distribution-search-bianhaifeng789-hue

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about distribution-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I construct a probability distribution that meets specific KL divergence and entropy targets?

Constructing a probability distribution with specific KL divergence and entropy targets involves applying feasibility analysis and closed-form parameterizations. This Skill uses softmax and exponential-family logits to find solutions that satisfy your statistical constraints during numerical optimization and model calibration.

What is the best way to parameterize a discrete token distribution to match a known prior?

Parameterizing a discrete token distribution is best achieved using two-group or multi-group closed-form parameterizations, or continuous parameterizations for large vocabularies. This approach calibrates the distribution to match a known prior while minimizing parameter complexity and satisfying divergence tolerances.

Can I use gradient-free optimizers and grid search for matching probability distributions to moment constraints?

Yes, you can use gradient-free optimizers and discrete grid searches for matching probability distributions to moment constraints. These optimization strategies are recommended for effectively navigating mixed discrete and continuous parameter spaces during distribution construction.

How do I verify that my probability distribution satisfies normalization and divergence tolerances?

Verifying that a probability distribution satisfies normalization and divergence tolerances requires applying numerical checks for positivity and KL/entropy tolerances. This robust verification process identifies common pitfalls and ensures mathematically consistent solutions for large-scale problems.

Does this approach support feasibility and degrees-of-freedom analysis for statistical constraints?

Yes, this approach supports feasibility and degrees-of-freedom analysis for statistical constraints. It assesses whether your constraints are solvable and determines exactly how many parameters are required before attempting numerical optimization and model calibration.