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):

value_fn

Range

Reads \(y_N\)

Needs

Extra model

Cost per coalition

Direction

bertscore

[-1, 1]

yes

Hugging Face encoder (default roberta-large)

one encoder pass

higher is better

contrastive

[-inf, inf]

no

teacher_forcing

one forward pass

higher is better

embedding_cosine

[-1, 1]

yes

embeddings

sentence-transformers encoder (default all-MiniLM-L6-v2)

one encoder pass

higher is better

judge_grade

[1, 5]

yes

judge

judge model (any backend; logits preferred)

one judge call

higher is better

label_margin

[-inf, inf]

no

teacher_forcing

one forward pass

higher is better

logprob

[-inf, 0]

no

logprobs

string work

higher is better

nli_logodds

[-13.8155, 13.8155]

yes

Hugging Face NLI model (default deberta-large-mnli)

one encoder pass

higher is better

reference_wer

[0, 1]

yes

string work

higher is better

self_logprob

[-inf, 0]

no

logprobs

string work

higher is better

semascore

[0, 1]

yes

Hugging Face encoder (default roberta-base)

one encoder pass

higher is better

speech_bertscore

[-1, 1]

yes

audio

WavLM-style speech encoder (default wavlm-large)

one encoder pass

higher is better

tf_jsd

[-inf, 0]

yes

teacher_forcing

one forward pass

higher is better

tf_logprob

[-inf, 0]

yes

teacher_forcing

one forward pass

higher is better

tfidf_cosine

[0, 1]

yes

string work

higher is better

transcribed

[-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

tfidf_cosine

Cosine of TF-IDF vectors of \(y_S\) and \(y_N\), IDF frozen on the run

TokenSHAP

embedding_cosine

Cosine of sentence embeddings of \(y_S\) and \(y_N\) (default all-MiniLM-L6-v2), or of the model’s pooled states

Reimers and Gurevych 2019 (arXiv:1908.10084)

self_logprob

\(\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

tf_logprob

\(\frac{1}{\ell}\sum_t \log p(y_{N,t} \mid y_{N,<t}, x_S)\), the teacher-forced log probability of \(y_N\) (sum omits \(1/\ell\))

MExGen (arXiv:2403.14459), Captum (arXiv:2312.05491)

tf_jsd

\(-\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)

contrastive

\(\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)

label_margin

\(\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)

bertscore

\(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)

nli_logodds

\(\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

semascore

\(\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)

speech_bertscore

\(\frac{1}{N_S}\sum_i \max_j \cos(\hat z_i, z_j)\) over WavLM frames

Saeki et al. 2024 (arXiv:2401.16812)

transcribed

A text value function on recogniser transcripts of \(y_S\), \(y_N\)

judge_grade

\(\sum_{g=1}^{5} g\,p(g \mid \text{judge prompt})\)

G-Eval (arXiv:2303.16634)

reference_wer

\(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

identity (default)

none

0.117, 0.161, 0.213, 0.148, −0.020, 0.147

abs_sum

divide by the sum of absolute values

0.145, 0.199, 0.264, 0.184, −0.025, 0.183

power_shift

shift to non-negative, raise to option power (default 1), scale to sum 1

same as min_max at power 1

min_max

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.