(A) Bayesian decoding. Orange box: The observer encodes a grating stimulus with orientation θ into a noisy measurement m. Since the noisy measurement is uncertain, it is consistent with a range of orientations, described by the likelihood function. The likelihood is combined with prior knowledge to form a posterior, which describes the observer’s knowledge about the current stimulus orientation. The final orientation estimate is taken as the posterior mean. Blue box: In a stable environment, the observer can leverage knowledge about previous stimuli for improving the current estimate. To predict the current stimulus orientation, the observer combines a model of orientation changes in a stable environment, represented by a transition distribution (green box), with knowledge about previous stimuli, that is previous posteriors. Predictions based on previous stimuli are integrated into recency-weighted mixture prior, using exponential integration weights. This mixture prior is subsequently used for Bayesian inference about the current stimulus. (B) Efficient encoding. The observer maximizes the mutual information between the sensory representation and physical stimulus orientations by matching the encoding accuracy (measured as the square root of Fisher information J(θ)) to the prior probability distribution over current stimulus orientations. In a stable environment, this prior distribution can be informed by previous sensory measurements. With some assumptions about the sensory noise characteristics (see Materials and methods), the likelihood function of new sensory measurements is fully constrained by the Fisher information. The likelihood function is typically asymmetric, with a long tail away from the most likely predicted stimulus orientation. For details see Materials and methods and Wei and Stocker, 2015.