Papers
Topics
Authors
Recent
Search
2000 character limit reached

Task Ecologies and the Evolution of World-Tracking Representations in Large Language Models

Published 7 Apr 2026 in stat.ME, cs.LG, and stat.ML | (2604.05469v1)

Abstract: We study LLMs as evolving model organisms and ask when autoregressive next-token learning selects for world-tracking representations. For any encoding of latent world states, the Bayes-optimal next-token cross-entropy decomposes into the irreducible conditional entropy plus a Jensen--Shannon excess term. That excess vanishes if and only if the encoding preserves the training ecology's equivalence classes. This yields a precise notion of ecological veridicality for LLMs and identifies the minimum-complexity zero-excess solution as the quotient partition by training equivalence. We then determine when this fixed-encoding analysis applies to transformer families: frozen dense and frozen Mixture-of-Experts transformers satisfy it, in-context learning does not enlarge the model's separation set, and per-task adaptation breaks the premise. The framework predicts two characteristic failure modes: simplicity pressure preferentially removes low-gain distinctions, and training-optimal models can still incur positive excess on deployment ecologies that refine the training ecology. A conditional dynamic extension shows how inter-model selection and post-training can recover such gap distinctions under explicit heredity, variation, and selection assumptions. Exact finite-ecology checks and controlled microgpt experiments validate the static decomposition, split-merge threshold, off-ecology failure pattern, and two-ecology rescue mechanism in a regime where the relevant quantities are directly observable. The goal is not to model frontier systems at scale, but to use small LLMs as laboratory organisms for theory about representational selection.

Summary

  • The paper introduces a decomposition theorem that shows zero-excess loss is achieved only when LMs merge mu-equivalent world states, ensuring ecological veridicality.
  • It uses microgpt experiments to empirically validate minimal-complexity encodings and split-threshold predictions across varying task ecologies.
  • The study examines off-ecology failure modes and proposes ecology injection as a mechanism to rescue weakly represented evaluation distinctions.

Task Ecologies, World-Tracking, and Representational Selection in LLMs

Introduction and Motivation

This work rigorously formalizes the conditions under which autoregressive LMs acquire internal encodings that faithfully track world-state distinctions relevant to their training “task ecology,” a concept adapted from evolutionary perception theory. The primary focus is the delineation of when and why an LM's learned representations converge to equivalence classes determined by predictable distinctions in its input ecology rather than “truthful” models of the external world.

The author establishes that, for any fixed mapping (“encoding”) of latent world states, the Bayes-optimal next-token cross-entropy loss decomposes exactly into an irreducible entropy and a Jensen–Shannon excess term, with the latter quantifying representational inefficiency. This excess vanishes if and only if the encoding preserves precisely those distinctions separated by the training ecology. The theoretically preferred representation is thus the minimum-complexity quotient partition determined by the task-ecology equivalence relation.

Empirical results employ small “laboratory” LMs (specifically microgpt-style transformers) where finite ecologies and all theoretically relevant partitions can be exhaustively inspected. These model organisms validate the static theorems, minimum-complexity predictions, and failure modes in precisely controlled regimes.

The Decomposition Theorem and Ecological Veridicality

The core theoretical contribution is an exact loss decomposition theorem. Given a latent world-state space WW, an ecology μ\mu (distribution over tasks), and a (possibly lossy) encoding p:WXp: W \to X, the minimal achievable next-token prediction loss with respect to a context marginal DCD_C is shown to satisfy:

LD(p)=H(YC,W)+EcDC ⁣[xπxJSαx({Pw(c)}wCx)],L_D^*(p) = H(Y|C,W) + E_{c \sim D_C}\! \left[ \sum_x \pi_x\, JS_{\alpha_x}(\{P_w(\cdot|c)\}_{w \in C_x}) \right],

where the second term quantifies the averaged within-cell Jensen–Shannon divergence of the next-token distributions Pw(c)P_w(\cdot|c) under pp (Figure 1): Figure 1

Figure 1: Exact finite-ecology calibration of the decomposition theorem, showing excess loss is exactly the Jensen--Shannon term on synthetic ecologies.

Empirical validation on exact constructed ecologies (Figure 2) demonstrates that the measured excess aligns perfectly with the theoretical prediction across varying corpus partition scales. Figure 2

Figure 2: Empirical-corpus corroboration of the static theory: left shows induced partition size as ecology expands; right, empirical excess loss matches the Jensen--Shannon excess.

Key Theorem: The excess loss above the irreducible entropy strictly vanishes if and only if pp merges only those world states that are μ\mu-equivalent (i.e., indistinguishable by any context in the training ecology). Thus, the ecologically veridical encoding is the minimal partition the ecology distinguishes.

Static and Dynamic Selection: Transformer Model Classes

The representational selection pressure analyzed by the framework is shown to be well-posed only for frozen (non-adapted) transformer models, including dense and MoE variants. In-context learning cannot enlarge the separation set, while per-task adaptation (such as fine-tuning per task) breaks the premise and falls into the “cognitively penetrable” regime.

The paper formalizes the induced partition realized by any frozen LM, mapping observable behaviors in laboratory LMs to this theory and establishing the relevance of partition structure (as opposed to specific weight parameterizations).

