Exact estimation

The ExactEstimator lazily enumerates every coalition, from the empty coalition to the grand coalition, and delegates attribution to an estimand plugin. Use it as ground truth on tiny player sets before trusting approximate samplers.

Enumeration scope

For \(n\) players the estimator evaluates every coalition:

\[|\mathcal{S}_{\mathrm{exact}}| = 2^n\]

Inside ExplainRunner the grand coalition \(v(N)\) is scored from the base generation (the output for the unmasked prompt), so it is served from the result store instead of a second backend call. With \(v(\emptyset)\) and \(v(N)\) both present, Shapley values satisfy efficiency: \(\sum_i \phi_i = v(N) - v(\emptyset)\). The run output exposes both payoffs as base_value and grand_value.

Complexity grows exponentially in \(n\); reserve exact estimation for toy models, sanity checks, and estimator validation.

Estimand delegation

Exact enumeration produces coalition payoffs \(v(S)\). The estimand plugin (Shapley or Banzhaf) applies coalition weights and marginal contributions:

\[\text{ExactEstimator} \rightarrow \{v(S)\}_{S} \xrightarrow{\text{EstimandAggregator}} (\phi_1, \ldots, \phi_n)\]

Monte Carlo and Neyman estimators reuse the same estimand boundary — exact estimation establishes the reference path for validating approximate samplers.

Legacy parity

The implementation matches the Shapley values of PreciseShapExplainer from legacy MLLM-Shap on additive characteristic functions; both aggregate the full \(2^n\) table. See Coming from legacy MLLM-Shap for the other differences.

Further reading