Expand description
The taste model as a fugue program, and its MCMC posterior.
θ_k ~ Normal(0, σ_θ) per style k, per feature addr theta<k>#i
τ_s ~ Normal(0, 1) per session s (keep/kill bar) addr tau#s
cuts : c_1 = −2 + 1.5·raw₀; c_j = c_{j−1} + exp(−0.5 + 0.7·raw_j)
addr cut#j
u(x) = max_k θ_k · φ(x)Mixture semantics (K > 1): taste is a max of linear experts — a
candidate is as good as its best style thinks it is. This is what lets
one user’s taste span several islands (dark drones and bright plucks):
each island gets its own linear lens, and every judgment — including a
duel across islands — compares candidates on the shared scale
u(x) = max_k u_k(x). (A per-observation latent-lens mixture cannot do
this: it forces both duel items through the same lens, so cross-island
comparisons are unrepresentable. The max-utility form was adopted after a
synthetic bimodal user exposed exactly that failure.) There are no
discrete latent sites, and at K = 1 the model reduces exactly to the
plain linear taste.
One factor carries the total log-likelihood: Bradley–Terry for duels,
σ(u − τ_s) for keep/kill, cumulative-logit ordinal for stars. Inference
is fugue’s adaptive single-site MH — every site is F64, so the generic
chain applies unchanged.
Default σ_θ = 1/(√d · s_K), making the prior utility of a standardized
candidate roughly unit-variance — likelihood scales stay sane at any
feature count and at any K. The s_K factor is the correction the
max-of-experts form forces on us: with ‖φ‖² ≈ d each u_k is marginally
N(0,1) under the prior, so u = max_k u_k is the max of K iid standard
normals, whose SD falls with K (1.000, 0.826, 0.748, 0.701, 0.669). The
mean shift cancels in duels and is absorbed by τ/cuts elsewhere; the
variance shrinkage does not. Left uncorrected, Var(u_a − u_b) drops from
2.0 at K=1 to 0.90 at K=5, so growing K mid-session would quietly make the
model less able to express a strong preference — the opposite of what
adding capacity is supposed to do.
Mixture posteriors are permutation-symmetric in the style labels (label
switching); call TastePosterior::aligned before per-style summaries.
Posterior draws carry importance weights. A full MCMC fit costs
seconds, which is far too slow to run after every vote, so between fits the
session layer folds each new observation in by sequential importance
sampling (TastePosterior::reweighted): w_s ← w_s · p(y | θ_s). That
is exact — the weighted draws target the updated posterior — and it costs
O(S). It degrades gracefully rather than silently: effective sample size
(TastePosterior::ess) falls as the weights concentrate, and that is the
signal to pay for a real refit.
Structs§
- Site
Addrs - The MCMC site addresses of one taste program, built once.
- Taste
Config - Model configuration.
- Taste
Model - The taste model: prior over latents + observation-log likelihood.
- Taste
Posterior - A fitted posterior: thinned MCMC draws, their importance weights, and
summaries. Weights are uniform straight out of a fit and concentrate as
TastePosterior::reweightedfolds in observations between fits. - Taste
Sample - One posterior draw of every latent.
Constants§
- KEEP
- Posterior draws retained from a fit, after thinning.
- MAX_
NORMAL_ SD - SD of the maximum of K iid standard normals, K = 1..=5. See the module doc.