Neocortex
Sheet covering essentially the entire human brain. The neocortical column is stereotypical, thought to perform a general canonical computation. Distinct features lending credence:
- shared tuning within a column
- dense connectivity within columns and relatively sparser connectivity between columns
- largely identical structure in all columns in all neocortical regions

A prominent theory goes that the canonical neocortical function is that of implementing a generative model so that perception is constrained hallucination (first proposed by Helmholtz). This is thought to underlie imagination and dreaming, on top of the sensory pattern recognition also done in the neocortex in mammals. Indeed, the circuits for recognition and generation may be deeply coupled.
Auto-associative memories cluster common patterns based on their correlations, but perception goes beyond this in optimizing for accurately predicting the state of the world. Predictive processing in the neocortex goes beyond mere reward prediction error by predicting everything, or everything judged important at least.
The neocortex roughly consists of two halves, the sensory and the frontal areas. The frontal neocortex is generally thought to underlie working memory, attention, executive control and planning.

The frontal areas in humans consist of three regions:
- motor cortex - evolved late in placental mammals, but before primates.
- granular PFC - normal 6 layer structure, unique to primates, potentially the locus of self-modeling, damage causes subtle problems with self-reference and self-projection.
- agranular PFC - L4 disappears during development, present in all mammals, potentially the site of control of internal simulations, damage causes severe symptoms like akinetic mutism.
One theory goes that the frontal neocortex maintains a self-model complementing (and controlling) the world-model of the sensory neocortex. In this view, goals are learned predictive explanations of learned behavior (learned through RL). This theory can also be extended into a hierarchical model of motor planning and model-based RL. Primate premotor neurons show mirror firing in response to other primates performing movements, potentially underlying imitation learning.


Perhaps, self-reference and metacognition is then yet another bootstrapped layer of predictive explanation of one's own goals (gPFC) or one's own knowledge (STS and TPJ), giving us a mind. Theory of mind is a more concrete ability that was enabled by these structures allowing the simulation of others, learning from demonstration and anticipation of future needs.
