Manuscript Offprint
arXiv:2610.20782Open-world AI: a Tale of Three Requirements
ABSTRACT
The closed world asks AI for specialized competence and lets it manufacture the IID data its theory assumes: a fixed criterion licenses collecting examples until the task is covered. The open world asks for versatility — taking up tasks a machine was not built for, from few examples and with little prior from a human designer — and offers data that is grouped, not shuffled. Its tasks are not known in advance, so a machine must do inference-time learning (1st requirement). Modeling tasks as sharing latent factors and decomposing the training objective, we derive two more: a rich representation, retaining more than IID generalization requires, and a predictive disentanglement that aligns inputs and outputs into matched low-dimensional groups. The analysis further predicts the need for a consistent inner learner, and the benefit of long contexts spanning related tasks. We test these claims on language models up to , asking whether a model has a property (qualitative) rather than how much it wins (quantitative). Models that meet the requirements improve as data from related tasks accumulates; the rest degrade, and neither scale nor layer-type interleaving repairs this.
1 INTRODUCTION
We propose that a 2 month, 10 man study of artificial intelligence be carried out during the summer of 1956 [...] An attempt will be made to find how to make machines [...] solve kinds of problems now reserved for humans [...]. We think that a significant advance can be made [...] for a summer. — McCarthy et al., 1955
Seventy years after the Dartmouth proposal (McCarthy et al., 1955), artificial intelligence has produced a long sequence of successes associated with the closed world: artificial environments (Samuel, 1959; Tesauro, 1995; Silver et al., 2016) and specific real-world tasks (Matan et al., 1991; Taigman et al., 2014). Each rests on a clear criterion of success, which does two things at once. 1) The criterion specifies the distribution the machine is measured against, licensing the collection of more iid examples, with a generalization gap falling as in the number of examples (Vapnik, 1991). 2) It reveals not merely whether a machine fails but how it fails, so that designers can repair the problems one after another. Together these give a loop along which capability accumulates: locate a failure, collect data against it, repair, repeat. On tasks other than the one it was trained on — even one that looks close — the machine may fail (Zech et al., 2018; Koh et al., 2021), and the loop must be run again, by a human, for each new task. After building AI this way, rather than proving that our machines are intelligent, we have more often found satisfaction in proving that we are.
Do large language models escape the closed world? Their competence across many specialized domains is real and impressive, and the in-context learning ability it comes with is genuinely remarkable. But two questions are still worth asking: how that competence was obtained, and what kind of in-context learning it is. On the first, the training practice is eager to consume all available data and to annotate as much task-specific data as possible until the tasks of interest are likely to be covered (Yang et al., 2025a, §4.1; DeepSeek-AI, 2026, §5.1).
This research, including all access and use of models and datasets, was completed in author's personal capacity.
Code: https://github.com/facebookresearch/MemoryMosaics
Web crawls, source code, book corpora, chain-of-thought for mathematics, queries for reasoning. The practice is general; these two reports document it explicitly, which most do not.

