Skip to Content
DocsUser GuidesModel Convergence

Model Convergence

This guide covers behaviour over time for Dynamic Engagement algorithms: how the options store posterior (and each algorithm’s own score) moves after /invocations and /response, what counts as a prior, and how operator knobs change both the score and the speed of arm separation.

It complements the day-one catalog in Dynamic Interaction Algorithms (cold-start tables, prior recipes, algorithm selection). For formulas and options-store fields see the runtime README_DYNAMIC.md . For agent-facing cards see ECOSYSTEM_ALGORITHMS.md  section 20.

Scores only move when the runtime sees presentations in ecosystemruntime and outcomes in ecosystemruntime_response. POST /invocations ranks from the options store. POST /response with that row’s uuid + offer_name is what the rolling process counts as a success.

Posterior every algorithm maintains

Every rolling processor writes a Beta posterior on the options store:

alpha = alpha_zero + success_reward * successes beta = beta_zero + fail_reward * failures

alpha_zero / beta_zero resolve from the options document, then randomisation.prior_success_reward / prior_fail_reward, then 1.0. Ranking still uses each algorithm’s own propensity / arm_reward / Q / PageRank / factorised likelihood. Thompson Sampling samples the stored Beta(alpha, beta) — it does not add success_reward a second time.

Tabular approaches (binaryThompson, epsilonGreedy, QLearning) partition that posterior on optional training_cell derived from Dynamic Recommender Training Fields. Factorised approaches (naiveBayes, behaviorAlgos, Network) discretise each field independently and never concatenate a cell.


1. Convergence mechanics (all algorithms)

AlgorithmAccumulated stateWhat drives arm separationWhat stalls itPersisted vs rebuilt
Ecosystem Rewards (binaryThompson)Beta posterior per offer × context × optional training_cellAccept/reject counts × success_reward / fail_rewardMissing /response; tiny window; unique cells (unbinned numerics)Persisted in options store
Epsilon Greedy (epsilonGreedy)Empirical propensity; Beta posterior still writtenresponse_count / logging_count; ε randomizesAll arms tied at 0; ε = 0 with no dataPersisted
Bayesian Probabilistic (naiveBayes)P(field|offer) with Laplace; Beta alongsideDistinct discrete featuresUnbinned numerics; missing Lookup ParametersLikelihood rebuilt from window; Beta persisted
Q-Learning (QLearning)Q-table over states (history + optional cell) and offersBellman updates + reward pluginSparse per-customer states; no plugin.rewardQ persisted; Beta alongside
Network Analysis (Network)Offer graph PageRankCo-presentation / co-acceptanceNo co-occurrence yetGraph rebuilt from window; Beta persisted
Human Behavioral (behaviorAlgos)Type-specific in-memory scoresSee type rowsRollingBehavior.resetBehaviorAlgorithms() discards in-memory posteriors every cycleRebuilt from the processing window each cycle; platform Beta still persisted
Loss Aversion (lossAversion)Ignored-offer penalty + UCBFailures hurt more than accepts helpNaturally low take-up on every armRebuilt
Risk Aversion (riskAversion)Mean–variance utilityLow variance + decent meanNo history → no scoresRebuilt
Prospect Theory (prospectTheory)Seeded values + driftAdaptive drift + internal εNeed for a single winnerRebuilt
Sentimental EquilibriumAggregate sentiment/effortNot a per-offer rankerUsed as NBOSingle-shot / rebuilt
Coverage-Aware ThompsonThompson + long-tail boostCoverage fights concentrationFairness KPI vs fastest winnerRebuilt behavioral state; Beta-like sampling
Long-Tail Boost MFWRMF/ALS factorsMatrix densitySparse logs / cold startRebuilt
Generative (generative)None (LLM per request)Prompt + lookup varsLatency, cost, auditNot accumulated

2. What acts as a prior

AlgorithmPriorNotes
Ecosystem Rewards / Coverage-Aware ThompsonConjugate Beta: alpha_zero, beta_zeroDefaults: options store → prior_success_reward / prior_fail_reward1.0. Workbench Generate options seeds alpha_zero to prior_success_reward (not the computed posterior).
Epsilon GreedySame Beta fields for inspectionRanking uses propensity, not the sample
Loss AversionSmoothing + UCBNot a conjugate prior
Prospect TheorybaseDriftRate seedingAll offers start with a seeded value
Bayesian ProbabilisticLaplace α = 1Unseen feature/offer pairs stay non-zero
Risk Aversion, Network, Long-Tail Boost MFNonePlatform uniform/random until history exists
Q-LearningNoneRandom until the Q-table fills
GenerativePrompt onlyNot statistical

