Active Inference with a Self-Prior in the Mirror-Mark Task
Authors: Dongmin Kim, Hoshinori Kanazawa, Yasuo Kuniyoshi
Organizations: Laboratory for Intelligent Systems and Informatics, Graduate School of Information Science and Technology, The University of Tokyo, 7-3-1 Hongo, Bunkyo-ku, Tokyo, Japan
The mirror self-recognition test evaluates whether a subject touches a mark on its own body that is visible only in a mirror, and is widely used as an indicator of self-awareness. In this study, we present a computational model in which this behavior emerges spontaneously through a single mechanism, the self-prior, without any external reward. The self-prior, implemented with a Transformer, learns the density of familiar multisensory experiences; when a novel mark appears, the discrepancy from this learned distribution drives mark-directed behavior through active inference. A simulated infant, relying solely on vision and proprioception without tactile input, discovered a sticker placed on its own face in the mirror and removed it in approximately 70% of cases without any explicit instruction. Expected free energy decreased significantly after sticker removal, confirming that the self-prior operates as an internal criterion for distinguishing self from non-self. Cross-modal sampling further demonstrated that the self-prior captures visual--proprioceptive associations, functioning as a probabilistic body schema. These results provide a concise computational account of the key behavior observed in the mirror test and suggest that the free energy principle can serve as a unifying hypothesis for investigating the developmental origins of self-awareness. Code is available at: https://github.com/kim135797531/self-prior-mirror
Figures & tables
Fig. 1: Experimental overview. (a) A simulated infant sitting in front of a mirror recognizes its reflection and removes the sticker. (b) The infant receives visual input and proprioceptive input of joint angles. Each joint is controlled by a virtual motor. (c) Expected free energy is computed by comparing with the self-prior that models the density of familiar sensory experiences. The policy network is trained to select actions that minimize expected free energy.
Fig. 2: Active inference framework with self-prior. The self-prior evaluates how well the current observation matches familiar patterns. The world model infers latent states from observations and imagines future trajectories under the policy. Expected free energy is computed from the mismatch between imagined latent states and the self-prior.
Fig. 3: Emergence of sticker-removal behavior in the mirror test (seed 2). (a) An agent undergoing self-prior learning detects the sticker in the mirror, reaches out, and removes it. The red-highlighted region marks the exact moment of sticker removal. (b) Comparison of expected free energy before and after model learning in the same episode. Before self-prior learning, scene-wise differences are small, whereas after learning the scene with sticker removal shows lower expected free energy. (c) Change in expected free energy before and after sticker removal across all seeds. Expected free energy tends to decrease after removal.
Fig. 4: Quantitative results for the mirror test. Solid lines denote mean values aggregated over all evaluation episodes. (a) Mean hand-sticker distance during training. The shaded band indicates the empirical 5th–95th percentile range. Distance is computed using the hand that is closer to the sticker. (b) Sticker-removal success probability during training. The shaded band indicates the 95% Wilson score confidence interval of the removal probability.
Fig. 5: Self-prior as a density model of the agent’s multisensory self-experience. (a) Samples generated from the self-prior. The samples show that the self-prior predominantly captures a sticker-free self. (b) Reconstructing a sticker-bearing latent through the self-prior removes the sticker, indicating that the distribution favors a sticker-free body state. Furthermore, a visual self-appearance can be recovered from proprioception alone (with the visual input set to zero), confirming that cross-modal associations have been captured.
Category
Joint
Range (rad)
Neck
pitch
[−0.30,0.10]
yaw
[−0.30,0.30]
Shoulder
elv_angle
[−0.87,2.09]
shoulder_elv
[−0.17,2.70]
shoulder_rot
[−0.87,0.79]
Elbow
elbow_flexion
[−0.00,2.27]
TABLE I: Controllable joint ranges used by the agent
Component
Specification
Visual encoder
4 convolutional layers, stV∈R1024
Proprioceptive encoder
2-layer MLP (32 hidden units),
stP∈R1024
Observation mixer
1 linear layer, sˉt∈R1024
Action mixer
1 linear layer, et∈R512
Sequence model
GPT-like Transformer decoder,
TABLE II: Architecture details of the proposed model
In the animal kingdom, mirror self-recognition is a canonical probe of higher-order cognition, emerging only in some species. We ask whether an analogous functional capability emerges in embodied vision-language model (VLM) agents: can they recognize themselves in a mirror? We introduce a controlled 3D benchmark where a first-person VLM agent must infer a hidden body attribute from its reflection and select the matching target, while avoiding self-other misattribution. To separate mirror-grounded self-identification from shortcuts, we test mirror removal, misleading cues, and occluded reflections. We also evaluate the decision process through mirror seeking, temporal ordering, self-attribution, and reasoning-action consistency. Our experiments show that mirror-based self-identification emerges mainly in stronger VLMs. These models can use reflected evidence for action, whereas weaker models often inspect the mirror but fail to extract self-relevant information or misattribute their reflection. Language-vision conflict further shows that self-referential language alone is not evidence of grounded self-identification. Overall, mirror-based evaluation provides a diagnostic for whether embodied self-grounding is causally rooted in perception and action rather than priors, prompt compliance, or confabulation.
Filippo Ziliotto, Ciro Beneduce, Bruno Lepri +3
University of Padova · FondazioneLucianoBrunoSerafiniKessler · Fondazione Bruno Kessler
How does a system that merely predicts the world come to distinguish its own causal influence from everything else? We trace this transition in a minimal 192-dimensional GRU through 40 controlled experiments arranged as a developmental sequence, adding components one at a time and tracking whether the system can distinguish self-caused from world-caused changes. The developmental path reveals four conditions that must be satisfied in strict order: (1) persistent state forming stable attractors, (2) a causal action loop linking output to input, (3) proprioceptive feedback that makes implicit causal knowledge explicit, and (4) asynchronous awakening - perceptual learning must consolidate before action learning begins. We propose agency gain (A = Err_world - Err_self), the predictive advantage of knowing one's own action, as a metric to track this process. The self-aware predictor consistently outperforms the self-blind predictor across periodic (sinusoidal) and chaotic (Lorenz) environments, and the metric survives ablation of all auxiliary components. Only forward-sampled action selection produces meaningful agency gain; two gradient-based alternatives degenerate. Equally significant are 12 falsified hypotheses mapping where development stalls: predictive coding alone does not produce self-represent
Large language models make claims about themselves that are both consequential and increasingly difficult to verify from behavior alone. How can we distinguish plausible confabulations from genuine introspection? In this paper, we identify mechanistic signatures of faithful self-report in a controlled setting. Using low-rank adapters, we train models to make decisions on behalf of fictitious characters, according to latent linear preference functions. We find sustained fine-tuning on an implicit decision task can lead to the emergence of accurate self-reporting of models' learned preferences, even without explicit self-report supervision. We ask two research questions about this emergent phenomenon. First: is the emergence of accurate self-reporting accompanied by a measurable structural change in the model? Weight ablations and frozen-layer experiments together indicate that preference representations shift to earlier layers over training, consistent with the hypothesis that faithful self-report requires preferences to be located where pre-existing verbalization mechanisms can access them. Second: can these structural differences distinguish faithful models from unfaithful ones? Using attribution patching, we find that faithful models exhibit significantly higher attribution similarity between the decision-making and self-report tasks -- a mechanistic signature of faithful self-report that does not require us to understand the content of the report itself. Previous work on self-report has observed behaviorally that models can be faithful or unfaithful; our work proposes that, at least in our restricted setting, it is possible to distinguish between the two patterns of computation by examining the structure of the networks themselves.