Figure 1: Latent factors, task, and related tasks.
Benchmarks then serve as both criterion and measurement; a failure identified is a dataset collected, and the loop continues. This is the closed-world loop, industrialized rather than escaped. On the second, modern in-context learning is impressive but fragile (Li et al., 2024): supplying more demonstrations frequently makes performance worse rather than better; and frontier models (e.g., GPT-4o) may under-perform smaller & older ones (e.g., LLAMA-2-7b). Neither more task-specific IID data nor more scale reliably improves performance on the task at hand. This is not yet learning.
The Dartmouth proposal set out to produce versatility rather than specialized competence — a machine that can take up a task it was not built for. We take that as the target:
AI for the open world requires a machine to learn a wide range of new tasks, using fewer examples and less task-specific prior knowledge from human designers.
Unlike closed-world AI where the tasks of interest were already known at training time, open-world AI does not come with predefined lists of tasks. Thus, models must be able to adapt to new tasks on the fly. This gives the first requirement, inference-time learning.
Just as closed-world AI relies on the IID sampling assumption to connect training and test examples, open-world AI needs connections between training and test tasks (groups of examples) (Baxter, 2000; Maurer et al., 2016; Tripuraneni et al., 2020; Du et al., 2020). Fortunately, the world is structured, and tasks are not arbitrary. For example, in language modeling, poetry and mathematics are different tasks following very different statistics. Yet these two tasks share substantial latent factors, e.g., language and grammatical construction. This observation suggests viewing tasks and latent factors as a bipartite graph (as in Figure 1), and assuming two tasks to be more similar when they share more latent factors.
In this work, Section 2, we first analyze inference-time learning under the assumption that the latent-factor overlap of similar tasks can be expressed as an overlap over internal representation of either the model inputs or the model outputs. We argue that this analysis suggests two additional requirements:
-
rich representation (gather broadly): learns features richer than IID generalization requires, making a wide range of new tasks reachable;
-
predictive disentanglement (group predictively): disentangles input and output representations into matching groups, and performs prediction within each group, making a new task learnable from fewer examples.
Furthermore, this analysis allows us to make interesting predictions about learning algorithms for building open-world AI:
• the importance of a consistent inner learner for inference-time learning;
- the benefit of long contexts that span multiple related tasks, provided the target and related tasks are handled separately.
Finally, Section 3 tests these requirements and predictions on language models up to 8B. What we look for is a qualitative difference — whether a model has a given property or lacks it — rather than a quantitative margin. A margin in today's language modeling depends sensitively on engineering detail that is largely unshared and would not fit in a scientific paper in any case; a qualitative difference is robust to that detail.
What we find is that models meeting the requirements improve as data from related tasks accumulates, while the rest degrade. Neither scale nor layer-type interleaving repairs it.
We consider this well understood and broadly accepted.
Without this assumption, the world would be arbitrary and unpredictable.
2.1 MODELING INFERENCE-TIME LEARNING
To model inference-time learning, we make two assumptions: 1) inputs and outputs both have internal representations that are shared across tasks (Finn et al., 2017; Garnelo et al., 2018; Kim et al., 2019); 2) the connection between those representations is task-specific, and must therefore be learned at inference time. The first says what is carried over between tasks; the second says what is not. Together, they ask a machine to have four parts:
① input feature extractor , on input , , shared across tasks.
② output feature extractor , on output , , shared across tasks. and learn representation and partition them into matching groups .
③ decoder (affine) A maps back to .
④ inner learner , the only task-specific part, adapted at inference time. It is fitted on the support-set examples , carried into latent space as , and predicts group-wise on a query : , , where each is fitted on the group- pairs alone.
In practice a model stacks many such units; the analysis concerns the functional decomposition, not its allocation across layers.
Training objective The training process minimizes the error (for ease of analysis we take the squared error throughout) on a query given support-set drawn from the same task, averaged over tasks:
where is the distribution of support-set sizes, which deployment does not let a machine choose.
2.2 DECOMPOSING THE TRAINING OBJECTIVE
The reconstruction of directly supervises decoder and output extractor to avoid collapse: if has dropped information about , and equally if cannot read it back, the reconstruction fails. We therefore leave the decoder out of the analysis below. We decompose the training objective around the Bayes-optimal prediction on query given the support set , formed in the latent space that and provide:
It is the best any inner learner could do with what the representations hand it. Since is affine it commutes with the conditional expectation, and since recovers from , conditioning on is conditioning on ; hence . Predicting in latent space and predicting in output space share the same reference, and the decomposition can be written on :
(3)
An affine A does not make affine, since lives in a larger space than y.
where is the irreducible error of task . The cross term vanishes by the definition of : is a function of , and has zero mean given the same. This orthogonality is not special to squared error: it holds for any Bregman divergence, hence for cross-entropy.
Neither term in Eq. (3) can be optimized on its own: is defined against the Bayes-optimal , which is unknown. Only the full objective is available, and decides which term it reaches. At large , vanishes for any consistent inner learner, so reducing the objective reduces — the information the representation has permanently discarded — and builds a rich representation. At small , dominates instead, and reducing the objective presses and toward coordinates in which the prediction factorizes group-wise: predictive disentanglement. The two are ordered: because is defined relative to and , the small- pressure is worth applying only once the representation is rich (built at large ).
I. at large : rich representation. Bayes-optimal prediction uses the exact prior of each task (ideal case), and thus depends only on the information retained in , not on how it is arranged. removes the effect of tasks' irreducible error; at large it measures the information about that has permanently discarded. A smaller indicates a richer representation (Zhang & Bottou, 2023), which may be redundant for one task but helpful for a broader range of tasks.
Furthermore, this work provides a way to learn rich representation. Call an inner learner consistent if as — given enough examples from a task, its prediction approaches the Bayes-optimal (Györfi et al., 2002). With a consistent inner learner vanishes at large , so the reduction of operates directly on . It implies that a rich representation can be constructed by minimizing at large . A linear Gaussian case analysis on rich representation is shown in Appendix A.
II. at small : predictive disentanglement. The term measures how far the actual inner learner is from the Bayes-optimal predictor (which uses the exact task prior) under the learned representation. Once the representation is rich, dominates in the small-l regime. So the goal is no longer to refine the representation, but to let the inner learner reach from as few examples as possible. Without being given a task-specific prior, this asks for a prior shared across the tasks of interest. One way to supply it is to reduce the inner learner from a single joint prediction with , to separate predictions with . Feature groups are shared across tasks; tasks differ in the function mapping within each group:
(4)
Under this structure the Bayes predictor itself factorizes group-wise, so a block-diagonal inner learner loses nothing. Therefore, minimizing at small with such a learner pressures the representations to find the coordinates in which this form holds. Since are aligned for prediction, and are disentangled in groups; we call this predictive disentanglement.
Prediction in latent space. Predicting rather than is the move made explicit by joint-embedding predictive architectures (JEPA) (LeCun, 2022) , which encode the output
This matches the finding of Zhang et al. (2022); Chen et al. (2023), where algorithms that seek an invariant representation directly fail, and a rich representation restores them.
This excludes learners whose effective memory is limited, whether by a fixed-size state (as in standard recurrent and state-space models), a sliding window, or strongly decaying positional encodings.
In analogy to the sparse mechanism shift hypothesis (Schölkopf et al., 2021): tasks vary along sparse, independent directions.
Contrastive predictive coding (Oord et al., 2018) makes the same move with a contrastive objective. Joint-embedding methods (JEA) (Chen et al., 2020; Bardes et al., 2022) match the embeddings of two views rather than predicting one from the other; they have no predictor for Eq. (4) to factorize.
and measure prediction error in embedding space to avoid spending capacity on unpredictable detail. Predictive disentanglement shares that step but differs in two respects. First, the predictor is not dense, but group-wise as in Eq. (4). Its sample complexity is governed by the sub-problem dimension rather than the full dimension (Stone, 1985). Second, the motivation of predictive disentanglement is sample complexity at small rather than the difficulty of the output space. JEPA is recovered with a single dense group, no task conditioning, and no decoder.
2.3 TWO PREDICTIONS
2.3.1 CONSISTENCY OF THE INNER LEARNER
The rich-representation analysis depends on the consistency of the inner learner: a consistent inner learner drives to zero at large , so the optimization pressure falls on and enriches it. This rich representation in turn prepares features for learning predictive disentanglement at small .
2.3.2 TASK SIZE, AND THE USE OF RELATED TASKS
The analysis of rich representation starts from large l. Without large l, a rich representation cannot be constructed, and predictive disentanglement is therefore hard to learn. The training process thus requires each task to contain enough examples.
Could we sample arbitrarily many examples from the target task, the inner learner would need only to be consistent — predictive disentanglement having already made the sample complexity manageable — and would handle new tasks at inference time without a designer's task-specific prior. We cannot. As the ImageNetv2–ImageNet comparison shows (Recht et al., 2019), unknown hidden factors shift the distribution even under a faithful replication protocol, so data from the target task is hard to accumulate. What accumulates instead is data from related tasks , and using them when the target task does not supply enough examples becomes essential.
We now analyze that case. In the feature space defined by Eq. (4), a related task helps with the target task's group when its group-wise conditional mean is close to the target task's, (dropping , and when unambiguous: ), and hurts it otherwise. Pooling every example into one estimate cannot tell the two cases apart, and the damage grows as related tasks accumulate. Two things are therefore required: estimating the target and related tasks separately, as and , and mixing them dynamically,
where uses target examples alone, uses related-task examples, and indicates how to mix. The optimal grows as related tasks move further from the target task, and the learner effectively stops borrowing once they become too distant (Grant et al., 2018).
Proof. Write and with independent zero-mean estimation errors, , , and the mechanism discrepancy between them ( being the pooled mean over related tasks when several are available). Minimizing the squared error gives the optimal weight:
which depends only on the statistics of the target and related task estimates. is not observed at inference. Treating tasks within a neighborhood as exchangeable makes the between-task variance, and spread among the related tasks estimates it (Gelman & Hill, 2007).
3 EXPERIMENTS
Qualitative effects, not quantitative ones. Sections 2.2 and 2.3 derive three requirements and two predictions. The experiments in this section ask, for each, whether a model has it or lacks it — a qualitative comparison (“does a model have a property needed for open-world AI?”) rather than a quantitative one (“the proposed model outperforms baselines by x percent.”). A quantitative margin in modern language modeling depends sensitively on engineering details — data curation, training schedules, evaluation schemes — that are largely unpublished, making the comparison fragile. By contrast, a qualitative comparison asks for the sign of an effect rather than its size, and a sign is robust to those details.
3.1 CONNECTING THE EXPERIMENTS TO THE THEORY
Language data. The theory is stated over examples and tasks and does not depend on modality. We instantiate it in language because language corpora are large, widely shared, and the architectures we compare are established in that setting. Every model in this work is trained on exactly the same mixture: Cosmopedia (Ben Allal et al., 2024), NemotronCC-high (Su et al., 2025), open-web-math & arxiv (Azerbaiyev et al., 2024), Gutenberg books (Manu, 2023), and ShareGPT (Vicuna, 2023).
Building tasks and related tasks. Following the illustration of tasks and related tasks in Figure 1, we use natural documents as tasks, and semantic clusters of documents as related tasks. We apply k-means clustering to document embeddings (Nussbaum et al., 2024), getting 1150 clusters for training (each contains related tasks) . Similarly, we partition the Simple English Wikipedia (SimpleWiki) evaluation corpus into 19 clusters, after removing template-stub clusters (Appendix B.3).
The clusters built this way are semantically meaningful and reflect real-world groupings. To rule out artifacts of the k-means clustering, we also run the same evaluation without any post-clustering, treating Simple English Wikipedia as a single natural cluster. See Appendix C for details.
Training and evaluation. Unless stated otherwise, every model at each scale uses the same hyper-parameters, optimizer, and amount of training data, with no per-model tuning. Each sequence is built by sampling documents (tasks) from one randomly drawn cluster (related tasks), delimiting each with [bos] and [eos] , concatenating them, and truncating at length l for training, and at length for evaluation. The training objective, as in Eq. (1), averages the loss from position 1 to l, so l is the maximum support set size seen in training; we call it the maximum training length, or training length for short.
How to read the evaluation. To keep the comparison qualitative, and so robust to engineering choices and to the environment, we never directly compare raw performance numbers across model families. Instead, for each model or model family, we vary the other factors — training length l, evaluation length , how to use related tasks — and ask whether the model has a property needed for open-world AI, yes or no.
3.2 MODELS TO COMPARE

