https://en.wikipedia.org/wiki/Predictive_coding
In neuroscience, predictive coding (also known as predictive processing) is a theory of brain function which postulates that the brain is constantly generating and updating a "mental model" of the environment. According to the theory, such a mental model is used to predict input signals from the senses that are then compared with the actual input signals from those senses.[1] With the rising popularity of representation learning, the theory is being actively pursued and applied in machine learning and related fields.[2][3]
15 Minute video explaining it pretty well :
https://www.youtube.com/watch?v=INpWNP5HPNQ