Hierarchical prediction, precision-weighted errors, and perception as inference
Predictive processing (Rao & Ballard 1999; Clark 2016) proposes the brain is a hierarchical generative model that constantly predicts its sensory inputs. Each level sends predictions downward and receives prediction errors (PE) upward. Precision-weighting determines how much each PE is weighted relative to prior predictions — high precision = trust sensory data; low precision = trust priors. Perception is thus best-guess inference, not passive data reception. This simulation shows 3 hierarchical levels: sensory (L1), contextual (L2), and conceptual (L3), each predicting and being surprised by the level below.