(a)
No position encoding
(b)
No leaky-average

(c)
(d)
Figure 2: Model architecture groups. Architectures within each group differ only in the dark box. (a) Basic: the dark box is one of {Mosaics, attention, DeltaNet}. (b) Modern hybrid: {DeltaNet, sliding window attention (SWA)}, interleaved with full attention (NOPE). (c) +: {Mosaics, attention}; the dark box skips the s most recent positions, the SWA below it uses a small window w, and the leaky average in Mosaics is removed. (d) Two-stage: {Mosaics, attention}; as (c), but the target task and the related tasks are handled separately.
Topical diversity is what matters, not the choice of sources: the same experiments on Cosmopedia alone — a single synthetic corpus, but a topically diverse one — give the same conclusions.
The exact number of clusters does not affect the conclusions; anything from a few hundred to a few thousand works.
https://simple.wikipedia.org/wiki/Simple_English_Wikipedia
Every model can therefore tell the target task apart from the related tasks in its context.
Architecture. We use two scales, 1.5B and 8B. Every model has the same architecture layout: a token embedding, a stack of blocks each pairing a learning module (the “dark box” of Figure 2) with a swiGLU feed-forward network, and a linear decoder. A learning module contains key and value extractors (and, except in the Memory Mosaics family, a query extractor) and an inner learner that predicts from them. It runs G heads in parallel, one per group of Eq. (4): each head has its own extractors and its own group-wise inner learner . Other detailed settings are in Appendix B.
a) Basic architecture
– Memory Mosaics: The learning module’s inner learner is Gaussian kernel regression over keys and values, with the query equal to the key — per head, a single long memory spanning the whole context. This inner learner is consistent (Györfi et al., 2002).
Keys and values are built from linear projections and of the input . The key is a leaky average of past projections, , , with input-dependent and (Zhang & Bottou, 2026); the value is a weighted average of the projections at and ( ) (Zhang et al., 2025). Keys summarize the past and values the near future, so each stored pair is a predictive association rather than a retrieval of one position's own representation. The kernel regression predicts:
where is a Gaussian kernel since keys have unit norm, with a bandwidth that scales with position (Zhang & Bottou, 2026). This prediction is then scaled by a sigmoid gate computed from the input.
In terms of Section 2.1, the key and value extractors contribute to the input and output feature extractors and , and the kernel regression is the inner learner .
– Transformer: replaces the learning module (dark box) with softmax attention (ROPE). Compared with Memory Mosaics, its inner learner is not consistent: ROPE's positional decay bounds its effective memory, and its kernel has no bandwidth schedule that narrows as the context grows, so its bias does not vanish as (Györfi et al., 2002). Its examples are also not predictive: keys and values are projections of the same token, so one attention layer retrieves a position's own representation, and forming a predictive association takes at least two layers (Olsson et al., 2022; Bietti et al., 2023).
– DeltaNet: replaces the learning module with a gated delta-rule recurrence (Yang et al., 2025b); its fixed-size state makes it inconsistent once a task outgrows that state.
b) Modern hybrids, interleaving DeltaNet/sliding window attention (SWA, 2k window length) and full attention (NOPE, no position encoding) in successive blocks. This gives two architectures: Hybrid DeltaNet and Hybrid SWA. Both are configurations that frontier language models are converging on (Agarwal et al., 2025; Qiu et al., 2026).
c) + architecture.
– Memory Mosaics+: uses a separate short memory — a small sliding window attention module of size w (or a mosaics or deltanet module) — to summarize the near past below the long memory. This allows the long memory to drop the leaky average from its keys and simply use normalized projections . It also allows the long memory to skip the s most recent pairs, which are strongly dependent on the current position in sequential data (Yu, 1994), since the recent information is already captured by the short memory:
Following Zhang & Bottou (2026), s is drawn uniformly from [64, 256] during training and fixed at 64 at inference, and w = 256; randomizing s helps prevent the long memory from taking over the role of the short memory.
The Memory Mosaics family computes keys and queries with a single shared projection, so its learning module has 25% fewer parameters ( instead of ) than its counterparts.
A 4k window gives the same conclusions; see Appendix F.
- Transformer+: as Memory Mosaics+, with the same short memory, window , and skip schedule for , but with attention (NOPE, no position encoding) as the long memory.
d) Two-stage architecture.
- Two-stage Memory Mosaics+: as Memory Mosaics+, but the long memory is split in two, one over the target task (the current document, starting from position ) and one over the related tasks (the earlier documents in the context, ending at ):
where each normalizes its own sum. Each sum is a weighted average of unit-norm values, so its magnitude is close to 1 when the retrieved values agree and shrinks when they disagree; the two contributions therefore enter in proportion to how concordant each body of evidence is, an implicit form of the mixing weight of Section 2.3.2. Every structural choice in this model is one that Section 2 calls for: a consistent inner learner, example construction separated from prediction, and target task evidence held apart from related task evidence.
- Two-stage Transformer+: as two-stage Memory Mosaics+, but with attention (NOPE) as each of the two parts of the long memory.
Groups (a) and (b) are what the field currently builds. Group (c) adds a separate short memory for strongly dependent neighboring tokens, and group (d) further separates the target task from related tasks (Section 2.3.2).
3.3 EXPERIMENTS ON RICH REPRESENTATION AND PREDICTIVE DISENTANGLEMENT
The positive impact of large training length . At large , vanishes for a consistent inner learner, so the training objective of Eq. (3) is dominated by what the representation has discarded. Minimizing it produces a rich representation, which provides the features that predictive disentanglement then groups. That is, a large maximum training length , holding the total amount of training data fixed, benefits tasks other than the ones trained on.
Table 1 trains Memory Mosaics models at various maximum training lengths and compares their performance at fixed evaluation lengths on SimpleWiki. Every column increases downward: the model trained at is the best at every evaluation length, including lengths at which the extra context it saw during training is never available.
Figure 3 fine-tunes the Memory Mosaics models trained at (those of Table 1, plus one at 2k) on mathematics (Yu et al., 2023) and evaluates them on GSM8K, whose problems are shorter than 1k tokens. The result shows a positive correlation between l and downstream math reasoning performance.
The importance of a consistent inner learner.
The gain above depends on consistency. If the inner learner is not consistent, does not vanish at large , so loses the direct optimization pressure, and disentanglement loses the rich features it needs.
| Training length l | Evaluation length l' | |||
|---|---|---|---|---|
| 4k | 8k | 16k | 32k | |
| 4k | 48.55 | — | — | — |
| 8k | 48.93 | 48.82 | — | — |
| 16k | 48.97 | 49.19 | 49.32 | — |
| 32k | 49.15 | 49.41 | 49.64 | 49.68 |
| 64k | 49.19 | 49.48 | 49.84 | 50.00 |
| Δ > 0 | ✓ | ✓ | ✓ | ✓ |
Table 1: Memory Mosaics top-1 accuracy (%) on SimpleWiki. Rows are the training length , columns the evaluation length . Cells with are omitted. is the 64k row minus the matched-length entry. Every column increases downward.

