Unexpected Benefits of Self-Modeling in Neural Systems

When artificial networks learn to predict their internal states as an auxiliary task, they restructure themselves to become simpler and more parameter-efficient.

Authors: Vickram N. Premakumar, Michael Vaiana, Florin Pop, Judd Rosenblatt, Diogo Schwerz de Lucena, Kirsten Ziman, Michael S. A. Graziano

Published: Jul 2024

Key Ideas

Self-models have been studied for decades in human cognition and more recently in machine learning. What benefits do they confer? We show that when artificial networks learn to predict their internal states, they restructure themselves.

  • To better perform the self-model task, networks simplify themselves and become more parameter-efficient. This makes them easier to predict.
  • Adding self-modeling caused significant reductions in network complexity measured in two ways: narrower weight distributions and smaller Real Log Canonical Threshold (RLCT) values.
  • The reduction became more pronounced as greater training weight was placed on the auxiliary task of self-modeling, demonstrating a dose-response relationship.
  • This self-regularization may help explain both the benefits of self-models in machine learning and the adaptive value of self-models to biological systems, particularly in social and cooperative contexts.

Measuring Network Complexity

We use two independent metrics to measure how self-modeling affects network complexity: Real Log Canonical Threshold (RLCT) and weight distribution characteristics.

Real Log Canonical Threshold (RLCT)

The Real Log Canonical Threshold (RLCT) measures effective model complexity, essentially counting how many parameters a model truly uses. Across MNIST, CIFAR-10, and IMDB datasets, we trained networks with and without self-modeling auxiliary tasks, then measured their RLCT values to quantify complexity changes.

RLCT measurements showing reduced complexity with self-modeling

Networks with self-modeling consistently show lower RLCT values, indicating they become more parameter-efficient while maintaining task performance.

Experiment 1

Self-modeling reduces network complexity

Networks with self-modeling show reduced complexity measured by two independent metrics. Self-modeling causes weight distributions to become narrower and more concentrated around zero, a clear signature of regularization. The effect is consistent across different architectures (MLP, ResNet, text classifier) and modalities (vision, language).

Weight Distribution Narrowing

Self-modeling causes weight distributions to become narrower and more concentrated around zero, a clear signature of regularization. This narrowing effect represents the network making itself more predictable and parameter-efficient, fundamentally restructuring to be more amenable to being predicted.

Weight distribution histograms showing narrowing effect

The narrowing of weight distributions provides independent confirmation of the complexity reduction measured by RLCT, demonstrating that self-modeling fundamentally changes network organization.

Experiment 2

Dose-response relationship with self-modeling weight

The self-regularization effect scales with the emphasis placed on self-modeling. By varying the training weight on the auxiliary self-modeling task, we observe a clear dose-response relationship: greater emphasis on self-modeling produces stronger regularization effects, providing further evidence that self-modeling actively restructures networks.

When we systematically increase the weight given to the self-modeling auxiliary task during training, complexity measures decrease proportionally. This dose-response relationship demonstrates that self-regularization is not an incidental side effect but a direct consequence of learning to predict internal states.

Scaling effect of self-modeling weight on network complexity

The consistent downward trend across different self-modeling weights shows this is a controllable, scalable phenomenon that can be tuned during training.

Experiment 3

Generalization across architectures and modalities

The self-regularization effect is not specific to any particular architecture or data modality. We observe consistent complexity reduction across simple MLPs (MNIST), convolutional residual networks (CIFAR-10), and text classification models (IMDB), demonstrating that self-modeling confers fundamental benefits independent of architecture choice or input domain.

Three diverse experimental setups confirm the robustness of self-regularization through self-modeling:

  • MNIST (Multi-layer Perceptron): Simple feedforward networks with hidden layer widths of 512, 256, 128, and 64 neurons all showed complexity reduction with self-modeling.
  • CIFAR-10 (ResNet-18): Modern convolutional architecture with residual connections demonstrated the same self-regularization effect despite architectural complexity.
  • IMDB (Text Classifier): Language models with embedding layers showed complexity reduction, proving the effect transcends vision tasks and applies to sequential/text data.
Comparison across different architectures and datasets

The consistency across architectures and modalities suggests self-regularization through self-modeling is a fundamental principle applicable to diverse neural network designs.

Conclusion

What we found

Self-modeling is more than simply a network learning to predict itself. The learning has a restructuring effect, reducing complexity and increasing parameter efficiency. When networks are tasked with predicting their own internal states, they fundamentally change how they organize information:

  • Reduced complexity: Measured both by RLCT (effective parameter count) and weight distribution width, showing networks become simpler and more efficient
  • Dose-dependent effect: The degree of regularization scales with the emphasis placed on self-modeling, demonstrating this is a controllable phenomenon
  • Architecture-independent: The effect holds across MLPs, ResNets, and text classifiers, suggesting a fundamental principle rather than architecture-specific quirk

What this doesn't show

This work focuses on the structural effects of self-modeling on network complexity and does not directly measure all potential benefits or costs. We do not evaluate computational efficiency during inference, the impact on generalization to out-of-distribution data, or optimal strategies for balancing self-modeling with primary task performance in all contexts.

Why it matters anyway

These findings have implications extending beyond machine learning to biological cognition and social behavior:

1. Machine learning applications: Self-modeling as an auxiliary task provides a novel form of regularization that may improve model efficiency without traditional regularization techniques. This could be particularly valuable in scenarios where interpretability and parameter efficiency are priorities.

2. Biological self-models: The results suggest an adaptive function for self-models in biological systems. If self-modeling causes organisms to become more internally regularized and predictable, it would make them better targets for theory of mind, more transparent to themselves and others in social contexts. This may help explain why self-models like the attention schema evolved.

3. Social cognition and cooperation: Learning to self-model may make agents easier for others to model. In cooperative, multi-agent environments, mutual predictability matters. An agent that is more internally regularized through self-modeling becomes a more reliable partner for coordination. This may explain the social benefits of metacognition and self-awareness.

Citation

@misc{premakumar2024unexpectedbenefitsselfmodelingneural,
      title={Unexpected Benefits of Self-Modeling in Neural Systems}, 
      author={Vickram N. Premakumar and Michael Vaiana and Florin Pop and Judd Rosenblatt and Diogo Schwerz de Lucena and Kirsten Ziman and Michael S. A. Graziano},
      year={2024},
      eprint={2407.10188},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2407.10188}, 
}

Keep Reading