Minimum-Complexity Representations and Simplicity Pressure

Among all zero-excess (ecologically veridical) encodings, the one with minimum representational entropy is uniquely characterized: it is the quotient partition W/μW/{\sim_\mu}, whose entropy μ\mu0 exactly quantifies the minimum complexity required for ecological adequacy. Any encoding finer than this (i.e., preserving unnecessary distinctions) is costlier but no better in token loss. The paper proves a rate-distortion transition: below this threshold, the model necessarily incurs nonzero excess. Under a complexity-penalized objective μ\mu1, a split-versus-merge criterion is established and empirically validated (Figures 5 and 6): Figure 3

Figure 3: Exact finite-ecology calibration of the split-threshold theorem, showing the predicted threshold for accepting/rejecting further distinction splits.

Figure 4

Figure 4: Exact corpus-induced test of the split-threshold predictions; global optimum path aligns with local split-merger predictions except for one nonlocal deviation.

This gives a precise mechanism for simplicity pressure preferentially eliminating distinctions with low predictive value. Importantly, the first distinctions shed under simplicity bias are exactly those with smallest Jensen–Shannon gain-to-entropy cost ratio.

Evolutionary Dynamics in LM Populations

The framework is extended to model populations of LMs as evolving lineages (e.g., through distillation, fine-tuning, retraining), adapting their representational encodings across generations. Under explicit assumptions of heredity, variation, and selection, the expected fitness (as encoded by reduced excess loss) determines the direction of lineage-level selection. Empirical selection and evolutionary adaptation dynamics are demonstrated via a Wright–Fisher protocol in microgpt populations (Figure 5): Figure 5

Figure 5: Selection-stage diagnostics of LM populations; selection systematically reduces excess loss over generations, and standardized residuals are consistent with Wright–Fisher sampling.

Critically, this explains conditional evolutionary pressure toward ecological veridicality: only distinctions relevant to deployed benchmark or user task ecologies are selected for at the population level.

Two-Ecology Mechanisms and Structure Induction Failures

Recognizing that token-prediction training and post-training evaluation may diverge in their induced distinction sets, the paper analyzes cases where important evaluation distinctions are weakly represented (or even absent) in the token-level next-token objective. The two-ecology extension formalizes ecology injection (e.g., via post-training, RLHF) as a mechanism for rescuing “gap pairs” not strongly supported by token-based training. In microgpt experiments on bracket balance tasks (Figure 6), both direct supervised injection and indirect exposure yield robust transfer and selection toward recipes supporting gap distinctions. Figure 6

Figure 6: Neural validation of the two-ecology mechanism on Lisp code; static sweep and selection both show increased tracking of the evaluation-relevant structural distinction as recipe trait μ\mu2 increases.

Off-Ecology Generalization and Failure Modes

The generalization gap when deploying LMs on probe ecologies absent or under-represented during training is made explicit. When a minimal complexity encoding for the training ecology merges a pair that is distinguished by a deployment probe, the excess cross-entropy is lower bounded by the Jensen–Shannon divergence over that pair, a signature empirically confirmed in off-ecology tests (Figure 7): Figure 7

Figure 7: Off-ecology failure in the microgpt model organism; cross-entropy and inter-model disagreement both rise for probe languages absent from the training ecology.

This provides a concrete prediction: off-ecology probes incur systematically higher excess loss and greater model-to-model variability, as only distinctions exposed in the original ecology are guaranteed to be preserved.

Theoretical and Practical Implications

The framework provides topological (partition-level), not geometric, guarantees for learned model representations. That is, any optimal or minimal-complexity encoding agrees on which distinctions are preserved or merged, but does not necessarily match the task-induced geometry of representation space except in highly constrained settings. The main unresolved challenge is establishing general results for geometric alignment in nonlinear or transformer models, with only partial results existing for the Gaussian-linear case.

On the practical side, the work asserts that improvements in representational capacity (scaling, architecture) and in ecology breadth (data diversity, evaluation tasks) act jointly to refine the set of distinctions preserved. The conditional nature of representational generalization is made precise: models only track those world state differences that their composite training and evaluation ecologies partition. The framework also highlights the “niche construction” feedback loop: LM outputs increasingly shape the corpus and thus the effective world state distribution μ\mu3 itself, raising further theoretical challenges.

Conclusion

This paper offers a mathematically principled framework situating the representational behavior of LLMs within the formalism of task ecologies, partition lattices, and selection-driven population dynamics. The results demonstrate:

  • The conditions for zero-excess, ecology-adapted, and minimal-complexity encodings in LMs;
  • How selection, both by simplicity pressure and deployment evaluation, orders the emergence and disappearance of distinctions;
  • The concrete forms of off-ecology failure and the necessity of “ecology injection” (post-training or transfer) for rescuing weak distinctions;
  • The limits of topological convergence and the open problems in geometric representational theory.

The methodology and predictions make explicit, testable claims about the internal encoding structure induced by LLM training and selection, offering a systematic platform for further theoretical, empirical, and mechanistic interrogation of representation learning in autoregressive LMs (2604.05469).

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.