Figure 3: GSM8K accuracy (%) of Memory Mosaics after fine-tuning on math, against training length . Accuracy tends to increase with .
Using attention with position encoding, e.g. ROPE, degrades performance. See Appendix E.
Splitting the memory does not duplicate inner-learner computation: the two sums run over disjoint parts of the context.
We fine-tune each model on 262k math examples, sweep the learning rate over and the number of epochs over , and report the best configuration for each model.
| l | Transformer | DeltaNet | Hybrid SWA | Hybrid DeltaNet | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4k | 8k | 16k | 32k | 4k | 8k | 16k | 32k | 4k | 8k | 16k | 32k | 4k | 8k | 16k | 32k | |
| 4k | 48.40 | — | — | — | 47.40 | — | — | — | 48.19 | — | — | — | 48.57 | — | — | — |
| 8k | 48.48 | 48.70 | — | — | 47.49 | 47.48 | — | — | 47.88 | 47.80 | — | — | 48.49 | 48.70 | — | — |
| 16k | 48.05 | 48.27 | 48.60 | — | 47.49 | 47.43 | 47.58 | — | 47.97 | 47.98 | 48.01 | — | 48.15 | 48.33 | 48.57 | — |
| 32k | 47.72 | 48.07 | 48.44 | 48.49 | 47.27 | 47.23 | 47.31 | 47.15 | 47.65 | 47.60 | 47.65 | 47.53 | 46.49 | 46.51 | 46.52 | 46.37 |
| 64k | 47.51 | 47.85 | 48.23 | 48.39 | 47.35 | 47.30 | 47.40 | 47.21 | 47.54 | 47.55 | 47.60 | 47.46 | 46.24 | 46.26 | 46.28 | 46.13 |
| Δ > 0 | × | × | × | × | × | × | × | ✓ | × | × | × | × | × | × | × | × |
Table 2: Top-1 accuracy (%) on SimpleWiki for architectures whose inner learners lack consistency, under the same protocol as Table 1. Red: (trained at the evaluation length). Blue: . A longer max training length does not help these models learn new tasks; in almost every case it hurts them.

Figure 4: GSM8K accuracy (%) after fine-tuning on math, against training length l, for the four architectures of Table 2. Accuracy shows no systematic gain as l grows, unlike Memory Mosaics (Figure 3). We do not compare accuracy quantitatively across architectures, since it is easily altered by small engineering details. For example, Memory Mosaics has 25% fewer learning-module parameters ; filling this gap by adjusting its heads raises its accuracy to 28.73% at l = 4k and 30.78% at l = 64k, while its trend with l is unchanged (Appendix D).
Table 2 repeats the protocol of Table 1 for four architectures whose inner learners lack consistency: the Transformer (attention with ROPE), DeltaNet (a delta-rule recurrence), Hybrid DeltaNet, and Hybrid SWA. The sign flips from beneficial to harmful. None shows a systematic gain, while Memory Mosaics in Table 1 benefits from a larger maximum training length. For all four, the best configuration is to train at or just beyond the evaluation length. The downstream results agree: fine-tuned on math in the same way as Memory Mosaics (Figure 3), none shows a systematic gain in GSM8K accuracy as l grows (Figure 4).
Predictive disentanglement. Predictive disentanglement reduces the sample complexity of a new task: the G-group partition of the latent is learned from the training tasks and reused, and only the prediction within each group is recomputed for the new task (Eq. (4)). A consistent inner learner, which keeps the optimization pressure on the representation (Section 2.2), lets training find such a partition and therefore benefits from a large G; an inconsistent one cannot.
Table 3 sweeps the number of heads for Memory Mosaics, Transformer, and Hybrid SWA. The sign splits along consistency: Memory Mosaics gains as the number of heads rises, while the Transformer and Hybrid SWA lose.
| Model | SimpleWiki top-1 (%), | GSM8K accuracy (%), fine-tuned | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Number of groups (heads) | Number of groups (heads) | |||||||||||
| 4 | 8 | 16 | 32 | 64 | 4 | 8 | 16 | 32 | 64 | |||
| Memory Mosaics | 48.43 | 48.63 | 48.97 | 49.07 | 49.02 | ✓ | 21.53 | 25.32 | 25.78 | 28.43 | 27.60 | ✓ |
| Transformer | 48.31 | 48.38 | 48.05 | 47.92 | 47.08 | ✕ | 28.81 | 26.76 | 27.52 | 26.84 | 24.18 | ✕ |
| Hybrid SWA | 48.00 | 47.95 | 47.97 | 47.67 | 46.85 | ✕ | 26.16 | 27.67 | 27.98 | 25.55 | 22.82 | ✕ |
Table 3: Effect of the number of groups (heads) at fixed model width: raising the number of heads raises and shrinks each group. All models are pre-trained at length . Left: top-1 accuracy on SimpleWiki, evaluated at length . Right: GSM8K accuracy after fine-tuning as in Figure 3. is (64 heads - 4 heads).
DeltaNet and Hybrid DeltaNet are omitted, because changing the number of heads also affects the total recurrent state size.
The per-head gate is not the cause. See Appendix H for ablation with gate removed.
The ROPE position encoding is not the cause. See Appendix H for ablation with ROPE removed.
3.4 INFERENCE-TIME LEARNING
Scaling the per-task length at inference. Consider first the simple case in which there are no related tasks, in training or at evaluation — only isolated ones. The inner learner of Section 2.1 reads a support set of examples drawn independently from one task. A token sequence does not come this way: neighboring tokens are strongly dependent, whereas sufficiently separated blocks behave as approximately independent (Yu, 1994; Mohri & Rostamizadeh, 2008). This is why in “+” architectures (Figure 2c) we handle neighboring tokens separately and delay the long memory to ignore neighboring tokens.
To test this, we train four models (Transformer, Transformer+, Memory Mosaics, Memory Mosaics+) with a maximum sequence length of 16k under a document-wise causal mask, which confines attention computation within each document even if it is very short (never across documents). We evaluate them on synthetic long documents formed by concatenating Simple English Wikipedia articles within each cluster, delimited by \n\n.

