# Emergence of Self-Identity in AI: A Mathematical Framework and Empirical Study with Generative Large Language Models

arXiv: https://arxiv.org/abs/2411.18530 · HTML: https://mlsanity.com/paper/2411.18530/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 9 of its 50 references that are in the map.
- First posted on arXiv 27 Nov 2024.

## Builds on (most cited first, 9 of 9)

- [LoRA: Low-Rank Adaptation of Large Language Models](https://mlsanity.com/paper/2106.09685/) (2021)
- [Distilling the Knowledge in a Neural Network](https://mlsanity.com/paper/1503.02531/) (2015)
- [On Calibration of Modern Neural Networks](https://mlsanity.com/paper/1706.04599/) (2017)
- [Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks](https://mlsanity.com/paper/1703.03400/) (2017)
- [Overcoming catastrophic forgetting in neural networks](https://mlsanity.com/paper/1612.00796/) (2016)
- [Self-Aware Personalized Federated Learning](https://mlsanity.com/paper/2204.08069/) (2022)
- [Self-awareness in intelligent vehicles: Feature based dynamic Bayesian models for abnormality detection](https://mlsanity.com/paper/2010.15441/) (2020)
- [Brain-inspired and Self-based Artificial Intelligence](https://mlsanity.com/paper/2402.18784/) (2024)
- [Enabling self-identification in intelligent agent: insights from computational psychoanalysis](https://mlsanity.com/paper/2403.07664/) (2024)

## Abstract (arXiv)

This paper introduces a mathematical framework for defining and quantifying self-identity in artificial intelligence (AI) systems, addressing a critical gap in the theoretical foundations of artificial consciousness. While existing approaches to artificial self-awareness often rely on heuristic implementations or philosophical abstractions, we present a formal framework grounded in metric space theory, measure theory, and functional analysis. Our framework posits that self-identity emerges from two mathematically quantifiable conditions: the existence of a connected continuum of memories C subseteq M in a metric space (M, dM), and a continuous mapping I: M → S that maintains consistent self-recognition across this continuum, where (S, dS) represents the metric space of possible self-identities. To validate this theoretical framework, we conducted empirical experiments using the Llama 3.2 1B model, employing Low-Rank Adaptation (LoRA) for efficient fine-tuning. The model was trained on a synthetic dataset containing temporally structured memories, designed to capture the complexity of coherent self-identity formation. Our evaluation metrics included quantitative measures of self-awareness, response consistency, and linguistic precision. The experimental results demonstrate substantial improvements in measurable self-awareness metrics, with the primary self-awareness score increasing from 0.276 to 0.801. This enables the structured creation of AI systems with validated self-identity features. The implications of our study are immediately relevant to the fields of humanoid robotics and autonomous systems.