3. Prior strength vs score (worked numbers)

For a Thompson arm the posterior mean is ((\alpha_0 + s) / (\alpha_0 + \beta_0 + n)) and the prior weight is ((\alpha_0 + \beta_0) / (\alpha_0 + \beta_0 + n)), with (n = s + f).

Assume 4 successes and 6 failures in the window (success_reward = fail_reward = 1 so (s=4), (n=10)). Observed rate = 0.40.

Prior(\alpha_0)(\beta_0)Posterior meanPrior weight at n=10When the prior stops dominating
Default uninformative1.01.05/12 = 0.4172/12 = 17%After ~20 events prior weight < 10%
From prior_success_reward=0.1, prior_fail_reward=0.010.10.014.1/10.11 ≈ 0.4061%Almost immediately
Optimistic2.01.06/13 ≈ 0.46223%Needs ~30 events for < 10%
Strong popular10.05.014/25 = 0.56060%Needs ~135 events for < 10%
Strong popular at n=100 (40/60)10.05.050/115 ≈ 0.43513%Still pulling toward 10/15 = 0.67

If Generate options used to copy the computed (\alpha) into alpha_zero, the rolling loop treated historical take-up as a permanent prior. The runtime now persists the true prior and recomputes (\alpha = \alpha_0 + success_reward \times successes) from the window.


4. User levers

LeverWhere it is setEffect on convergence speedEffect on scoreRisk
Deployment εDeployment / properties predictor.epsilonForces uniform explore before post-scoreCan override a converged rankingToo high → never exploits
Algorithm εDynamic Engagement randomisation.epsilonThompson: extra uniform mix; ε-greedy: the policy; Q: random actionsDirectly changes who winsConfusing the three ε layers
success_reward / fail_rewardrandomisationLarger values move α/β faster per eventInflates posterior vs raw countsfail_rewardsuccess_reward pessimism
prior_success_reward / prior_fail_rewardrandomisation + Generate optionsStronger prior → slower data takeoverShifts early Thompson samplesArms frozen at the prior if α₀, β₀ huge
processing_windowrandomisation (ms)Shorter window → faster adaptationRecency biasToo short → n=0, random
processing_countrandomisationCaps rows per cycleSame as a short window if hit0 with huge logs → slow cycles
decay_gammarandomisationDown-weights older customer repeatsRecency for multi-touch1.0 = no decay
interaction_countrandomisationCaps per-customer eventsStops one customer dominating0 = unlimited
Options weightingOptions storeMultiplies arm_reward at scoreBusiness boost independent of learningCan hide a true loser
learning_rewardReward pluginScales the learning updateChanges α/β growthPlugin bugs look like non-convergence
Training-field typingDeployment parameter_access.dynamic_training_fields + typesNumeric binning keeps cells sharedPartitions tabular posteriorsUnbinned numerics → n=1 cells, random

5. Switching approach to change score behaviour

GoalApproachKnobs
Faster convergence to a winnernaiveBayes (features) or epsilonGreedy with decaying εLookup Parameters; lower ε over time
More stable scoresriskAversion; longer processing_window7–30 day window; modest rewards
More explorationbinaryThompson with weak priors; or raise εalpha_zero=beta_zero=1; deployment ε 0.1–0.2
Fairer catalog coveragecoverageAwareThompsonDo not also crank ε if coverage boost is enough
Feature-driven accuracynaiveBayesDiscrete/binned training fields; Lookup Parameters
Sequential journeysQLearningReward plugin; training_cell on state
Default online NBObinaryThompsonClosed loop + processing window

6. Diagnosing non-convergence

SymptomLikely causeFix
Arms frozen at the priorMissing alpha_zero used to NPE (now defaults); or huge α₀/β₀; or no /responseConfirm /response matching offer_name; set modest priors; check rolling logs
All arms tiedNo events in window; ε-greedy propensity 0; unbinned unique cellsWiden window; bin numerics; raise ε until n grows
One arm dominatingHigh success_reward; popular arm + no coverage; weightingCoverage-Aware Thompson; cap weighting; lower success_reward
Scores never stabiliseWindow too short; high ε; Thompson sampling (stochastic by design)Lengthen window; lower ε; inspect posterior mean alpha/(alpha+beta) not the sample
Behavioral scores resetresetBehaviorAlgorithms() every cycleExpected — look at the window, not yesterday’s in-memory state
Tabular cells empty at scoreOptions seeded without training_cell while fields are configuredRe-generate options after setting training fields, or wait for rolling upserts

Public algorithm catalog: Dynamic Interaction Algorithms. Exploration layers: Exploration Using Epsilon.

Last updated on