Figure 5: Left: Transformer vs Transformer+. Right: Memory Mosaics vs Memory Mosaics+. x-axis: evaluation per-document length. The gap widens with length.
Figure 5 shows the result. Transformer+ improves on Transformer, and Memory Mosaics+ improves substantially on Memory Mosaics. Both “+” models extrapolate beyond the training length. The trend does not depend on how the short memory is implemented. See Appendix G for ablation.
Scaling the number of related tasks at inference. We now return to the realistic case: few examples from the target task, and many from related tasks. Pooling all of them is biased; Section 2.3 prescribes modeling them separately and combining them dynamically, which is what the two-stage models do. The dynamic mixing term is implicitly controlled via the magnitudes of the two parts. See Appendix I for details.
Figure 6 shows the result. One-stage models peak around their training length and then decline or flatten. Two-stage Transformer+ keeps improving, though slowly; two-stage Memory Mosaics+ improves quickly. The rightmost panel repeats the comparison at 8B scale, over established architectures, hybrids, and two-stage + variants, and every curve keeps its shape — even though each member of the Memory Mosaics family is smaller than its counterpart . Capacity is not the missing ingredient; structure is.

Figure 6: Accuracy as the number of related tasks in the context grows. Training length . At 1.5B: 1) RNN and hybrid architectures; 2) Transformer versus two-stage Transformer+; 3) Memory Mosaics versus two-stage Memory Mosaics+. Panel 4) repeats the comparison at 8B.
4 CONCLUSION
Open-world AI asks for a machine that takes up tasks it was not built for — the first requirement, inference-time learning. Modeling the problem with tasks that share latent factors, and decomposing the training objective, this work derives two more requirements, a rich representation and a predictive disentanglement, and two predictions: that the inner learner must be consistent, and that the target task and the many related tasks in a long context must be handled separately. The experiments test each qualitatively, asking whether a model has the property or lacks it. Models with these properties improve as the training length l or the number of related tasks grows, while the others degrade.
REFERENCES
Sandhini Agarwal, Lama Ahmad, Jason Ai, Sam Altman, Andy Applebaum, Edwin Arbus, Rahul K Arora, Yu Bai, Bowen Baker, Haiming Bao, et al. gpt-oss-120b & gpt-oss-20b model card. arXiv preprint arXiv:2508.10925, 2025.
Zhangir Azerbaijan, Hailey Schoelkopf, Keiran Paster, Marco Dos Santos, Stephen McAleer, Qiaochu Jiang, Jia Deng, Stella R Biderman, and Sean Welleck. Llemma: An open language model for mathematics. In International Conference on Learning Representations, volume 2024, pp. 40622–40649, 2024.
Adrien Bardes, Jean Ponce, and Yann LeCun. VICReg: Variance-invariance-covariance regularization for self-supervised learning. In International Conference on Learning Representations, 2022.
Jonathan Baxter. A model of inductive bias learning. Journal of artificial intelligence research, 12:149–198, 2000.
Loubna Ben Allal, Anton Lozhkov, Guilherme Penedo, Thomas Wolf, and Leandro von Werra. Cosmopedia, February 2024. URL https://huggingface.co/datasets/HuggingFaceTB/cosmopedia.
Alberto Bietti, Vivien Cabannes, Diane Bouchacourt, Herve Jegou, and Leon Bottou. Birth of a transformer: A memory viewpoint. Advances in Neural Information Processing Systems, 36:1560–1588, 2023.
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pp. 1597–1607. PMLR, 2020.
Yongqiang Chen, Wei Huang, Kaiwen Zhou, Yatao Bian, Bo Han, and James Cheng. Towards understanding feature learning in out-of-distribution generalization. arXiv preprint arXiv:2304.11327, 2023.
DeepSeek-AI. Deepseek-v4.1-flash: Pushing the limits of kv cache compression. Technical report, DeepSeek-AI, 2026. URL https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash.
Simon S Du, Wei Hu, Sham M Kakade, Jason D Lee, and Qi Lei. Few-shot learning via learning the representation, provably. arXiv preprint arXiv:2002.09434, 2020.
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International conference on machine learning, pp. 1126–1135. PMLR, 2017.
Marta Garnelo, Dan Rosenbaum, Christopher Maddison, Tiago Ramalho, David Saxton, Murray Shanahan, Yee Whye Teh, Danilo Rezende, and SM Ali Eslami. Conditional neural processes. In International conference on machine learning, pp. 1704–1713. PMLR, 2018.
Andrew Gelman and Jennifer Hill. Data analysis using regression and multilevel/hierarchical models, volume 1. Cambridge university press, 2007.
Erin Grant, Chelsea Finn, Sergey Levine, Trevor Darrell, and Thomas Griffiths. Recasting gradient-based meta-learning as hierarchical bayes. arXiv preprint arXiv:1801.08930, 2018.
László Györfi, Michael Kohler, Adam Krzyżak, and Harro Walk. A distribution-free theory of nonparametric regression. Springer, 2002.
James J Heckman. Sample selection bias as a specification error. Econometrica: Journal of the econometric society, pp. 153–161, 1979.
Hyunjik Kim, Andriy Mnih, Jonathan Schwarz, Marta Garnelo, Ali Eslami, Dan Rosenbaum, Oriol Vinyals, and Yee Whye Teh. Attentive neural processes. arXiv preprint arXiv:1901.05761, 2019.
Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Irena Gao, et al. Wilds: A benchmark of in-the-wild distribution shifts. In International Conference on Machine Learning, pp. 5637–5664. PMLR, 2021.
Yann LeCun. A path towards autonomous machine intelligence version 0.9. 2, 2022-06-27. Open Review, 62(1):1–62, 2022.
Tianle Li, Ge Zhang, Quy Duc Do, Xiang Yue, and Wenhu Chen. Long-context llms struggle with long in-context learning. arXiv preprint arXiv:2404.02060, 2024.
Zhuang Liu and Kaiming He. A decade's battle on dataset bias: Are we there yet? In International Conference on Learning Representations, volume 2025, pp. 41433–41449, 2025.
Manu. Project gutenberg. https://huggingface.co/datasets/manu/project_gutenberg, 2023.
Ofer Matan, Christopher J Burges, Yann LeCun, and John Denker. Multi-digit recognition using a space displacement neural network. Advances in neural information processing systems, 4, 1991.
Andreas Maurer, Massimiliano Pontil, and Bernardino Romera-Paredes. The benefit of multitask representation learning. Journal of Machine Learning Research, 17(81):1–32, 2016. URL http://jmlr.org/papers/v17/15-242.html.
John McCarthy, Marvin Minsky, Nathaniel Rochester, and Claude E. Shannon. A proposal for the dartmouth summer research project on artificial intelligence. Unpublished manuscript, Dartmouth College, August 1955.
Mehryar Mohri and Afshin Rostamizadeh. Rademacher complexity bounds for non-i.i.d. processes. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou (eds.), Advances in Neural Information Processing Systems, volume 21. Curran Associates, Inc., 2008.
Zach Nussbaum, John X Morris, Brandon Duderstadt, and Andriy Mulyar. Nomic embed: Training a reproducible long context text embedder. arXiv preprint arXiv:2402.01613, 2024.
Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, et al. In-context learning and induction heads. arXiv preprint arXiv:2209.11895, 2022.
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
Zihan Qiu, Zekun Wang, Xiao Li, Yanpeng Li, Yang Xu, Yixuan Wang, Huaqing Zhang, Rui Men, Bochao Mao, Chengruidong Zhang, et al. On the design of qwen3.8-next architecture: Evaluation, efficiency, and training stability. arXiv preprint arXiv:2608.30320, 2026.
Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? In International conference on machine learning, pp. 5389–5400. PMLR, 2019.
Arthur L Samuel. Some studies in machine learning using the game of checkers. IBM Journal of research and development, 3(3):210–229, 1959.
Bernhard Schölkopf, Francesco Locatello, Stefan Bauer, Nan Rosemary Ke, Nal Kalchbrenner, Anirudh Goyal, and Yoshua Bengio. Toward causal representation learning. Proceedings of the IEEE, 109(5):612–634, 2021.
David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484–489, 2016.
Charles J Stone. Additive regression and other nonparametric models. The annals of Statistics, pp. 689–705, 1985.
Dan Su, Kezhi Kong, Ying Lin, Joseph Jennings, Brandon Norick, Markus Kliegl, Mostofa Patwary, Mohammad Shoeybi, and Bryan Catanzaro. Nemotron-cc: Transforming common crawl into a refined long-horizon pretraining dataset. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 2459–2475, 2025.
Yaniv Taigman, Ming Yang, Marc'Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1701–1708, 2014.
Gerald Tesauro. Temporal difference learning and td-gammon. Communications of the ACM, 38(3):58–68, 1995.
Antonio Torralba and Alexei A. Efros. Unbiased look at dataset bias. In CVPR 2011, pp. 1521–1528, 2011. doi: 10.1109/CVPR.2011.5995347.
Nilesh Tripuraneni, Michael Jordan, and Chi Jin. On the theory of transfer learning: The importance of task diversity. Advances in neural information processing systems, 33:7852–7862, 2020.
Vladimir Vapnik. Principles of risk minimization for learning theory. Advances in neural information processing systems, 4, 1991.
Vicuna. Sharegpt vicuna unfiltered. https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered, 2023.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025a.
Songlin Yang, Jan Kautz, and Ali Hatamizadeh. Gated delta networks: Improving mamba2 with delta rule. In International Conference on Learning Representations, volume 2025, pp. 29687–29707, 2025b.
Bin Yu. Rates of convergence for empirical processes of stationary mixing sequences. The Annals of Probability, pp. 94–116, 1994.
Longhui Yu, Weisen Jiang, Han Shi, Jincheng Yu, Zhengying Liu, Yu Zhang, James T Kwok, Zhenguo Li, Adrian Weller, and Weiyang Liu. Metamath: Bootstrap your own mathematical questions for large language models. arXiv preprint arXiv:2309.12284, 2023.
Bianca Zadrozny. Learning and evaluating classifiers under sample selection bias. In Proceedings of the twenty-first international conference on Machine learning, pp. 114, 2004.
John R Zech, Marcus A Badgeley, Manway Liu, Anthony B Costa, Joseph J Titano, and Eric Karl Oermann. Variable generalization performance of a deep learning model to detect pneumonia in chest radiographs: a cross-sectional study. PLoS medicine, 15(11): e1002683, 2018.
Jianyu Zhang and Léon Bottou. Learning useful representations for shifting tasks and distributions. In International Conference on Machine Learning, pp. 40830–40850. PMLR, 2023.
Jianyu Zhang and Léon Bottou. Memory mosaics at scale. Advances in Neural Information Processing Systems, 38:38929–38956, 2026.
Jianyu Zhang, David Lopez-Paz, and Léon Bottou. Rich feature construction for the optimization-generalization dilemma. In International Conference on Machine Learning, pp. 26397–26411. PMLR, 2022.
Jianyu Zhang, Niklas Nolte, Ranajoy Sadhukhan, Beidi Chen, and Léon Bottou. Memory mosaics. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=IiagjrJNwF.
Open-world AI: a Tale of Three Requirements Supplementary Material
A A LINEAR GAUSSIAN CASE STUDY
This section makes of Eq. (3) explicit in a case where every quantity can be computed, and shows what a rich representation is there.
Data generation. Each task is a parameter :
with and mutually independent, finite, and . The irreducible error is the same for every task, .
The input feature extractor is a rank- linear bottleneck, . The output feature extractor and decoder are set to identity. The inner learner is ordinary least squares (OLS) with weight and prediction . OLS is chosen because at it attains the Bayes prediction given exactly, so the whole of the remaining error is .
Work in the whitened coordinates , and , so that and . Write
for the whitened task-signal covariance, and for the orthogonal projection onto , where is the Moore–Penrose pseudoinverse.
What the representation discards. Proposition 1. With OLS as the inner learner,
This is the expected squared task signal lying in the whitened directions orthogonal to the row space of . It does not depend on : no amount of task data recovers it, only a better does. This is the quantity Section 2.2 calls the information the representation has permanently discarded.
Proof. is symmetric and idempotent with , and .
As the OLS normal equations converge, and , so for a task ,
giving the prediction and the residual
Squaring and taking expectations,
\begin{aligned}\mathbb{E}_{\omega,x^{*},\epsilon}\big[(y^{\ast}-\hat{y}_{\infty}^{\ast})^{2}\big]&=\mathbb{E}\big[\big(\tilde{\omega}^{\top}(I-P_{\tilde{V}})\tilde{x}^{\ast}\big)^{2}\big]+2\underbrace{\mathbb{E}\big[\tilde{\omega}^{\top}(I-P_{\tilde{V}})\tilde{x}^{\ast}\epsilon\big]}_{=0}+\underbrace{\mathbb{E}[\epsilon^{2}]}_{=\sigma_{\epsilon}^{2}}\\ &=\mathbb{E}_{\omega}\big[\tilde{\omega}^{\top}(I-P_{\tilde{V}})\underbrace{\mathbb{E}[\tilde{x}^{\ast}\tilde{x}^{\ast}^{\top}]}_{=I}(I-P_{\tilde{V}})\tilde{\omega}\big]+\sigma_{\epsilon}^{2}\\ &=\mathbb{E}_{\omega}\big[\tilde{\omega}^{\top}(I-P_{\tilde{V}})\tilde{\omega}\big]+\sigma_{\epsilon}^{2}=\operatorname{tr}\big(M\left(I-P_{\tilde{V}}\right)\big)+\sigma_{\epsilon}^{2}.\end{aligned}The cross term vanishes because is zero-mean and independent of . The second-to-last equality uses idempotency, , and the last uses for symmetric . Subtracting gives the claim.
What the best representation retains. Proposition 2. Let with . Then
attained by any whose whitened row space spans the top- eigenvectors of .
Proof. Since , minimizing the former is maximizing , subject to .
Put . It is again an orthogonal projection — symmetric and idempotent, — of the same rank. With ,
Because is an orthogonal projection, and . The sum is therefore at most , attained at and , that is and . This is exactly the projection onto the span of the top- eigenvectors of , and the minimum value is .
Why a second principle is needed. Proposition 2 determines a subspace, not a basis: replacing by for any invertible leaves unchanged, and with it the loss. The large- pressure of Section 2.2 therefore fixes what the representation must retain and says nothing about how those directions are arranged into groups. Choosing the arrangement is the separate job of predictive disentanglement at small — the same invariance that makes independent of how organizes .
B EXPERIMENT DETAILS
B.1 ARCHITECTURE
Every model shares the layout of Section 3.2: a token embedding, a stack of blocks each pairing a learning module with a SwiGLU feed-forward network, and a linear decoder. Embeddings are untied. Table 4 gives the settings held fixed at each of the two scales.
| 1.5B | 8B | |
|---|---|---|
| model dimension | 2048 | 4096 |
| layers | 24 | 32 |
| head dimension | 128 | 128 |
| heads | 16 | 32 |
| FFN hidden dimension | 5632 (2.75 ) | 14336 (3.5 ) |
| vocabulary (Mistral-7B-v0.1) | 32000 | 32000 |
Table 4: Architecture settings shared by all models at each scale. The feed-forward width follows the Llama SwiGLU convention (see text), and the input and output embeddings are not tied.
The feed-forward width follows the Llama SwiGLU convention: a nominal expansion is multiplied by to compensate for SwiGLU's three weight matrices, then by a size-dependent factor (1.0 at 1.5B, 1.3 at 8B) and rounded up to a multiple of 256. The hidden dimension is therefore and , not .
Position encoding. ROPE splits each head into channel pairs and rotates pair of the query and key by an angle at position , with and , where is the head dimension.
Wherever ROPE is used, its base is scaled linearly with the span the layer attends over, at a fixed ratio .
This applies to the short sliding window (256), to the sliding-window blocks of the hybrids (2k), and to the Transformer of Table 2 at each of its training lengths. The Transformer baseline is therefore given a correctly rescaled ROPE at every , so its behaviour in Table 2 is not an artifact of a mistuned .
Hybrids. The hybrids interleave local and global blocks 1:1: even-numbered layers are local, odd-numbered layers are full attention without position encoding, so layer 0 is local and the last layer is full attention. That gives 12 of each at 1.5B and 16 of each at 8B. The local block differs by family: Hybrid SWA uses sliding-window attention with ROPE, while Hybrid DeltaNet uses a recurrence and therefore carries no position encoding at all.
B.2 TRAINING
All models are trained with AdamW (, , ) and weight decay 0.1, peak learning rate with 200 warmup steps and a cosine decay to 1% of peak, and gradient clipping at 1.0. Weight decay is not applied to the learned bandwidth and damping coefficients, whose optima are not at zero. Training is in bf16 under FSDP. Every run uses the same seed; no pre-training hyper-parameter is tuned per model.
Token budget. The 1.5B models train for 4000 steps and the 8B models for 8000, at a global batch of tokens per step. For the training-length sweeps of Tables 1 and 2, the number of GPUs and the per-device batch are chosen together so that this global batch is identical at every :
| training length | 4k | 8k | 16k | 32k | 64k |
|---|---|---|---|---|---|
| GPUs | 256 | 256 | 256 | 128 | 64 |
| tokens / step | 4.19M |
Every model in that comparison therefore sees the same number of tokens in the same number of optimizer steps, and only the length of the sequences differs.
Data. Documents are drawn from six sources in the proportions of Table 5. The percentages are shares of documents, not of tokens. Cosmopedia and NemotronCC-high mainly contain short documents, so their token contribution is well below their share of the documents.
| Source | % of documents |
|---|---|
| Cosmopedia (Ben Allal et al., 2024) | 71.17 |
| NemotronCC-high (Su et al., 2025) | 22.89 |
| open-web-math (Azerbaiyev et al., 2024) | 4.77 |
| arXiv (Azerbaiyev et al., 2024) | 0.88 |
| ShareGPT (Vicuna, 2023) | 0.21 |
| Gutenberg books (Manu, 2023) | 0.07 |
Table 5: Training mixture, as a share of documents.
Documents are embedded with Nussbaum et al. (2024) and partitioned by -means into 1200 clusters (1150 for training, 50 held out for validation). Each training step draws from 32 clusters; within a step, a sequence is built from documents of a single cluster, delimited by [bos] and [eos], concatenated and truncated at .
B.3 EVALUATION CLUSTERS
The same clustering procedure gives 50 clusters on Simple English Wikipedia. The corpus contains large families of near-template stubs — United States counties, Italian comuni, French communes — and -means naturally collects each family into a cluster of its own:
Saint-Créac is a commune in the Gers department. It is in southwestern France. Related pages: Communes of the Gers department.
Saint-Georges is a commune in the Gers department. It is in southwestern France. Related pages: Communes of the Gers department.
Tourdun is a commune in the Gers department. It is in southwestern France. Related pages: Communes of the Gers department.
We remove these clusters, identified from the documents alone and not from any model's predictions, to avoid trivial solutions. That leaves 19 clusters, used in all main-text SimpleWiki evaluations. Figure 7 repeats the comparison on all 50: the conclusion is unchanged.

