Left column: Parameters for illustrating the COIN model (I: purple), model validation (V: brown) and fits to individuals in the spontaneous (S: blue) and evoked (E: green) recovery experiments, to the average of both groups (A: cyan), and individuals in the memory-updating experiment (M: red). Right: scatter plots for all pairs of parameters for the six groups. The overlap of data points suggest parameters are similar across experiments. σq: process noise s.d. (Eq. 3); μa, σa: prior mean and s.d. for context-specific state retention factors (Eq. 10); σd: prior s.d. for context-specific state drifts (Eq. 10); α: concentration of local transition probabilities (Eq. 8); ρ: self-transition bias parameter (Eq. 18); σm: motor noise s.d. (Eq. 17); αe: concentration of local cue probabilities (Eq. 9). Parameters used in the figures is as follows. I: Fig. 1 and Extended Data Fig. 1c–e. V: Extended Data Fig. 2a–b. S: Fig. 2c, Extended Data Fig. 6f (column 1) and Extended Data Fig. 2d. E: Fig. 2e, Extended Data Fig. 6f (column 3) and Extended Data Fig. 2e. S & E: Extended Data Fig. 2c. A: Fig. 2b & d, Extended Data Fig. 5 and Extended Data Fig. 9 (bias added for visuomotor rotation experiments: Extended Data Fig. 5a–j,p–s and Extended Data Fig. 9e–l). M: Fig. 3 and Extended Data Fig. 7a–d. S, E & M: (all parameters, but αe): Fig. 4 and Extended Data Fig. 8. The robustness analyses (Extended Data Fig. 4) used perturbed versions of the same parameters as the corresponding unperturbed simulations. To reduce the number of free parameters in the model, we set the parameters of the hierarchical Dirichlet process that determine the expected effective number of contexts or cues, γ (Eq. 7) and γe (Eq. 9), respectively, both to 0.1, the prior mean for context-specific state drifts, μd, to zero (Eq. 10), and the standard deviation of the sensory noise, σs, to 0.03 when fitting or simulating the model, with the variance of the observation noise (Eqs. 5 and 19) being set to . For visuomotor rotation experiments (Extended Data Fig. 5a–j,p–s and Extended Data Fig. 9e–l), we set the mean of the prior of the bias μb to zero (Eq. 20), and its s.d. σb to 70−1.