Abstract
Humans sometimes choose actions that they themselves can identify as sub-optimal, or wrong, even in the absence of additional information. How is this possible? We present an algorithmic theory of metacognition based on a well-understood trade-off in reinforcement learning (RL) between value-based RL and policy-based RL. To the cognitive (neuro)science community, our theory answers the outstanding question of why information can be used for error detection but not for action selection. To the machine learning community, our proposed theory creates a novel interaction between the Actor and Critic in Actor-Critic agents and notes a novel connection between RL and Bayesian Optimization. We call our proposed agent the Metacognitive Actor Critic (MAC). We conclude with showing how to create metacognition in machines by implementing a deep MAC and showing that it can detect (some of) its own suboptimal actions without external information or delay.
Introduction
Humans possess the remarkable ability to monitor their own cognitive processes—a faculty known as metacognition. A classic example is the "Error-Related Negativity" (ERN), a neural signal that fires within 100ms of a mistake, often before any external feedback is provided. This phenomenon presents a logical paradox: if the brain possesses the information necessary to identify an action as an error, why was that information not utilized to prevent the error in the first place?
Existing computational theories often struggle to resolve this "left hand not telling the right hand" problem. This paper proposes that the answer lies in the fundamental algorithmic trade-offs between value-based and policy-based reinforcement learning (RL).
The Metacognitive Actor Critic (MAC)
We introduce the Metacognitive Actor Critic (MAC), an architecture that leverages the complementary strengths of the two primary components in standard RL agents:
- The Actor (Policy-based): Learns a probability distribution over actions. While flexible for high-dimensional tasks, it is often slow to converge and prone to high variance.
- The Critic (Value-based): Learns to predict the expected reward (value) of a state or action. Evaluation is mathematically simpler than selection, allowing the Critic to often learn faster than the Actor.
In the MAC framework, these components do not merely interact during training. Instead, they engage in an iterative process before an action is finalized. The Actor proposes a hypothetical action, which the Critic then evaluates. This feedback allows the Actor to refine its proposal.
If time pressure or a specific deadline forces the agent to commit to an action that the Critic has already flagged as suboptimal (i.e., the action value $Q(s,a)$ is lower than the average state value $V(s)$), the agent can internally detect its own error immediately.
Experimental Evaluation
The theory was tested using a deep neural network implementation on a psychophysics-inspired 2-alternative forced-choice (2AFC) task. An LSTM-based agent processed noisy sensory inputs to determine which of two signals was greater than zero. The agent's "confidence" was defined as the difference between the Critic's evaluation of the chosen action and the baseline state value.
Results and Insights
The MAC agent demonstrated significant self-awareness. The Critic successfully identified 48% of the incorrect actions sampled by the Actor. Furthermore, when the Critic flagged an error, it was correct 62.6% of the time.
Crucially, the Critic was able to catch errors even when the Actor proposed them with high probability (>90%). This confirms that the Critic can learn evaluative information that the Actor has not yet integrated into its policy. This explains the phenomenon where metacognitive sensitivity can exceed perceptual sensitivity ($meta-d' > d'$); the internal evaluator is simply more efficient at learning from the same data than the decider.
Discussion
Beyond neuroscience, this work reveals a novel connection between RL and Bayesian Optimization. In the MAC, the Critic functions as a "surrogate function" while the Actor acts as an "acquisition function," deciding where to sample next in the action space.
Future work will focus on scaling the MAC to complex benchmarks like robotics and exploring its biological plausibility. By understanding how the Actor and Critic interact, we can move closer to creating machines that not only act but also understand the quality of their own decisions.
Summary updated