Figure 7: Memory Mosaics and two-stage Memory Mosaics+ on all 50 Simple English Wikipedia clusters, at 1.5B. As Figure 6, without the cluster selection.
C EVALUATION ON SIMPLE ENGLISH WIKIPEDIA WITHOUT CLUSTERING
The whole of Simple English Wikipedia is treated as one pool of related tasks, with no clustering. Only the evaluation changes. The training and the evaluation sequence construction are the same as in Figure 6. The pattern is unchanged — two-stage models keep improving, one-stage models peak and decline — so the conclusion does not rest on the clustering step. The two figures cover different portions of the evaluation corpus, so their shapes are comparable and their magnitudes are not.

Figure 8: Accuracy as the number of related tasks in the context grows, at 1.5B. As Figure 6, but the whole of Simple English Wikipedia is treated as related tasks, with no clustering. 1) RNN and hybrid architectures; 2) Transformer versus two-stage Transformer+; 3) Memory Mosaics versus two-stage Memory Mosaics+.
D MEMORY MOSAICS WITH MATCHED PARAMETERS
Memory Mosaics has no query projection, so with the same head configuration its learning module has 25% fewer parameters than in the other architectures . Table 6 closes that gap at the 1.5B scale by using 43 heads of dimension 64 instead of 16 heads of dimension 128. The key, value, and output projections then have parameters per block, against for attention in the other architectures, a match within 1%. Data, optimizer, and the fine-tuning protocol are unchanged. The table shows that a small engineering change shifts the accuracy level while leaving the sign of intact, which is why the main text makes qualitative comparisons rather than quantitative ones.
| Model | Training length l | ||
|---|---|---|---|
| 4k | 64k | ||
| Memory Mosaics (16 heads 128 dim) | 25.93 | 28.58 | ✓ |
| Memory Mosaics (43 heads 64 dim) | 28.73 | 30.78 | ✓ |
Table 6: GSM8K accuracy (%) after fine-tuning as in Figure 3, at 1.5B. is (64k - 4k).
E POSITION ENCODING ON THE LONG-RANGE ATTENTION
Transformer+ applies ROPE to the short sliding window and none to the long-range attention above it. Figure 9 repeats the setting of Figure 5 with a third curve, a Transformer+ whose long-range attention also carries ROPE. Transformer+ with ROPE is worse than Transformer+, confirming the choice of using NOPE in the long-range attention, as in the main text.

