Value functions and normalizers¶
A value function turns a coalition’s model output into the payoff \(v(S)\); a normalizer rescales finished attributions for display.
Contract and families¶
Each built-in declares its range, whether it reads the full-prompt answer \(y_N\),
backend needs and any extra model with its per-coalition cost
(ValueInfo):
|
Range |
Reads \(y_N\) |
Needs |
Extra model |
Cost per coalition |
Direction |
|---|---|---|---|---|---|---|
|
[-1, 1] |
yes |
Hugging Face encoder (default roberta-large) |
one encoder pass |
higher is better |
|
|
[-inf, inf] |
no |
teacher_forcing |
one forward pass |
higher is better |
|
|
[-1, 1] |
yes |
embeddings |
sentence-transformers encoder (default all-MiniLM-L6-v2) |
one encoder pass |
higher is better |
|
[1, 5] |
yes |
judge |
judge model (any backend; logits preferred) |
one judge call |
higher is better |
|
[-inf, inf] |
no |
teacher_forcing |
one forward pass |
higher is better |
|
|
[-inf, 0] |
no |
logprobs |
string work |
higher is better |
|
|
[-13.8155, 13.8155] |
yes |
Hugging Face NLI model (default deberta-large-mnli) |
one encoder pass |
higher is better |
|
|
[0, 1] |
yes |
string work |
higher is better |
||
|
[-inf, 0] |
no |
logprobs |
string work |
higher is better |
|
|
[0, 1] |
yes |
Hugging Face encoder (default roberta-base) |
one encoder pass |
higher is better |
|
|
[-1, 1] |
yes |
audio |
WavLM-style speech encoder (default wavlm-large) |
one encoder pass |
higher is better |
|
[-inf, 0] |
yes |
teacher_forcing |
one forward pass |
higher is better |
|
|
[-inf, 0] |
yes |
teacher_forcing |
one forward pass |
higher is better |
|
|
[0, 1] |
yes |
string work |
higher is better |
||
|
[-inf, inf] |
yes |
audio |
speech recognizer (default whisper-base) plus the wrapped one |
one encoder pass |
higher is better |
Using value functions maps use cases to functions. Formulas, with \(x_S\) the prompt with players \(S\) present and \(y_S\) its answer:
Plugin key |
Utility |
Reference |
|---|---|---|
|
Cosine of TF-IDF vectors of \(y_S\) and \(y_N\), IDF frozen on the run |
TokenSHAP |
|
Cosine of sentence embeddings of \(y_S\) and \(y_N\) (default
|
Reimers and Gurevych 2019 (arXiv:1908.10084) |
|
\(\frac{1}{|y_S|}\sum_t \log p(y_{S,t} \mid x_S, y_{S,<t})\), the confidence in the coalition’s own answer |
|
|
\(\frac{1}{\ell}\sum_t \log p(y_{N,t} \mid y_{N,<t}, x_S)\), the
teacher-forced log probability of \(y_N\) ( |
MExGen (arXiv:2403.14459), Captum (arXiv:2312.05491) |
|
\(-\sum_t \mathrm{JSD}\big(P(\cdot \mid y_{N,<t}, x_N)\,\Vert\, P(\cdot \mid y_{N,<t}, x_S)\big)\) |
ARC-JSD (arXiv:2505.16415) |
|
\(\log p(t \mid x_S) - \log p(f \mid x_S)\) for a target \(t\) and a foil \(f\) |
Yin and Neubig 2022 (arXiv:2202.10419) |
|
\(\log p(t \mid x_S) - \log \sum_{l \ne t} p(l \mid x_S)\) over the labels of a closed-answer task |
Yin and Neubig 2022 (arXiv:2202.10419) |
|
\(F_1\) of greedy token matching of encoder states, \(R = \frac{1}{|y_N|}\sum_i \max_j \cos(e_i, \hat e_j)\) |
Zhang et al. 2020 (arXiv:1904.09675) |
|
\(\log\frac{p}{1-p}\) with \(p = \sqrt{p_{N\to S}\,p_{S\to N}}\), the entailment probabilities |
Kuhn et al. 2023 (arXiv:2302.09664), MExGen |
|
\(\sum_i \alpha_i \cos(e_{g_i}, e_{h_i})(1-\mathrm{MER}_i) / \sum_i \alpha_i\), \(\alpha_i = \cos(e_{g_i}, e_y)\) |
Sasindran et al. 2024 (arXiv:2401.07506) |
|
\(\frac{1}{N_S}\sum_i \max_j \cos(\hat z_i, z_j)\) over WavLM frames |
Saeki et al. 2024 (arXiv:2401.16812) |
|
A text value function on recogniser transcripts of \(y_S\), \(y_N\) |
|
|
\(\sum_{g=1}^{5} g\,p(g \mid \text{judge prompt})\) |
G-Eval (arXiv:2303.16634) |
|
\(1 - \min(1, \mathrm{WER}(y_S, \text{reference}))\) |
tf_jsd is at most \(\log 2\) per position. It keeps each distribution’s top_k
tokens plus one bucket for the rest: exact if top_k covers the vocabulary, else a lower
bound.
Fixed payoffs¶
Above temperature zero, two generations of one coalition differ and efficiency breaks. So
each distinct coalition is generated once per run and reused (dedup.enabled: auto at any
temperature); exact estimators stay efficient. The manifest records temperature, top-k, seed
and dedup policy.
Frozen TF-IDF¶
tfidf_cosine fits IDF once, on the base generation and all coalition outputs, so a
run’s payoffs share one scale.
Normalizers¶
Normalizers run after aggregation.
Key |
Transform |
Running example |
|---|---|---|
|
none |
0.117, 0.161, 0.213, 0.148, −0.020, 0.147 |
|
divide by the sum of absolute values |
0.145, 0.199, 0.264, 0.184, −0.025, 0.183 |
|
shift to non-negative, raise to option |
same as |
|
scale to \([0, 1]\), then to sum 1 |
0.154, 0.204, 0.263, 0.190, 0.000, 0.189 |
Input: the efficiency example of Shapley values and axioms (absolute sum 0.805). min_max
maps “plan” to 0, hiding its negative sign.
Archives keep generations and teacher-forced scores, not payoffs. reanalyze recomputes
payoffs and attributions with the runner’s value function and normalizer, so both can change
without model calls. rescore adds forward passes for teacher-forced functions, never
generations.