Value decisions

Architecture: value. Related: backends, pipeline, Reanalyze.

2026-10-18 — Teacher-forced value functions score y_N without generating

Decision: tf_logprob, tf_jsd and contrastive declare RequiresTeacherForcing. The orchestrator scores forced_continuations(base) under every coalition prompt through SupportsTeacherForcing.score_continuations, stores the result in GenerationRecord.forced and the archive, and skips generating coalition answers. ExplainRunner.rescore rebuilds prompts from archived masks for archives written by other value functions.

Why: the published baselines (MExGen, Captum, ARC-JSD) score a fixed continuation, which logprob never did; one forward pass costs far less than a generation.

Consequences: logprob becomes self_logprob; the archive and manifest schema is 5. api and lmstudio cannot serve these functions. Rejected: scoring inside score (it has no backend).

2026-10-18 — Sentence encoder is the default of embedding_cosine

Decision: embedding_cosine embeds answer text with all-MiniLM-L6-v2; encoder: model_states keeps the old behaviour and hash vectors need allow_hash_embeddings. embedding_euclidean is deleted.

Why: pooled states of a generative model rank pairs poorly under cosine, hash vectors carry no meaning, and the Euclidean score depends on vector scale and answer length.

Consequences: reanalyze reproduces explain for the default encoder; the extra mllm-shap[semantic] is needed.

2026-10-18 — A coalition is generated once per run at any temperature

Decision: dedup.enabled: auto is on whatever the temperature, and the manifest records decoding.

Why: two generations of one coalition differ when sampling, so repeated masks got different payoffs and the archive held rows reanalyze could not reproduce.

Consequences: Shapley sums to v(N) - v(empty) under sampling; repeated masks share one payoff.

2026-10-08 — Logprob value is the coalition’s own mean token logprob

Decision: logprob scores v(S) as the mean natural-log probability of the tokens generated for coalition S, as returned by the backend; an empty generation scores 0 and the base generation is not read. It requires SupportsLogprobs (ConfigError before generating), raises LogprobsUnavailableError on a record without logprobs, and archives store them per row. The hash fallback is deleted.

Why: score(base, candidate) already read the candidate’s own logprobs and ignored the base, so the design scores the coalition’s generation. Scoring the base answer under each coalition prompt needs forced decoding, which no backend protocol offers and chat APIs do not serve. A mean, not a sum, keeps confidence apart from generation length.

Consequences: Attributions measure confidence, not agreement with the base answer. Rejected: keeping the hash stub, which attributed noise.

2026-10-08 — Contextual hash embedding derived from text only

Decision: contextual_embedding = hash_embedding(text + "\0") and embedding = hash_embedding(text), so every field of a text-derived record depends on the generated text only. context_id stays in the signature, is ignored, emits a DeprecationWarning and is removed in 0.2.0. The backends, the orchestrator and reanalyze call generation_record_from_text(text). _with_embedding_source is unchanged: backend vectors equal to the text-derived ones count as hash, model vectors (transformers) as backend, which reanalyze --strict still refuses.

Why: generation_record_from_text(text, context_id) salted contextual_embedding with context_id. The mock, LM Studio and application programming interface (API) backends passed the rendered coalition snapshot’s id; the orchestrator and reanalyze passed the explained snapshot’s id. So a contextual run scored vectors reanalyze cannot rebuild and was recorded as embedding_source: backend (C15).

Consequences: Mock, LM Studio and API runs give identical explain and reanalyze values in both embedding modes and record embedding_source: hash (test test_reanalyze_matches_explain_embedding_values in test_runner_e2e). Their contextual-mode values change; static-mode values do not. On the four-token C15 repro (mllm-shap explain and mllm-shap reanalyze, run on 2026-10-08) both give [-0.227, 0.243, 0.474, 0.494] and --strict exits 0. In hash mode the contextual vector no longer differs between snapshots producing the same text and differs from the static one only by the separator. Third-party backends passing context_id keep working with a warning. Rejected: salting with the explained snapshot id in the backends (the backend protocol never sees it; adding it changes every backend’s signature); rebuilding contextual vectors in reanalyze (archives store the snapshot id, not its text); documenting the mismatch (--strict would refuse every contextual run of the continuous integration backend).