Figure 9: As Figure 5, at 1.5B, with a third curve: Transformer+ whose long-range attention also carries ROPE.
F SLIDING-WINDOW LENGTH IN HYBRID SWA
| Hybrid SWA-4k | Hybrid SWA-2k | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| 4k | 8k | 16k | 32k | 4k | 8k | 16k | 32k | ||
| 4k | 47.94 | — | — | — | 48.19 | — | — | — | |
| 8k | 47.97 | 47.90 | — | — | 47.88 | 47.80 | — | — | |
| 16k | 47.91 | 47.91 | 48.00 | — | 47.97 | 47.98 | 48.01 | — | |
| 32k | 47.68 | 47.69 | 47.71 | 47.62 | 47.65 | 47.60 | 47.65 | 47.53 | |
| 64k | 47.54 | 47.54 | 47.64 | 47.49 | 47.54 | 47.55 | 47.60 | 47.46 | |
| × | × | × | × | × | × | × | × | ||
Table 7: Top-1 accuracy (%) on SimpleWiki for Hybrid SWA with a sliding-window length of 4k vs 2k, under the same protocol as Table 1. The window length does not change the conclusion: for both, a longer max training length l does not help the model learn new tasks.
G WHAT IMPLEMENTS THE SHORT MEMORY
Section 3.4 argues for a short-memory component to handle highly dependent local tokens, but says nothing about its type. Figure 10 sweeps that short memory in Memory Mosaics+ over attention with ROPE, a Mosaics module with the leaky-average key extractor, and DeltaNet, in the setting of Figure 5. The curve “None” indicates no short memory, i.e. Memory Mosaics. The other three curves follow the same trend: what matters is a separate short memory, not how it is implemented.

Figure 10: As Figure 5, at 1.5B, sweeping the short-memory implementation in Memory Mosaics+: attention with ROPE, a Mosaics module with the leaky-average key extractor, and DeltaNet.
H PER-HEAD GATE AND POSITION ENCODING
Table 8 repeats the comparison of Table 3 with two ablations: Memory Mosaics without the per-head sigmoid gate, and a Transformer without any position encoding [NOPE]. Neither changes the sign. Without the gate, Memory Mosaics still gains as grows, so the gate is not what produces the gain. Without ROPE, the Transformer still does not gain, so position encoding is not what prevents it; the same holds for Hybrid SWA, whose full-attention layers already carry no position encoding. Transformer [NOPE] is lower overall, as expected: with no position encoding anywhere, it cannot model the dependence between nearby tokens. Only the sign matters here.
| Model | Number of groups G (heads) | Δ > 0 | ||||
|---|---|---|---|---|---|---|
| 4 | 8 | 16 | 32 | 64 | ||
| Memory Mosaics | 48.43 | 48.63 | 48.97 | 49.07 | 49.02 | ✓ |
| Memory Mosaics [no per-head gate] | 48.15 | 48.29 | 48.46 | 48.52 | 48.47 | ✓ |
| Transformer | 48.31 | 48.38 | 48.05 | 47.92 | 47.08 | ✕ |
| Transformer [NOPE] | 45.27 | 45.44 | 45.36 | 45.37 | 44.40 | ✕ |
| Hybrid SWA | 48.00 | 47.95 | 47.97 | 47.67 | 46.85 | ✕ |
Table 8: Top-1 accuracy (%) on SimpleWiki, evaluated at length ; all models trained at length . As Table 3, with two ablations added: Memory Mosaics without the per-head gate, and Transformer without position encoding [NOPE]. Model width is fixed, so raising the number of heads raises the number of groups and shrinks each group. Row maxima in bold. is (64 heads - 4 heads).
I THE IMPLICIT BALANCING WEIGHT
The two-stage models never compute the optimal weight of Section 2.3; each part is normalized on its own, so the two contributions enter in proportion to their output magnitudes. That magnitude is informative because each part is a normalized average of unit-norm values: its norm approaches 1 when the retrieved values agree and falls towards 0 when they disagree. Figure 11 plots the two against evaluation length. The target-task part stays flat while the related-task part grows — the related evidence is becoming more concordant as it accumulates — so the balance shifts towards it with nothing computing a weight. This reproduces the direction in which moves as related tasks accumulate, though not its value; estimating the weight directly is left to future work.

Figure 11: Output magnitude of the target-task and related-task parts of the long memory in two-stage Memory Mosaics+ at 1.5B, against evaluation length.