A benchmark asks one question and grades one answer. A scientist reads a figure, loads a signal, writes code, reads the traceback, and tries again. This paper is 35 pages about the second thing — and almost all of it is plumbing.
Picture an afternoon in a lab. A graduate student has a physiological recording — three hundred thousand samples of an electrophysiology trace, four channels, sampled fast enough that the interesting events are a few dozen samples wide. She also has a PDF: a 2019 methods paper whose Figure 3 shows the exact artefact she thinks she is looking at, with the axis labels that matter printed inside the figure and not in the caption. She has a repository of analysis code that ran fine last year and now fails on line 214. And she has a question that nobody has written down as a multiple-choice item: is this artefact real, and if it is, what does the signal do over the next two seconds?
Now count what answering that requires.
She has to read a rendered page, not a text extraction — because the numbers she needs are burned into a figure. She has to ingest a long numerical signal as numbers, not as a sentence describing it. She has to run code, look at what came back, and change the code. She has to keep going — ten, forty, two hundred steps — without losing the thread of what she was testing. And at the end she has to produce a number: a forecast, with a horizon somebody else chose.
Each of those is a different kind of competence, and the depressing thing is that a model can be excellent at every one of them separately and still be useless in that room, because the room is a loop and the competences are graded as isolated turns.
The introduction does something unusually honest for a model report: it says exactly which competitors are good at what, and where each stops. Two families, two different failures.
| Family | What it does well | Where it stops (the paper's claim) | What that costs in the lab |
|---|---|---|---|
| General-purpose LLMs | Broad instruction following, general reasoning | "not specialized for heterogeneous scientific modalities, domain protocols, or verifiable tool interaction" | It will describe your EEG trace in fluent English and get the numbers wrong, because it never saw the numbers — it saw a picture of them or a paragraph about them |
| Scientific multimodal models | Perception and reasoning over specialised inputs — microscopy, remote sensing, figures | "still often evaluated as static question-answering systems rather than long-horizon agents" | It answers the question about Figure 3 correctly and then cannot open the repository, run the script, or read the traceback |
Read those two rows next to each other and the shape of the paper appears. It is not proposing a new attention mechanism. It is proposing that the union of those two columns is a single engineering problem, and then spending thirty pages on the engineering.
The report describes a series. Three names appear, and keeping them apart will save you confusion later:
| Name | What it is | Where it appears in the paper |
|---|---|---|
| Intern-S2-Preview-397B | The main model. 397 billion parameters, a sparse mixture-of-experts backbone, with a vision path, a time-series encoder, and a time-series forecaster attached. Everything in the evaluation tables is this model | Everywhere — "with Intern-S2-Preview-397B as the main model evaluated in this report" |
| Intern-S2-Preview-35B | A smaller sibling, used for one controlled training study — the adaptive-length-regularization ablation in Figure 8 | §4.3.2 only |
| Intern-MemDec-4B | A 4-billion-parameter memory, trained separately on biology, that is attached to the frozen 397B model at inference. It is explicitly "a separate extension model," not a component of the base model | §2.1, §5.3 |
There is also a predecessor that acts as the control throughout: Intern-S1-Pro, a trillion-parameter model from the same group. Intern-S2-Preview-397B has, in the paper's phrasing, "less than half the number of parameters" of it. Hold on to that ratio — 397 against roughly 1,000 — because several of the paper's most interesting results are "the smaller model won," and a result like that only means something if you know the sizes.
Here is the whole paper in one diagram. Every box gets a chapter.
This paper uses four terms in senses slightly narrower than their common usage, and getting them precise now will save confusion in every later chapter.
| Term | Loose usage | What it means here, precisely |
|---|---|---|
| Agentic | "Uses tools" | Trained on interactive rollouts in an executable environment, where the reward comes from the environment's final state and the credit is assigned back to specific policy-generated token spans |
| Rollout | "A model output" | One complete sampled trajectory — for reasoning RL, a single generation up to 65,536 tokens; for agentic RL, an entire multi-turn session with tool calls and observations interleaved |
| Harness | "The wrapper around a model" | A specific, named artefact that decides how the agent is instantiated, driven, and observed — and which the paper treats as a variable, running RL inside OpenClaw, Claude Code, OpenCode, OpenHands, and Mini-SWE without modifying any of them |
| Memory | "Conversation history" or "a vector store" | A separately trained 4-billion-parameter model whose next-token distribution is convex-combined with a frozen backbone's, weighted per token by a learned router |
The third one causes the most trouble on a first read. When the paper says "harness × task," it is not describing a design pattern in the abstract; it is describing the fact that the agent runtimes on your laptop can be the training environment for a 397-billion-parameter model, unmodified, and that the only thing that had to change was the model service they call.
Before the mechanisms, it helps to know what the engineers were actually up against, because almost every design choice in Chapters 4 through 8 is a response to one of exactly three pressures.
| Constraint | The concrete form it takes here | Chapters it dictates |
|---|---|---|
| Generation is the bottleneck | A maximum generation length of 65,536 tokens, sampled 8,192 times per batch, on a 397-billion-parameter mixture of experts. Rollout dominates the wall clock — Chapter 4 derives roughly 82% from the paper's own speedup numbers | 4 — partial rollout, speculative decoding, online draft training |
| The reward is a program, and programs can be gamed | Executable environments with writable filesystems, git histories, and test files, optimised against by a policy with 214,854 chances to find a shortcut | 7 — verifier integrity, all-correct semantics, infrastructure-error tracking |
| The training signal is heterogeneous | One batch may contain a competition maths problem, an open-ended protocol write-up, a repository-level bug fix, and a terminal task — different lengths, different entropies, different verifiers | 5 — GEPO, adaptive length regularisation; 8 — two experts and distillation |
Hold those three in mind and the post-training half stops being a list of tricks. Every mechanism is an answer to "generation is expensive," "the reward is attackable," or "these tasks are not comparable."
Both halves of post-training use reinforcement learning, and they are not equally mature. It helps to see why by comparing what one episode looks like in each.
| Reasoning RL (Chapters 4–5) | Agentic RL (Chapters 6–7) | |
|---|---|---|
| An episode is | One generation | A whole session: dozens of turns, tool calls, observations |
| Who produces the tokens | The policy, start to finish | The policy for some spans; the environment and the harness for the rest |
| Where the reward comes from | A verifier over the final answer | A verifier over the final environment state |
| Infrastructure required | An inference engine and a trainer | Those, plus sandboxes, a gateway, protocol adapters, a trace store, judgers, and a task synthesiser |
| What can go wrong invisibly | Numerical drift between engines | All of that, plus leaked solutions, corrupted verifiers, crashed containers scored as passes, and loss computed on text the model never wrote |
| Cost per unit of signal | One reward per generation | One reward per session — far more compute for the same scalar |
Read the last row and Chapter 9's agentic results stop being surprising. Agentic RL buys one number for the price of a whole interactive session, which means fewer gradient signals per accelerator-hour than reasoning RL by a large factor. A preview system being competitive but not leading on long-horizon coding is what a newer, more expensive training stage looks like.
The name is not modesty for its own sake. The conclusion is explicit: "Intern-S2-Preview remains a preview system; future work should improve reliability over longer scientific workflows, expand domain-specific memories and task environments, strengthen verifiers, and deepen integration with specialized scientific tools."
Each clause of that sentence points at a specific gap you will be able to locate in the results by Chapter 9:
| The stated future work | The evidence for it in the paper |
|---|---|
| "reliability over longer scientific workflows" | ResearchClawBench 18.44 — end-to-end research succeeds on roughly one task in five, and no model in the table exceeds 23.35 |
| "expand domain-specific memories" | Exactly one memory exists (biology), and seven of its 21 tasks regressed |
| "expand … task environments" | 43.5% of the 214,854 executable tasks live inside nine environments |
| "strengthen verifiers" | The leakage countermeasures in §4.4.3 are a list of holes found, which implies a list of holes not yet found |
| "deepen integration with specialized scientific tools" | The agentic task distribution is coding and terminal work, not instrument control or laboratory information systems |
The model itself is public — released at huggingface.co/internlm/Intern-S2-Preview, with the agentic RL framework at github.com/InternLM/xtuner. A 35-page report plus open weights plus the training framework is an unusually complete release, and it is worth registering that this is what "preview" means here: not a teaser, but a working system with its gaps written down.
Almost every named technique in the post-training section is somebody else's, cited: GEPO comes from a companion paper by the same lab, R3 from a 2026 routing-replay paper, the bidirectional-KL masking idea from KPop, dynamic sampling from DAPO, the Muon optimizer from two 2025 works, the hybrid LK draft loss from a speculative-decoding paper, the distillation warmup from Nemotron 3 Ultra, the PDF parser is MinerU2.5-Pro, the vector database is Milvus.
That is not a criticism. It is the point. The contribution of a system report like this is not a new trick; it is the claim that these particular pieces compose into a pipeline that stays stable at 397 billion parameters, 65,536-token generations, and 256K-token sequences — and the specific glue that makes them compose. When you read a chapter and think "that is just X," the honest follow-up question is: had anyone made X survive contact with the other five?
The phrase appears in the abstract's first sentence and it is easy to nod past. It is doing more work than "multimodal" usually does, because the modalities science produces are not the modalities the internet produces.
| Modality | What a consumer multimodal model was trained on | What science actually hands you | Why the gap bites |
|---|---|---|---|
| Images | Photographs, screenshots, memes, product shots | Fluorescence micrographs, ultra-high-resolution satellite scenes, crystal diffraction patterns, gel electrophoresis lanes | None of these look like anything in a web crawl. A "bright blob" means something specific, and the meaning is domain knowledge, not perception |
| Documents | Web pages, cleanly structured HTML | PDFs with two-column layout, interline equations, multi-page tables, and figures whose axis labels are the data | Text extraction deletes the structure. See Chapter 3 |
| Numbers | Numerals in sentences | Three hundred thousand samples of a four-channel physiological trace at kilohertz rates | A tokeniser is a terrible instrument for a signal. See Chapter 1 |
| Sequences | Natural language | Nucleotide strings, amino-acid strings, SMILES, crystal lattice parameters | These are languages with rigid grammars and no redundancy — one wrong character is a different molecule |
| Environments | Not a modality at all | A repository, a container, a shell, an instrument driver | You do not perceive it. You act in it and read what came back. See Chapters 6–7 |
Look at the last row. It is not a modality in the usual sense, and that is precisely the paper's argument: the fifth thing on the list is what turns a question-answerer into a collaborator, and it is the one that no amount of better perception will give you.
The four post-training stages are not independent improvements you could reorder or drop. Each one consumes something the previous one produced. Naming those dependencies makes the whole thing memorable:
| Stage | Requires from upstream | What breaks if you skip the upstream stage |
|---|---|---|
| SFT | A pre-trained model with scientific knowledge and document structure in it | Instruction demonstrations get grafted onto a model that does not know the domain, so you are teaching format over an empty room |
| Multi-task RL | SFT's "instruction-following and tool-use initialization" | RL from a base model explores a space where almost nothing is a well-formed response. The verifier says "no" to everything and there is no gradient signal |
| Agentic RL | The same SFT checkpoint's "long-horizon agentic trajectories" and tool-use patterns | An agent that cannot emit a valid tool call never reaches an environment state a verifier can score. Every rollout is a zero |
| On-policy distillation | Two experts from the same SFT checkpoint | Teachers and student diverge, student trajectories fall outside teacher support, and the O(H) sampled-token payload stops being sufficient. See Chapter 8 |
The last row is the sharpest. Chapter 8's most consequential efficiency decision — transmitting one number per token instead of sixty-four — is licensed entirely by a choice made three stages earlier, that both teachers branch from one SFT checkpoint. Skip that and the final stage's communication budget multiplies by 64.
If you read alongside the arXiv HTML, here is the correspondence, so you can check any claim against its source.
| Chapter | Paper sections | Key equations |
|---|---|---|
| 0 — the loop | Abstract, §1 | — |
| 1 — the body | §2, §2.2.1, §2.2.2 | — (the time-series modules are described, not formalised) |
| 2 — Memory Decoder | §2.1, §5.3 (Memory Decoder), Figures 1 and 12 | (1)–(4) |
| 3 — reading the page | §3, §3.1, §3.2, §3.3, Figures 3–5 | (5)–(9) |
| 4 — rollout economics | §4.3, §4.3.1, §4.3.3, Figure 7 | (10)–(13), (18)–(24) |
| 5 — shaping advantage | §4.3.2, §4.3.4, §4.3.5, Figure 8 | (14)–(17), (25)–(29) |
| 6 — harness × task | §4.4, §4.4.1, §4.4.2, Table 1, Figures 9–10 | — |
| 7 — credit and integrity | §4.4.3, Figure 11 | (30) |
| 8 — two experts | §4.5, §4.1, §4.2, Figure 6 | (31)–(36) |
| 9 — the scoreboard | §5, §5.1, §5.2, §5.3, Tables 2–5 | — |
| 10 — connections | §6 and the reference list | — |
Every one of these gets derived, verified, or interrogated in a later chapter. Meeting them now gives the rest of the lesson somewhere to land.
| Number | What it is | Where it is unpacked |
|---|---|---|
| 397B | Parameters, against the predecessor's 1T | Ch 1 |
| 300,000 | Maximum time-series input length, up from about 240,000 | Ch 1 |
| 56.92 → 60.32 | Biology-Instructions average with a 4B memory attached to the frozen backbone | Ch 2 — recomputed by hand from a 21-row table |
| 256k / 512 | Pre-training chunk size and its overlap | Ch 3 |
| 65,536 | Maximum RL generation length — the source of the straggler problem | Ch 4 |
| 3 | Policy updates of staleness after which a paused rollout is discarded | Ch 4 |
| 2× and 1.7× | Speculative-decoding speedup on rollout and end to end | Ch 4 — the pair implies rollout was ~82% of wall clock |
| 8,192 | Completed responses per rollout batch, in 8 mini-batch updates | Ch 5 |
| 214,854 | Executable coding and terminal tasks, in 62,280 environments | Ch 6 — and the ratio is the interesting part |
| 99% | Horizon-predictor accuracy | Ch 9 — it is why every forecasting success rate is 100 |
Papers of this shape attract predictable misreadings. Naming them now costs a paragraph and saves an argument.
| The misreading | What the paper actually says |
|---|---|
| "It beats GPT-5.5 and Claude-Opus-4.8" | On five scientific benchmarks it beats every model tested; on general and agentic benchmarks the claims are almost all scoped to "among open-source models," and Gemini-3.1-Pro, Claude-Opus-4.8, and GLM-5.2 lead various rows. Chapter 9 counts them |
| "Memory Decoder is part of the model" | §2.1 opens by calling it "a separate extension model for continual domain specialization, rather than a component of the base Intern-S2-Preview-397B model." None of the Table 2 or 3 numbers use it |
| "They invented GEPO / R3 / DAPO sampling / Muon" | All cited. GEPO is a companion paper from the same lab; the rest are outside work. The contribution is the composition and the two architecture extensions |
| "Agentic RL means it was trained to use tools" | It means the reward came from an executable environment's final state, verified by a program, with credit mapped back to specific token spans through a trace store — inside real third-party agent runtimes. Tool use is the surface; execution-derived reward is the substance |
Before moving on, make the opening scene mechanical. Here is the graduate student's afternoon as a sequence of nine steps, with the capability each one demands and the chapter that supplies it. This table is the whole paper's motivation compressed into one object.
| # | What she does | What the model would need | Chapter |
|---|---|---|---|
| 1 | Opens the 2019 methods PDF and looks at Figure 3 | Read a rendered page, including numbers printed inside a figure that no text extractor will recover | Ch 3 — Visual Pre-training |
| 2 | Reads the paragraph that says "as shown in Fig. 3" and connects it to the figure | Understand a figure's position in a narrative, not just its content | Ch 3 — interleaved sequences |
| 3 | Loads 300,000 samples of a four-channel trace | Ingest a long numerical signal as numbers, with cross-channel structure preserved | Ch 1 — the time-series encoder |
| 4 | Runs the analysis script; it fails on line 214 | Execute code in a real environment and read what came back | Ch 6 — harness × task |
| 5 | Reads the traceback, forms a hypothesis, edits two files | Multi-step tool use with state carried across turns | Ch 6 — the trace store |
| 6 | Runs it again. Different error. Tries again | Recover from its own mistakes without spiralling | Ch 7 — process-aware credit |
| 7 | Recalls a domain fact about this specific assay | Deep knowledge of one narrow subfield, without having lost everything else | Ch 2 — Memory Decoder |
| 8 | Forecasts the next two seconds of the signal | Emit real numbers at an instruction-specified horizon | Ch 1 — the forecasting branch |
| 9 | Writes up what she found, with the evidence chain | Long-form scientific generation grounded in what actually happened | Ch 5, Ch 8 |
Nine steps, seven distinct capabilities, one session. And here is the thing worth noticing: a benchmark can score steps 1, 3, 7, and 8 as isolated questions. It cannot score steps 4, 5, and 6 at all, because those are not questions. They are attempts, and their value depends on what happened next.
There is a reason the paper keeps saying "verifiable" and "executable," and it is not decoration. Reinforcement learning needs a reward. For a chat model, the reward usually comes from a learned preference model — a network trained to predict what a human would rate highly. That is workable and it is also a second model with its own errors, its own biases, and its own exploitable seams.
A verifiable reward is different in kind: the reward is produced by running something. Did the test suite pass? Does the SMILES string parse and satisfy the constraint? Does the crystal structure obey the symmetry group? These questions have answers that a program returns, not opinions that a network predicts.
It also explains the shape of Chapter 7. If your reward is a program, then your reward is a piece of attack surface, and an optimiser will find any hole in it long before a human notices. Half of the agentic RL section is about that.
The evaluation splits into families, and each family is answering a different question about whether the pipeline worked:
| Family | Question it answers | Example benchmarks in the paper |
|---|---|---|
| Scientific | Did the domain pre-training and SFT put real science in the weights? | Biology-Instructions, Mol-Instructions, MolecularIQ, SciReasoner, TOMG-Bench, MP20, ProteinBinder-9 |
| Scientific multimodal | Can it perceive the specialised images science actually produces? | XLRS-Bench (ultra-high-resolution remote sensing), MicroVQA (microscopy), SFE, ObsCrisis-Bench (multispectral satellite) |
| Agentic | Can it do the loop — plan, call tools, execute, recover? | SciCode, SGI-Bench, ResearchClawBench, SkillsBench, Terminal-Bench 2.1, SWE-Bench Pro, SWE-bench Multilingual, WildClawBench |
| General | Did any of the above cost it the abilities it started with? | MMLU-Pro, SimpleQA-Verified, AdvancedIF, HMMT-2026, MMMU-Pro, ChartQAPro |
| Time series | Do the two new architecture limbs do anything? | SciTS understanding and forecasting, GIFT-Eval |
The last two families are the interesting ones for a reader, because they are the ones a specialised model usually loses. A report that shows only the first three has told you nothing about whether the specialisation was paid for out of general capability. Chapter 9 will hold this table up against the results.
Before any training story, you need to know what is being trained. This chapter walks the tensor path from four different kinds of input into one hidden space, and then out again as either text or numbers. Where the paper publishes a shape, we use it. Where it does not, we say so out loud rather than inventing one — a system report is allowed to omit its hidden size, and we are not allowed to fill it in.
The report never gives you a table of layer counts. But it leaks the architecture in the places where architecture forces an engineering decision, and those leaks are reliable. Three of them:
| Sentence in the paper | Section | What it forces you to conclude |
|---|---|---|
| "For MoE policies, training–inference inconsistency arises from both expert-routing differences and numerical discrepancies between the two execution engines" | §4.3.1 | The backbone is a sparse mixture of experts. A dense model has no routing to be inconsistent about |
| "expert linear layers operate in FP8, the remaining layers use BF16, and numerically sensitive operations, including apply_rope, RMSNorm, the MoE router, recurrent states in Gated DeltaNet, and the language-model head, are computed in FP32" | §4.3.1 | Rotary position embeddings; RMSNorm rather than LayerNorm; and — the interesting one — Gated DeltaNet recurrent states, which means this is not pure softmax attention. There are gated linear-attention layers with a carried state |
| "our maximum sequence length of 256K tokens" | §4.5 | The distillation stage runs on trajectories up to 262,144 tokens. Pre-training chunks are also "capped at 256k tokens" |
A multimodal model is, mechanically, a set of projections — small learned maps that take whatever an encoder produced and re-express it as something shaped like a token embedding, so the language backbone can attend over all of it at once. Intern-S2-Preview has four such lanes.
Lane 4 is the genuinely new limb. Everything before it in the literature turns "predict the next 200 values" into "emit two hundred numerals as text," and Chapter 9 will show you exactly what that costs.
Start with the problem, because the design is a direct answer to it. Scientific time series, in the paper's list, "exhibit substantial variations in sequence length, sampling frequency, and channel dependency." Concretely, one encoder has to survive all of these:
| Domain (all named in the paper) | Rough character of the signal | What breaks a naive encoder |
|---|---|---|
| Astronomy | Long, slow, irregular light curves | Sequence length |
| Geoscience | Multi-channel, seasonal, long | Length × channel count |
| Neuroscience | Many channels, cross-channel phase structure | Channel dependency — the information is between channels |
| Physiological signals | Moderate rate, artefact-prone | Local morphology matters |
| Bioacoustics | High rate, short events | Time resolution |
| Radar (new in S2) | About megahertz — "high-frequency but short sequence lengths" | A setting Intern-S1-Pro did not support at all |
Now the pipeline, stage by stage, as §2.2.1 lays it out.
Stage 1 — temporal chunking. The input series is "partitioned into temporal chunks, enabling localized processing of long sequences." This is the same reason you tile a huge image: attention is quadratic, and 300,000 positions of quadratic attention is not a thing you do.
Stage 2 — compressive patching. Each chunk goes through three sub-steps, in order:
| Sub-step | What it does | The engineering reason |
|---|---|---|
| Normalization | Standardise the values — and, crucially, "channel-wise mean and standard deviation are retained as auxiliary statistics" | If you normalise and throw away the statistics, you have destroyed the absolute scale. A forecaster that must emit real voltages needs the mean and standard deviation back |
| CNN-based local feature extraction | Short convolutions over the raw samples | Local morphology — a spike, an edge, a transient — is a translation-invariant local pattern. That is exactly what a small convolution is for, and it is cheap |
| Q-Former temporal compression | Divide the local representations into temporal patches; "each patch is compressed by a Q-Former with learnable queries into a fixed number of tokens" | This is the length-control valve. See below |
The paper says the encoder maintains "a controllable output sequence length for heterogeneous long time series" by "dynamically adjusting the temporal patching process according to input length." Let us make that arithmetic concrete. The specific patch length and query count below are illustrative — the paper does not publish them — but the relationship between them is exactly what the sentence describes.
Let L be the patch length in raw samples and Q the number of Q-Former queries per patch. For an input of T steps:
Take the paper's stated maximum, T = 300,000, and suppose you have budgeted 1,024 tokens of the LLM's context for this signal. Solve for L with Q = 4:
Now feed the same encoder a short radar burst, T = 4,096 samples. If L stayed fixed at 1,172 you would get ⌈4096/1172⌉ = 4 patches, so 16 tokens — a four-thousand-sample signal squeezed into sixteen vectors, which is why S1-Pro could not do high-frequency short signals well. Adapt L instead: with the same 1,024-token budget, L = 4 · 4,096 / 1,024 = 16 samples per patch. Sixteen samples per patch on a megahertz signal is 16 µs of detail per token. That is what "dynamically adjusting the temporal patching process according to input length" buys, and it is why the same module now covers both astronomy and radar.
Stage 3 — the channel-wise Transformer. This is the change from the previous generation, and it is worth dwelling on because the paper states the old behaviour explicitly: Intern-S1-Pro "directly aggregated multi-channel representations through mean pooling." S2 replaces that with "a channel-wise Transformer encoder to model inter-channel dependencies before being fed into the Transformer encoder body."
Mean pooling across channels is a linear operator, and linear operators cannot see relationships. Here is the smallest example that shows it. Take three EEG channels at one time patch, with a feature that is positive when the channel leads and negative when it lags:
| Scenario | ch1 | ch2 | ch3 | Mean | What is physically happening |
|---|---|---|---|---|---|
| A — frontal lead | +0.9 | −0.3 | −0.6 | (0.9 − 0.3 − 0.6)/3 = 0.000 | A wave travelling front to back |
| B — occipital lead | −0.6 | −0.3 | +0.9 | (−0.6 − 0.3 + 0.9)/3 = 0.000 | The same wave travelling back to front |
| C — no propagation | 0.0 | 0.0 | 0.0 | 0.000 | Nothing at all |
Three physically distinct states, one identical pooled vector. The propagation direction — often the entire clinical finding — lives in the ordering across channels, and mean pooling is invariant to ordering by construction. A Transformer over the channel axis is not: its attention computes pairwise interactions, so it can represent "channel 1 is high while channel 3 is low" as a distinct pattern from its mirror image.
| Quantity | Intern-S1-Pro | Intern-S2-Preview-397B | Change |
|---|---|---|---|
| Maximum input length | about 240,000 time steps | about 300,000 time steps | ×1.25 |
| Inference speed at maximum length | baseline | "approximately 5 ∼ 6× faster" | ×5 to ×6 |
| GPU memory at maximum length | baseline | "around 20% of the previous version" | ×0.2, i.e. a 5× reduction |
| High-frequency short sequences | not supported | supported | New capability |
| Disciplinary coverage | astronomy, geoscience, neuroscience, physiological signals, bioacoustics | the same, plus radar (≈ MHz) | +1 domain |
Put those together and the practical statement is: a job that used to take a certain wall-clock time on a certain card now runs in roughly one fifth to one sixth of that time using roughly one fifth of the memory, on a 25% longer signal. If you had a single 80 GB accelerator and the old encoder saturated it at 240,000 steps, the new one has room for the 300,000-step maximum and a great deal of headroom besides. That headroom is the entire reason the radar case became possible: high-frequency signals mean more patches per second of real time.
Here is the design, from §2.2.2. Two streams condition one generator:
Two engineering decisions here deserve the "why," because both are load-bearing.
Why a Q-Former between the two streams and the forecaster? Because they have different lengths and different natures. The LLM context is however many tokens the prompt was; the encoder output is however many patch tokens the signal produced. Cross-attending a forecaster directly into both would make the conditioning cost grow with prompt length, and would give an instruction like "forecast the next 200 steps" the same weight as two hundred tokens of unrelated preamble. The Q-Former's fixed query set is a bottleneck by design: a constant, learned number of slots that both streams must compete to write into.
Why a separate horizon predictor rather than just generating until a stop token? Because a numerical branch has no stop token. A text decoder can emit an end-of-sequence symbol; a branch that emits real numbers has to be told how many to emit. The instruction says it in English ("forecast the next two seconds," "predict 96 steps ahead"), so a small module reads the instruction and converts it to an integer. The paper reports that module gets it right 99% of the time — and Chapter 9 will show you that this unglamorous component is responsible for one of the paper's largest margins, because the competing general-purpose models fail on precisely this step.
forecasting branch# Lane 4. Values out, not numerals. Called after the LLM has reasoned in text. def forecast(llm_hidden, series_tokens, stats, instruction_hidden): mu, sigma = stats # kept by the encoder's normalisation step # how many values does the instruction ask for? A numerical head has no EOS. horizon = horizon_predictor(instruction_hidden) # int, reported 99% accurate # two conditioning streams, each squeezed to a fixed number of slots sem = qformer_sem(llm_hidden) # (B, Q, D) what was asked / what the text said num = qformer_num(series_tokens) # (B, Q, D) what the signal actually did cond = cat([sem, num], dim=1) # (B, 2Q, D) constant cost, whatever the prompt y = [] state = start_token() for t in range(horizon): # causal Transformer forecaster h = forecaster_block(state, cross_attend=cond) val = value_head(h) # a REAL number, not a token id y.append(val) state = advance(state, val) return stack(y) * sigma + mu # de-normalise: the stats come back here
Three lines are worth naming. horizon = horizon_predictor(...) is the module with no analogue in a text decoder, and Chapter 9 will show it is responsible for every 100 in Table 5's success-rate column. cond = cat([sem, num]) is why the conditioning cost does not grow with prompt length. And * sigma + mu is why the normalisation step in Lane 3 was careful to retain the statistics rather than discard them — without them, the branch can emit shapes but not values.
Lane 2's most consequential line is a parameter-freezing decision, stated once in §3.1 and easy to miss: "The visual encoder remains frozen, while the LLM backbone, visual projection, and prediction head are optimized." Work out what that arrangement forces.
| Component | Trained? | What it is therefore learning |
|---|---|---|
| Visual encoder Ev | No | Nothing. It is a fixed measuring instrument. Its output space is a constant that everything else must adapt to |
| Projection Win | Yes | How to express a visual feature in the language model's coordinates |
| LLM backbone Φθ | Yes | How a scientific page unfolds — that a caption follows a figure, that a table has a header block, that an equation is referenced two paragraphs later |
| Prediction head ψ | Yes | How to map a hidden state back into the encoder's feature space so the contrastive score is computable |
Three consequences follow, and all three are load-bearing.
First, the targets stay still. The contrastive objective of Equations (7)–(8) predicts the encoder's own features. If the encoder were trainable, the target would move every step, and the cheapest way to reduce the loss would be for the encoder to collapse all patches onto one easily-predicted vector. Freezing removes that degenerate solution entirely — you cannot game a target you cannot change.
Second, the document knowledge lands in the backbone. This is the point of the whole stage. If the vision tower were doing the learning, you would end up with a better page encoder and an unchanged language model. Because only the language side moves, "the model's ability to continue a visual sequence" is written into the same weights that will later be asked to reason about the paper's contents.
Third, it is cheap. No gradients through the vision tower means no activations to keep for it, and the encoder can be run once and cached. For a stage the paper describes as "a lightweight stage for modality expansion," that is the difference between running it over your whole PDF corpus and running it over a sample.
Concept plus realisation means following actual data. Take the opening scene's question, posed to the model as a single multimodal turn, and account for every token.
| Piece of the prompt | Lane | Path into hidden space | Rough token cost |
|---|---|---|---|
| "Here is the methods paper. Look at Figure 3." | 1 — text | Tokeniser → embedding table | ~12 |
| Page 4 of the PDF, rendered | 2 — image | Frozen Ev → foreground mask → raster scan → Win | ~1,100 after masking (Chapter 3's worked example) |
| The cropped Figure 3 | 2 — image | Same path, higher effective resolution on a smaller region | ~256 |
| 300,000 samples × 4 channels of the trace | 3 — time series | Normalise (keep μ, σ) → chunk → CNN → Q-Former → channel Transformer → body | ~1,024, by construction |
| "Is this artefact real, and forecast the next two seconds." | 1 — text | Tokeniser | ~14 |
| total context | ~2,400 tokens | ||
Now the output side. The model reasons in text — that is Lane 1 again — and when it reaches the forecast, control passes to Lane 4: the horizon predictor reads "the next two seconds," converts it to an integer using the sampling rate, and the causal forecaster emits that many real values, cross-attending to both the LLM's semantic state and the encoder's numerical representations, with μ and σ from the normalisation step available to put the values back on the original scale.
Concept without realisation is decoration, so here is the whole Lane 3 path as code, with a shape comment on every line. Names follow §2.2.1; the constants marked illustrative are ones the paper does not publish.
time-series encoder# x: (B, C, T) - batch, channels, time steps. T can be up to 300,000. def encode_series(x, token_budget=1024, Q=4): # Q = queries per patch (illustrative) B, C, T = x.shape # --- normalisation: keep the statistics, do not discard them --- mu = x.mean(dim=-1, keepdim=True) # (B, C, 1) sigma = x.std(dim=-1, keepdim=True) # (B, C, 1) <- retained as auxiliary stats xn = (x - mu) / (sigma + 1e-6) # (B, C, T) # --- temporal chunking: localised processing of a long sequence --- chunks = split_into_chunks(xn) # list of (B, C, T_chunk) # --- compressive patching, per chunk --- L = ceil(Q * T / token_budget) # patch length ADAPTS to input length toks = [] for ch in chunks: h = cnn_local(ch) # (B, C, T_chunk, D) local morphology p = to_patches(h, L) # (B, C, n_patch, L, D) t = qformer(p, n_query=Q) # (B, C, n_patch, Q, D) fixed count per patch toks.append(t) z = cat(toks, dim=2) # (B, C, N_tok, D) with N_tok ~ token_budget/Q # --- NEW in S2: model the channel axis instead of averaging it away --- z = channel_transformer(z) # (B, C, N_tok, D) inter-channel dependencies z = merge_channels(z) # (B, N_tok, D) <- S1-Pro used mean() here # --- global temporal context --- z = transformer_body(z) # (B, N_tok, D) return to_llm_space(z), (mu, sigma) # (B, N_tok, D_llm) + the stats the forecaster needs
Two lines are the whole chapter. L = ceil(Q * T / token_budget) is the length-control valve from Worked Example 1 — the patch grows with the input so the token count does not. And channel_transformer replacing a mean() is the single architectural change that Worked Example 2 justified.
Efficiency multipliers are abstract until you attach a machine to them. Suppose the old encoder, at its 240,000-step maximum, occupied 40 GB of a single 80 GB accelerator and took 6.0 seconds per forward pass. The paper reports the new encoder runs "approximately 5 ∼ 6× faster" while "reducing GPU memory consumption to around 20% of the previous version," at a maximum length that is itself 25% longer.
| Quantity | Old, at 240,000 steps | New, at 300,000 steps | Working |
|---|---|---|---|
| Memory | 40 GB | ≈ 8 GB | 40 × 0.20 |
| Forward-pass time | 6.0 s | 1.0–1.2 s | 6.0 / 6 to 6.0 / 5 |
| Headroom on an 80 GB card | 40 GB free — one signal at a time | 72 GB free | 80 − 8 |
| Concurrent long signals | 2 | 10 | floor(80 / 8) |
The last row is the one that changes what you can build. Two concurrent signals is a demo; ten is a batch. And the memory saving is what makes the radar case viable at all: a megahertz signal produces far more patches per second of real time, so the module has to be cheap per patch before high sampling rates are affordable.
The maximum sequence length turns up three times in the paper, in three different roles, and it is worth seeing them together because they are the same budget spent on different things.
| Where | What fills the 256K | Why it needs to be that large |
|---|---|---|
| Pre-training (§3.2) | A document-level interleaved sequence: many pages of text with cropped figures, equations, and tables in reading order | Cross-page reasoning chains are the stated target. Cut smaller and "the progressive organization of knowledge in long documents" is unlearnable |
| Agentic RL (§4.4) | A whole session: system prompt, task, and dozens of assistant messages interleaved with tool observations | A repository-level SWE task involves reading files, tracebacks, and diffs. The context is the working memory of the agent |
| Distillation (§4.5) | A student trajectory being scored token by token by a teacher | This is the one that forced the O(H) payload decision in Chapter 8 — at 256K positions, per-token teacher logits do not fit on the wire |
And a sense of scale for the middle row. If an average agent turn — one assistant message plus one tool observation — runs about 1,200 tokens, then 262,144 tokens is roughly 218 turns of interaction before the window is full. That number is the practical meaning of "long task horizon," and it is also, from Chapter 7's annotator list, why "context-, turn-, or session-limit termination" is a behaviour worth penalising: running out of room is a failure mode with a specific budget attached.
A useful habit when reading a system report is to write down the gaps explicitly, because they bound what you can conclude and what you could reproduce.
| Published | Withheld |
|---|---|
| Parameter count (397B); the sibling sizes (35B, 4B memory); predecessor scale (1T) | Layer count, hidden size, expert count, top-k, active parameters per token |
| That it is sparse MoE, uses RoPE, RMSNorm, and Gated DeltaNet recurrent states | The attention/linear-attention layer ratio; the tokeniser and its vocabulary size |
| The precision map (FP8 experts, BF16 body, FP32 for six named operations) | Pre-training token counts, corpus sizes, compute budget |
| Max time-series length, speedup and memory ratios, max sequence and generation lengths | Time-series patch length, Q-Former query count, encoder depth |
| RL optimizer, learning rate, weight decay, batch and mini-batch structure | εIS clip bounds, the BKL threshold φ, GEPO's coefficients and thresholds, α / γ / τ for length regularisation, β and αs for the memory |
The pattern is consistent: mechanisms and headline scalars are published; the constants that would let you reproduce the run are not. That is normal for a frontier system report and it is worth stating plainly rather than reading past. Everything in this lesson that is a specific number is from the left column. Everything illustrative is labelled.
Here is a situation every team with a good general model eventually hits. The model is strong. A collaborator needs it to be strong at one specific thing it has never seen — non-coding RNA family classification, say, or a lab's internal assay protocol. The obvious move is to fine-tune. And the obvious move is a trap, for a reason the paper states plainly:
Notice this is not the usual hand-waving about catastrophic forgetting. It is sharper: the parameters that encode "how to plan a tool sequence" are the same tensors as the parameters that encode "what a promoter–enhancer interaction is." There is no biology submatrix you can update in isolation. Gradient descent on 40,000 RNA examples touches everything.
And the reason this matters more in science than elsewhere: "the long-tailed and continuously evolving nature of scientific expertise." There is no fixed set of domains. Every month there is a new assay, a new instrument, a new subfield. If specialising costs you a full fine-tune of a 397-billion-parameter model plus a regression suite across every general benchmark, you will do it approximately never.
Memory Decoder's answer is to stop editing the model at all. Instead:
That last equation is Equation (3) of the paper, and it is worth staring at:
Three properties fall out immediately, and each one is a design win.
| Property | Why it holds | Why it matters |
|---|---|---|
| The result is always a valid distribution | A convex combination of two distributions with λ ∈ [0,1] is a distribution: all entries stay non-negative and the sum stays exactly 1 | No renormalisation, no numerical surprise, drop-in with any sampler |
| λt = 0 recovers the original model exactly | The backbone term is untouched and the memory term vanishes | The worst case of attaching a memory is "no change," never "worse general model." That is the whole safety argument |
| Memories are composable and disposable | Nothing in the backbone changed, so a second memory is a second module, and removing one is deleting a file | "New scientific capabilities can be introduced by attaching independently trained memories without modifying the Intern-S2-Preview-397B backbone" |
"A convex combination of two distributions is a distribution" is the load-bearing claim of Equation (3), and it takes three lines to prove, so prove it.
Non-negativity. For any token v, pfinal(v) = (1 − λ)pS2(v) + λpmem(v). Both probabilities are ≥ 0, and both coefficients are ≥ 0 whenever λ ∈ [0,1]. A sum of non-negative terms is non-negative. ✓
Normalisation. Sum over the vocabulary and pull the constants out:
Exactly 1, for every λ, with no renormalisation step. ✓ Verify it on the worked table: at λ = 0.3 the fused column is 0.420 + 0.305 + 0.190 + 0.085 = 1.000, and at λ = 0.7 it is 0.580 + 0.245 + 0.110 + 0.065 = 1.000.
The memory is not just a small model fine-tuned on the domain. It is trained to imitate a retrieval system. Follow the construction.
Step 1 — build a token-level datastore. Given a domain instruction-tuning corpus Dsft = {(q(i), a(i))}, walk every position on the answer side. At position t of example i, the prefix is ct(i) = [q(i) ; y<t(i)]. Encode that prefix into a key kt, and store the pair (key, next token). You now have a lookup table whose entries are "in this exact context, this exact token followed."
Step 2 — define a retrieval distribution. For a new prefix, find the nearest keys and let them vote, weighted by distance. That is Equation (1):
Unpack every symbol. N(kt) is the retrieved neighbour set. d is the retrieval distance. τ is a temperature. The indicator 1[y = vj] means a neighbour only votes for the token it actually stored. And exp(−d/τ) means a neighbour whose context was nearly identical votes loudly, while a distant one barely whispers.
Suppose τ = 1 and the five nearest neighbours to the current prefix are:
| Neighbour | Stored next token vj | Distance d | Weight exp(−d/τ) |
|---|---|---|---|
| j = 1 | "enhancer" | 0.20 | e−0.20 = 0.8187 |
| j = 2 | "enhancer" | 0.50 | e−0.50 = 0.6065 |
| j = 3 | "promoter" | 0.70 | e−0.70 = 0.4966 |
| j = 4 | "silencer" | 1.60 | e−1.60 = 0.2019 |
| j = 5 | "enhancer" | 2.30 | e−2.30 = 0.1003 |
Group by token. "enhancer" collects 0.8187 + 0.6065 + 0.1003 = 1.5255. "promoter" collects 0.4966. "silencer" collects 0.2019. The total is 1.5255 + 0.4966 + 0.2019 = 2.2240. Normalise:
Check: 0.6860 + 0.2233 + 0.0908 = 1.0001, which is rounding. Note what this distribution encodes that a one-hot label would not: "enhancer" is the answer, but "promoter" is the reasonable confusion and "silencer" is the far one. That relative structure is precisely the extra signal the memory is being taught.
Step 3 — compress the retrieval into parameters. Running a nearest-neighbour search over a token-level datastore at every decoding step is expensive and stateful. So the memory is trained to predict what the retrieval would have said, with a two-term loss — Equation (2):
β ∈ [0,1] "balances the retrieval teacher and the gold SFT answer." Both terms are needed, and you can see why by imagining each alone. Pure KL: the memory learns to imitate a retriever, including the retriever's mistakes, and can never exceed it. Pure cross-entropy: you are back to ordinary fine-tuning on hard labels and you have thrown away the ranking structure. The mixture says match the neighbourhood's shape, but stay anchored to the truth.
Now the question that decides whether any of this works: how much should we trust the memory at this particular token?
The router is "lightweight" and "token-level," and it decides λt from "their hidden states and output-distribution uncertainty features." That last phrase is the interesting one. The router does not only look at what each model wants to say; it looks at how confident each one is. A backbone that is spreading its mass over forty plausible tokens and a memory that is putting 0.9 on one of them is a strong signal to raise λ. The reverse — a confident backbone and a flat memory — is a strong signal to lower it.
The router is trained with the backbone and the memory both frozen. Its loss, Equation (4), is cross-entropy on the fused distribution plus a signed linear regulariser on λ itself:
The regulariser is a straight line in λ, and its slope st is a signed indicator keyed to which corpus the training example came from — the router is trained "on a mixture of domain and general instruction data," with αs > 0 controlling the strength. Since the objective is minimised, a negative slope on domain examples pulls λt up, and a positive slope on general examples pushes it down.
Shrink the vocabulary to four tokens so the arithmetic is visible. A biology prompt is mid-answer, and the two models disagree:
| Token | pS2 (frozen 397B) | pmem (biology memory) | Fused at λ = 0.3 | Fused at λ = 0.7 |
|---|---|---|---|---|
| "enhancer" | 0.30 | 0.70 | 0.7(0.30)+0.3(0.70) = 0.420 | 0.3(0.30)+0.7(0.70) = 0.580 |
| "promoter" | 0.35 | 0.20 | 0.7(0.35)+0.3(0.20) = 0.305 | 0.3(0.35)+0.7(0.20) = 0.245 |
| "region" | 0.25 | 0.05 | 0.7(0.25)+0.3(0.05) = 0.190 | 0.3(0.25)+0.7(0.05) = 0.110 |
| "sequence" | 0.10 | 0.05 | 0.7(0.10)+0.3(0.05) = 0.085 | 0.3(0.10)+0.7(0.05) = 0.065 |
| column sums | 1.000 | 1.000 | 1.000 | |
At λ = 0.3 the argmax is still "enhancer" (0.420) but only just; at λ = 0.7 it is decisive (0.580). And here is the crossover worth computing by hand: the backbone prefers "promoter" (0.35 > 0.30) while the memory prefers "enhancer" (0.70 > 0.20). At what λ does the fused argmax flip?
Barely any memory weight is needed to overturn this particular decision — 9.1% — because the backbone was nearly indifferent between its top two while the memory was not. That is the mechanism by which a 4-billion-parameter module can move a 397-billion-parameter model's output: it does not need to overpower the backbone, only to break its ties in the right direction.
Left: the frozen backbone's next-token distribution. Right: the biology memory's. Centre: the fusion at the current λ. Drag λ and watch the argmax cross over — the crossover point is marked. Switch the context between a domain token and a general token to see what the router is supposed to learn: on general text, high λ actively damages the prediction, which is why the regulariser has a sign.
The paper instantiates one memory — Intern-MemDec-4B, on biology — and evaluates on all 21 tasks of Biology-Instructions. This is the cleanest result in the paper because you can verify the headline number yourself from the row data. Here it is, with the deltas computed:
| Biology-Instructions task | Frozen 397B alone | With MemDec-4B | Δ |
|---|---|---|---|
| DNA-cpd | 63.11 | 72.57 | +9.46 |
| DNA-emp | 19.95 | 27.25 | +7.30 |
| DNA-enhancer activity | 53.68 | 60.71 | +7.03 |
| DNA-pd | 84.40 | 89.12 | +4.72 |
| DNA-tf-h | 56.57 | 55.99 | −0.58 |
| DNA-tf-m | 56.96 | 67.09 | +10.13 |
| Multi-sequence antibody-antigen | 40.24 | 36.44 | −3.80 |
| Multi-sequence promoter-enhancer interaction | 22.46 | 38.47 | +16.01 |
| Multi-sequence RNA-protein interaction | 84.74 | 87.34 | +2.60 |
| Multi-sequence siRNA efficiency | 63.05 | 60.63 | −2.42 |
| Protein-Fluorescence | 70.48 | 72.23 | +1.75 |
| Protein-FunctionEC | 61.88 | 60.10 | −1.78 |
| Protein-Solubility | 68.60 | 68.00 | −0.60 |
| Protein-Stability | 69.67 | 67.80 | −1.87 |
| Protein-Thermostability | 58.44 | 53.97 | −4.47 |
| RNA-CRISPROnTarget | 6.61 | 17.18 | +10.57 |
| RNA-Isoform | 82.65 | 84.81 | +2.16 |
| RNA-MeanRibosomeLoading | 56.20 | 59.71 | +3.51 |
| RNA-Modification | 59.64 | 60.48 | +0.84 |
| RNA-NoncodingRNAFamily | 78.80 | 85.70 | +6.90 |
| RNA-ProgrammableRNA Switches | 37.13 | 41.23 | +4.10 |
| Average (21 tasks) | 56.92 | 60.32 | +3.40 |
Add the "frozen 397B" column. Running the sum in the table's order: 63.11, then 83.06, 136.74, 221.14, 277.71, 334.67, 374.91, 397.37, 482.11, 545.16, 615.64, 677.52, 746.12, 815.79, 874.23, 880.84, 963.49, 1019.69, 1079.33, 1158.13, and finally 1195.26. Divide by 21:
Now the "with MemDec" column: 72.57, 99.82, 160.53, 249.65, 305.64, 372.73, 409.17, 447.64, 534.98, 595.61, 667.84, 727.94, 795.94, 863.74, 917.71, 934.89, 1019.70, 1079.41, 1139.89, 1225.59, 1266.82. Divide by 21:
And the gain, computed two ways as a check. As a difference of averages: 60.3248 − 56.9171 = 3.4076. As an average of differences: the deltas sum to 1266.82 − 1195.26 = 71.56, and 71.56 / 21 = 3.4076. Identical, as they must be — the mean is linear.
Look at which tasks lost, because the pattern is not random. Four of the seven regressions are protein property-prediction tasks — solubility, stability, thermostability, enzyme function. And look at the biggest wins: promoter–enhancer interaction (+16.01), DNA transcription-factor binding in mouse (+10.13), CRISPR on-target activity (+10.57), non-coding RNA family (+6.90). Those are nucleotide-sequence tasks.
A single memory trained on one domain corpus has a centre of mass. Where the memory's training data was dense, λ is doing useful work; where it was thin, the router is still occasionally routing to a module that has nothing better to say than the backbone did, and the fusion dilutes a good prediction with a mediocre one. The honest reading of §5.3 is: the memory attachment is a real gain in aggregate, it is domain-shaped rather than uniform, and the failure mode is bounded and visible.
The obvious worry about any specialisation method is that it quietly wrecks everything else. The paper checks: it evaluates the memory-augmented variant on MMLU Pro, Mol-Instructions, MMMU Pro, MicroVQA, IMO-Answer-Bench, and SFE, with Intern-S1-Pro (1T) as an extra reference, and reports that "Intern-MemDec-4B remains close to the frozen backbone on general knowledge, reasoning, scientific, and multimodal benchmarks while improving the target biology benchmark."
Two things about that sentence. First, it is exactly the claim the architecture predicts: at λ ≈ 0 the fused model is the backbone, so the router only has to learn to keep λ small off-domain. Second, "remains close" is reported as a radar plot (Figure 12c), not as a table of numbers — so we can tell you the claim and the mechanism, and we cannot give you the per-benchmark deltas, because the paper does not print them. Note the asymmetry in evidence quality: the biology gain is a 21-row table you can audit, the no-regression claim is a shape.
Every mechanism has a domain of applicability, and the 21-task table tells you where this one's edges are. Read the seven regressions as a specification.
| Situation | Memory Decoder is… | Why |
|---|---|---|
| The domain is dense in your memory's training corpus | The right tool | +16.01, +10.57, +10.13 on the nucleotide-sequence tasks |
| The domain is adjacent to the memory's corpus but not in it | Risky | The router may still route to it. Four protein property-prediction tasks lost between 0.60 and 4.47 points |
| The knowledge changes weekly | Wrong tool | Updating means retraining the memory. Retrieval keeps the datastore live; this compresses it into weights |
| You need provenance — "which document says this?" | Wrong tool | The datastore was compiled away. There is nothing to cite |
| Serving cost is the binding constraint | Check the arithmetic | Two forward passes per token. Fine at 4B beside 397B; not fine at 70B beside 70B |
| You need many domains at once | Unproven here | The paper instantiates one memory. Composition of several is asserted as possible, not demonstrated |
memory decoder inference# backbone and memory are BOTH frozen. Only the router was ever trained here. def step(prefix): h_s2, p_s2 = backbone(prefix) # (D_s2,), (V,) frozen 397B h_mem, p_mem = memory(prefix) # (D_mem,), (V,) frozen 4B, domain-trained # the router sees hidden states AND uncertainty, not just the argmaxes feats = cat([h_s2, h_mem, entropy(p_s2), entropy(p_mem), # how confident is each one? max(p_s2), max(p_mem)]) lam = sigmoid(router(feats)) # scalar in (0, 1), fresh EVERY token return (1 - lam) * p_s2 + lam * p_mem # (V,) still sums to 1 - Equation (3) # router training: both models frozen, mixed domain + general data def router_loss(prefix, gold, is_domain): p_final = step(prefix) ce = -log(p_final[gold]) # fused likelihood supplies the curvature s_t = -1.0 if is_domain else +1.0 # signed, keyed to the corpus return ce + alpha_s * (s_t * lam) # Equation (4): constant-gradient prior
Read the last line once more. s_t * lam is linear in λ, so its derivative is the constant st. On domain data that constant is negative, so minimising the total pushes λ up; on general data it is positive, so minimising pushes λ down. The cross-entropy term is the only thing that can overrule it, and it will, whenever a high λ would make the fused prediction worse. The whole router is one scalar, one sigmoid, and a prior with a sign.
Memory Decoder is one option in a well-populated field. Lining them up makes the trade explicit — and makes clear that there is no free lunch, only different bills.
| Full fine-tune | LoRA / adapters | RAG | Memory Decoder | |
|---|---|---|---|---|
| Backbone weights | Rewritten | Frozen, but the forward pass is altered | Frozen and untouched | Frozen and untouched |
| Risk to general capability | High — the paper's stated objection | Moderate — adapters still change every layer's output | None | None at λ = 0 |
| Where the knowledge lives | In the weights | In a low-rank delta | In an external index, at query time | In a separate model's weights |
| Inference cost | 1 forward pass | 1 forward pass + adapter | 1 pass + retrieval latency + a longer prompt | 2 forward passes, in parallel |
| Composability | None — merging fine-tunes is its own research problem | Partial — adapter merging is lossy | Good — add documents | Good — attach another memory |
| Update cost for new facts | Another full run | Another adapter run | Insert a document | Retrain that memory |
| Latency of knowledge access | Free — it is in the weights | Free | Paid every query | Free — amortised into the memory's weights |
Equation (1) will look familiar if you have seen kNN-LM: build a datastore of (context representation, next token) pairs from a corpus, and at inference interpolate the language model's distribution with a distance-weighted vote from the nearest neighbours. That method works and it has a well-known cost — you carry the datastore forever, and every decoding step pays a nearest-neighbour search over it.
| kNN-LM style retrieval | Memory Decoder | |
|---|---|---|
| At inference, the domain knowledge is | A datastore plus an index | 4B parameters |
| Cost per token | A vector search | A forward pass, parallel with the backbone |
| Interpolation weight | Usually a fixed hyperparameter | Predicted per token by a trained router |
| Can it generalise past the datastore? | No — it can only vote for tokens it stored | Yes — it is a model, trained to approximate the retrieval, so it interpolates |
| Serving story | Two systems: a model and an index | One system: two models |
The row that matters most is the fourth. A retriever is a lookup and cannot answer for a context it never saw; a model trained on the retriever's outputs has been forced to find structure in those outputs, and structure extrapolates. That is the same reason a student who learned the pattern beats a student who memorised the answer key, and it is the actual argument for Equation (2)'s existence.
Open a chemistry paper and look at what carries the information. A reaction scheme. A table of yields with the interesting row bolded. An equation set inline between two paragraphs that reference it as "(3)". A caption that says "see inset." Now run that page through a text extractor and read what comes out: the equation is a run of mangled symbols, the table is a comma soup, the figure is gone entirely, and the two paragraphs that referred to each other by position are now adjacent to something else.
Text extraction is lossy in a very specific way: it deletes exactly the structure that made the document a document. This chapter is about the paper's three answers to that, all in §3. They are independent engines and they attack different losses.
| Engine | What loss it attacks | Section |
|---|---|---|
| Visual Pre-training | The page's appearance — layout, figure, equation rendering — is thrown away by extraction, so learn from the rendered pixels instead | §3.1 |
| Interleaved text–image data | The relationship between a figure and the prose around it is thrown away by pairing an image with a caption, so rebuild the page as a sequence in reading order | §3.2 |
| Image retrieval enhancement | Good scientific images are rare in a random crawl, so build an index of hundreds of millions and go find them | §3.3 |
The idea is disarmingly simple once stated. You already have a huge corpus of scientific PDFs. You are already training on the text you extracted from them. Render the same documents as page images and train on those too, with an objective that needs no labels at all.
Here is the pipeline, with shapes, following Equations (5) through (9).
Step 1 — encode the page. A frozen visual encoder Ev turns the page image I into a sequence of visual features:
Step 2 — drop the blank paper. A foreground mask mi "removes blank regions," and the survivors are put in raster-scan order — left to right, top to bottom, exactly how a person reads:
This step is pure economy and it matters more than it looks. A journal page is mostly margin. If a quarter of your patches are white paper, a quarter of your compute is spent predicting that blank follows blank — a task with essentially zero loss and therefore zero gradient. Masking them out concentrates the budget on ink.
Step 3 — run it through the LLM autoregressively. The visual features are projected into the language model's hidden space by Win, run through the backbone Φθ, and a lightweight head ψ predicts the next visual latent:
Read that as: take all patches up to t, project, run the LLM, take the hidden state at position t, and map it to a prediction of what patch t+1 looks like. It is next-token prediction with patches instead of tokens.
Step 4 — and here is the actual insight: score it contrastively, not with a regression.
Unpack it. stj is the cosine similarity between the prediction at position t and the true patch at position j+1, divided by a temperature τ. The softmax runs over the batch B. And LVP is the negative log of the diagonal — the probability that the prediction for position t matched the true continuation of position t, and not somebody else's.
Step 5 — interleave with text. Both objectives run together during continued pre-training:
And the parameter split is the crux: "The visual encoder remains frozen, while the LLM backbone, visual projection, and prediction head are optimized." The encoder is a fixed measuring instrument. What is being trained is the language model's ability to continue a visual sequence — which means the document structure is being written into the backbone, not into a separate vision tower.
The second engine attacks a different loss. §3.2 opens by naming what is wrong with the standard recipe: "Existing multimodal pre-training strategies heavily rely on image caption data, which captures semantic alignment between an image and a local text span." That is fine for object recognition. But in a PDF, "the more critical information … often lies in the contextual relationships between images, equations, tables, and surrounding text, including layout position, explanatory paragraphs before and after visual elements, textual references, cross-page reasoning chains, and the progressive organization of knowledge in long documents."
The goal, in the paper's phrase, is that the model learn "not only what an image depicts, but also how it is embedded in document narratives." The pipeline:
Step 4 is the clever one and it deserves its own derivation.
Treating equations and tables as images rather than as parsed text is a deliberate bet, and it is not free: an image costs far more tokens than the LaTeX would. So you had better be sure the visual content is carrying information. The paper measures it, borrowing the trick from Toolformer: compute the language model's perplexity on the page text twice — once with no visual input, once with the images, tables, and equations included — and define
"A significant decrease in PPL after adding visual information indicates that the visual content provides meaningful support for understanding the page." Decorative images, advertisements, and weakly related visuals score near zero. Experimental figures, mechanism diagrams, structural illustrations, tables, and equations produce "a notable PPL reduction." The paper then combines "human review with domain-specific thresholds and retain only pages whose visual gain exceeds the corresponding threshold."
Perplexity differences are hard to feel. Convert them. Perplexity is the exponential of the average per-token cross-entropy in nats, so PPL = eH and therefore H = ln(PPL).
Take a page from a mechanism-diagram-heavy chemistry paper: text-only PPL 12.4, interleaved PPL 9.1. Then:
Now scale it. A dense page might be 700 text tokens, so the figure supplied 700 × 0.4464 ≈ 312 bits — about 39 bytes — of information that was genuinely not recoverable from the text alone. That is not much in absolute terms, but it is the right unit to reason in, because now you can compare it against the cost: if the cropped figure costs 256 image tokens to include, you are paying 256 tokens for 312 bits. Whether that is a good trade is a threshold, which is exactly why the paper says the thresholds are domain-specific.
Contrast with a decorative stock photo on a press-release page: text-only PPL 11.0, interleaved PPL 10.9. Then ΔH = ln(11.0) − ln(10.9) = 2.3979 − 2.3888 = 0.0091 nats = 0.0131 bits per token, or about 9 bits for the whole page. Nine bits, for hundreds of image tokens. Discard.
Two numbers, both worth a sentence. The 256k cap matches the maximum sequence length the rest of the system is built for, so a pre-training sample and a distillation trajectory live in the same regime — no separate long-context machinery.
The 512-token overlap is a seam repair. Cut a document at a hard boundary and every fact whose evidence straddles the cut becomes unlearnable: the model sees the conclusion without the premise in one chunk, and the premise without the conclusion in the other. Overlapping by 512 tokens means any dependency shorter than 512 tokens is intact in at least one chunk. The cost is duplication: at a 512/256,000 overlap ratio you are re-training on 0.2% of tokens twice, which is nothing.
The third engine is the least glamorous and the most operational. The observation in §3.3: retrieval of high-quality data "is a common practice in preparing textual pre-training corpus. However, the pipeline of retrieving high-quality image data is underexplored." The goal is to "recall high-quality data and raise their sample ratio during the training."
| Stage | What the paper specifies | Why that choice |
|---|---|---|
| Extraction and dedup | Pull images and key metadata from the sources; deduplicate on the SHA256 of the image bytes | A cryptographic hash of the raw bytes is exact, cheap, and order-independent. It catches literal re-uploads, which dominate at web scale |
| Encoding | An 8B embedding model produces 1024-dimensional embeddings | Eight billion parameters is a large embedder by 2026 standards — this is a bet that recall quality is worth the encoding cost, since it is paid once per image, ever |
| Storage | Milvus, sharded into "multiple collections," for data "at the scale of hundreds of millions" | The paper's stated reason is "to balance storage and retrieval performance." Sharding lets a query fan out in parallel and lets a shard be rebuilt without touching the rest |
| Query, image input | Encode the image; also caption it with a caption model and encode the caption; retrieve on both | "Joint retrieval … from both visual and semantic perspectives, which improves recall and semantic matching ability." Two views of the same query catch different neighbours |
| Query, text input | Encode the text with the same model; cross-modal similarity search | Same embedding model at index time and query time — the paper says this explicitly, "so as to maintain consistency in the vector space." Mixing encoders silently destroys a shared space |
| Post-processing | Filter duplicates, rerank candidates with a reranker model that assigns quality scores, then filter on those scores | The classic retrieve-then-rerank split: a cheap approximate search over hundreds of millions, then an expensive precise model over the top few |
visual pre-training# One training step on a batch of rendered pages. No labels anywhere. def vp_step(page_images): # (B, 3, Hpx, Wpx) with no_grad(): # the visual encoder stays FROZEN z = visual_encoder(page_images) # (B, N, Dv) N patches per page m = foreground_mask(z) # (B, N) bool - drop blank paper u = raster_scan(z[m]) # (B, L, Dv) with L <= N -- Eq (5) hid = backbone(W_in @ u) # (B, L, D_llm) autoregressive, causal pred = head(hid) # (B, L, Dv) predicted NEXT latent -- Eq (6) # contrastive scoring: identify the true continuation among in-batch targets a = l2norm(pred[:, :-1]) # (M, Dv) predictions u_hat_{t+1} b = l2norm(u[:, 1:]) # (M, Dv) targets u_{t+1} s = (a @ b.T) / tau # (M, M) cosine / temperature -- Eq (7) loss_vp = cross_entropy(s, arange(M)) # the DIAGONAL is the label -- Eq (8) return lam_text * loss_text + lam_vis * loss_vp # Eq (9)
The label is arange(M). Nobody wrote it down; it is the index of each prediction's own continuation, and every other position in the batch serves as a negative. That is where "requires neither OCR and layout parsing nor paired data and manual annotations" comes from, concretely.
The mask looks like housekeeping. Put numbers on it. Take a single-column journal page rendered at a patch grid of 48 × 36, so N = 1,728 patches. Typical margins on such a page — top, bottom, left, right, plus inter-column and inter-paragraph white space — run around 35% of the area. Then:
A causal Transformer over a sequence pays roughly quadratically in length for attention, so the attention work scales as (1,123 / 1,728)2 = 0.4224 — about 42% of what the full grid would have cost. And the discarded 605 patches were the ones with essentially no loss to reduce, since predicting "blank follows blank" is free. You removed 35% of the tokens and 58% of the attention cost while losing none of the gradient signal.
§3.2 names exactly three kinds of visual unit to crop: "regular images, interline equations, and tables." The first is obvious. The other two are a deliberate and slightly surprising choice, because both could have been serialised as text — LaTeX for the equation, markdown for the table.
| Unit | What survives text extraction | What only survives as an image |
|---|---|---|
| Interline equation | Sometimes a LaTeX string, if the PDF embedded one. Often a scrambled run of glyphs with the sub- and superscripts flattened into the baseline | The two-dimensional layout: what is over the fraction bar, what the summation's limits are, which index the subscript belongs to. That geometry is the meaning |
| Table | Cell text, in some order | Which cell is in which column, merged headers, the rule that separates a header block from a body block, and the emphasis on the row the authors thought mattered |
| Figure | Nothing | Everything, including axis numbers that never appear in the caption |
And this connects straight back to Visual Pre-training: the reason cropping equations as images is affordable is that the backbone has already been trained, in §3.1, to model rendered mathematical layout as a visual sequence. The two engines are not independent; the second one spends a budget the first one created.
Filtered pages are concatenated in document order and split "into chunks suitable for long-context VLM pre-training, with each chunk capped at 256k tokens and sharing a 512-token overlap." What does the overlap cost?
Each chunk after the first repeats 512 tokens of its predecessor. With a stride of 256,000 − 512 = 255,488 new tokens per chunk, a document of D tokens needs about D / 255,488 chunks, and the duplicated fraction is:
Two tokens in a thousand, seen twice. For a corpus of 1 trillion tokens that is 2 billion duplicated tokens — real, and utterly worth it against the alternative. Consider a cross-reference like "as we showed in Section 2, the yield was 84%" landing 200 tokens after a hard chunk boundary. Without overlap, the model sees the claim with no evidence in one chunk and the evidence with no claim in the other, and the dependency is unlearnable from either. With a 512-token overlap, every dependency shorter than 512 tokens survives intact in at least one chunk.
Everything in §3.2 rests on one upstream component: MinerU2.5-Pro, which "perform[s] OCR and layout-aware structural parsing on PDF documents" and "identifies text blocks, headings, paragraphs, and visually informative regions on each page." If that step is wrong, the interleaved sequence is wrong, and the model learns a false page.
| What the parser must get right | What a mistake produces downstream |
|---|---|
| Reading order in a two-column layout | Sentences interleaved from both columns. The model learns that scientific prose is incoherent |
| Figure bounding boxes | A crop that clips the axis labels, or one that swallows the neighbouring paragraph as pixels |
| Which regions are "visually informative" | Journal furniture — running heads, DOI stamps, licence footers — cropped as visual units and fed in as if they carried meaning |
| Table boundaries | A multi-page table split at the page break, so half a table appears with no header |
| Interline versus inline equations | Inline mathematics cropped out of a sentence, leaving a hole in the text stream |
Visual gain is a good filter and it is worth understanding its blind spots, because the paper hedges it with "we combine human review with domain-specific thresholds" and that hedge is doing real work.
| Blind spot | What slips through or gets dropped | Why the metric cannot see it |
|---|---|---|
| A figure that is the finding | Dropped, sometimes | If the surrounding text already describes the result fully, the image adds no perplexity reduction — even though it is the primary evidence a scientist would look at |
| A figure that merely restates the text | Kept, sometimes | Redundancy lowers perplexity beautifully. A bar chart of numbers already in a table scores well and teaches nothing new |
| Cross-page dependency | Invisible | The measurement is per page. A figure on page 4 explaining an equation on page 2 gets no credit |
| Domain difficulty | Systematically biased | A page whose text is intrinsically hard has high baseline perplexity and therefore more room to drop. That is why the thresholds are "domain-specific" |
| The measuring model's own gaps | Circular | Gain is measured with a language model. If that model is weak at chemistry, chemistry figures look enormously helpful; as it improves, the same figures score lower |
The interleaved pipeline "focuses on life sciences, chemistry, and materials science." That is a scoping decision, and it lines up exactly with where the evaluation is strongest — which is either a coincidence or the point.
| Domain named in §3.2 | What its pages are dense in | Which Table 2 rows it feeds |
|---|---|---|
| Life sciences | Micrographs, gels, pathway diagrams, multi-panel figures with sub-labels, sequence alignments | Biology-Instructions (56.92), MicroVQA (68.81) |
| Chemistry | Reaction schemes, structural formulae, spectra, yield tables | Mol-Instructions (52.37), MolecularIQ (61.49), TOMG-Bench (65.66) |
| Materials science | Crystal structures, phase diagrams, diffraction patterns, lattice tables | MP20 (67.88) |
Those five rows include the two largest margins in the entire paper. Biology-Instructions at 4.1× the best competitor and MP20 at 4.1× are exactly the two domains whose page structure this pipeline was built to preserve. That is not proof of causation — the SFT mixture and the RL tasks also targeted these domains — but the alignment between what §3.2 chose to parse and where §5.2 reports its largest wins is worth noticing.
§3.3 gives enough numbers to size the system. "Hundreds of millions" of images, each encoded to a 1024-dimensional vector. Take 300 million as the working figure.
Raw vector storage, at 4 bytes per dimension:
At half precision, 614 GB. Either way it does not fit on one machine's memory, which is precisely the paper's stated reason for "constructing multiple collections based on the Milvus vector database and storing image vectors in shards to support subsequent high-performance retrieval."
Brute-force search cost per query. A single cosine similarity over 1024 dimensions is about 1024 multiply-adds. Against 300 million vectors:
At a very generous 1011 effective operations per second on a CPU that is roughly 3 seconds per query — per query, single-threaded, with the whole index in memory. Which is why nobody does brute force, and why the pipeline is retrieve-then-rerank: an approximate index narrows 300 million to a few hundred in milliseconds, and then "a reranker model to rerank candidate results and assign quality scores" pays the expensive per-item cost on only those few hundred.
A practical question when borrowing any of this: what does each engine cost, and when do you pay it?
| Engine | One-time setup cost | Per-item cost | Recurring cost |
|---|---|---|---|
| Visual Pre-training | None — a frozen encoder, a projection, a small head | Render a page, run the frozen encoder once, train the LLM on the sequence | None. The knowledge is in the backbone afterwards |
| Interleaved text–image | A PDF parser (MinerU2.5-Pro) and per-domain gain thresholds set with human review | Parse, crop, two perplexity evaluations for the gain measurement, then assemble | Re-measure gain if you change the scoring model |
| Image retrieval | An 8B embedder, a sharded Milvus deployment, a reranker — and encoding hundreds of millions of images once | One query encoding, one approximate search, one rerank over the shortlist | The index has to be kept and served |
Notice the asymmetry. The first engine is nearly free and has no operational tail. The second costs two forward passes per page at build time and leaves behind a threshold you now own. The third is the only one that leaves a system running: an index at hundreds-of-millions scale is a service with uptime, storage, and re-indexing concerns long after the training run finished.
It is worth being explicit that these are not three parallel improvements. They form a chain.
And all three exist to serve one number that will not appear until Chapter 9: SimpleQA-Verified 69.90, fifteen points clear of the next open model, measured without retrieval tools. Factual recall without tools is a pre-training result. It is the cleanest available evidence that this section of the paper did something real.
One more piece of arithmetic on §3.3. Encoding "hundreds of millions" of images with an 8-billion-parameter embedding model is not a small job. But note where the cost sits: it is paid once per image, ever. After that, every query — every text-to-image and image-to-image lookup, forever — costs one query encoding plus an approximate search. The expensive model is on the write path, not the read path.
Which is exactly the opposite of the caption-model decision in the same section. For an image query, the system "uses a caption model to generate a textual description of the image, and the caption text is then encoded into a vector," so it can search from "both visual and semantic perspectives." That caption is generated at query time — on the read path — and it is worth it because the two views recall genuinely different neighbours: the image embedding finds things that look alike, and the caption embedding finds things that are about the same thing. A fluorescence micrograph and a schematic of the same pathway look nothing alike and are semantic neighbours.
Reinforcement learning on a language model has a rhythm: generate, score, update. Generate a batch of responses to a batch of prompts, run a verifier over them to get rewards, take a gradient step, repeat. In a small setup you barely notice the generate phase. At this scale it is the whole story — "rollout generation is the primary computational bottleneck in reinforcement learning."
And it is a bottleneck with a nasty shape. Not slow-on-average: slow-in-the-tail.
You launch 8,192 rollouts. Most finish in a few thousand tokens. But this is a long-chain-of-thought reasoning model with a maximum generation length of 65,536 tokens, and a handful of prompts will send it most of the way there. In a synchronous pipeline you cannot start training until the batch is complete, so:
Put numbers on it. Suppose 99% of your rollouts finish by 4,000 tokens and 1% run to 65,536. The batch is not done until the slowest one is done, so the wall-clock cost of the batch is set by 65,536 tokens of autoregressive decoding, while the average rollout needed roughly 4,600. The ratio 65,536 / 4,600 ≈ 14 means that for about thirteen-fourteenths of the batch's duration, the overwhelming majority of your accelerators have nothing to do. On a cluster that costs real money per hour, this is the difference between a training run and a heating bill.
§4.3.1 names the field's two answers before choosing:
| Approach | How it works | The cost it introduces |
|---|---|---|
| Co-location with partial rollouts | Training and inference share the same GPUs. When enough rollouts have finished, pause the rest and switch the pool to training | Paused trajectories become stale: parts of them were written by an older policy |
| Full disaggregation | Separate GPU pools: one generates forever, one trains forever | A producer–consumer balancing problem — size the pools wrong and one starves the other. The paper calls this "the difficult producer–consumer balancing problem" |
Intern-S2-Preview takes the first: "a co-located partial-rollout system based on the XTuner training engine and the LMDeploy inference engine." Here is the loop, exactly as described:
Nothing computed is thrown away. That is the whole argument for pause-over-abort: a rollout 40,000 tokens deep represents 40,000 forward passes, and discarding it burns all of them.
Step 4 hides a real problem, and the paper states it without flinching: "because a resumed trajectory may contain segments generated before and after one or more policy updates, different tokens within the same trajectory can originate from different behavior-policy versions."
Think about what that means for the gradient. Policy gradient methods assume the data you are learning from was sampled from the policy you are updating. Here, token 12,000 of a trajectory came from πv3 and token 45,000 came from πv5, and you are updating πv6. Every one of those tokens is off-policy — drawn from a distribution that is not the one you are differentiating.
The classical repair is importance sampling: reweight each sample by how much more or less likely it is under the policy you care about than under the one that produced it. The paper records, for every sampled token, both the behaviour-policy version and the generation-time log-probability, and then writes Equation (10):
Note the subscript beh(i,t): the behaviour policy is indexed by both the trajectory and the position within it. Different tokens of the same response can have different denominators. That is unusual, and it is a direct consequence of pause-and-resume.
The system also bounds how stale a trajectory may get: "a trajectory is discarded if its oldest retained segment was generated more than three policy updates before the current learner." Three. That is a hard cap on how far the ratio can drift, enforced by deletion rather than by a correction term.
Importance ratios have a well-known pathology: they are unbounded above and their variance can explode. So the ratio is truncated, Equation (11):
And then a sentence that is easy to skim past and is the most important thing in the section:
Sit with the difference, because it is a genuinely different algorithm and the distinction is often muddled.
| PPO-style clipping | Detached clipped weight (this paper) | |
|---|---|---|
| What gets clipped | The surrogate objective: min(ρA, clip(ρ)A) | The weight ρ̄ only, which is then stop-gradiented |
| Does ρ carry gradient? | Yes — ρ contains πθ, so it is part of the computational graph | No — sg[ρ̄] is a number. The gradient flows only through log πθ |
| Outside the trust region | The min() selects the clipped branch, which is constant in θ, so the gradient is exactly zero for that token | The weight saturates at the clip bound but the log-probability term still carries gradient — the token contributes a bounded, nonzero push |
| Failure mode avoided | — | A token that drifted far off-policy silently disappearing from the update |
Concretely: if ρ = 8.0 and the clip bound is 1.2, PPO (for a positive advantage) contributes nothing at all from that token. Here, the token contributes with weight 1.2 — capped, but present. Given that pause-and-resume manufactures off-policy tokens by design, an update rule that deletes them would throw away exactly the data the system went to such trouble to preserve.
There is a second, sneakier source of mismatch, and it has nothing to do with time. The rollouts are generated by LMDeploy and the gradients are computed by XTuner. Same weights, two different implementations. They do not agree exactly.
For a sparse MoE model there are two reasons, and the paper separates them cleanly.
Reason 1 — routing. An MoE router picks a small set of experts per token via a top-k over router logits. A discrete argmax has no tolerance: a difference of 10−6 in a logit can flip which expert runs, and then the two engines have computed different functions, not merely different roundings. The fix is Rollout Routing Replay (R3): "the expert selections made by LMDeploy during rollout are recorded and replayed by XTuner when evaluating the corresponding tokens. This ensures that rollout and training follow the same expert paths."
Reason 2 — arithmetic. Even on the same path, numerics differ. The mitigation is the precision map from Chapter 1: FP8 for expert linear layers, BF16 elsewhere, FP32 for apply_rope, RMSNorm, the MoE router, Gated DeltaNet recurrent states, and the language-model head.
What is left over. "After routing replay and operator-level alignment, a small number of tokens may still exhibit large probability discrepancies because of residual numerical differences." So a third mechanism, borrowed from KPop: detect and drop the survivors using the bidirectional binary KL divergence, Equations (12) and (13):
Read Equation (12) as: collapse the whole vocabulary to a two-outcome question — "was it this token, or was it anything else?" — and measure the KL between the two engines' answers to that question. ptrain and prollout are the probabilities the two engines assign to the token that was actually sampled, "under matched model parameters and replayed routing decisions." A token survives only if both directions are under the threshold φ.
Case A — ordinary disagreement. ptrain = 0.90, prollout = 0.80.
Reverse it:
Different numbers — 0.0367 versus 0.0444 — from the same pair, which is the first thing to internalise: KL is not symmetric. Both are small; at any sane φ this token survives.
Case B — a real outlier. ptrain = 0.05, prollout = 0.60. The rollout engine thought this token was the obvious choice; the training engine thinks it was nearly a mistake.
Nineteen to thirty-one times larger than Case A in the two directions. This token is masked out.
And notice how the three mechanisms stack, because they are not redundant:
| Mechanism | Removes | What it cannot fix |
|---|---|---|
| R3 routing replay | Discrete expert-path mismatch | Floating-point differences along the same path |
| FP32 on sensitive operators | The largest sources of numerical drift | Residual per-token outliers |
| Bidirectional-KL mask | The residual outliers, by deleting them | Nothing — it is the last resort, and it costs you those tokens' gradient |
| Clipped importance weight | Variance from genuine policy staleness | Engine disagreement, which is not staleness at all |
Each bar is one rollout, its length drawn from a long-tailed distribution. In synchronous mode the batch ends when the slowest finishes, and the grey area is idle accelerator time. In partial rollout mode the batch closes as soon as enough have completed; the rest pause (marked with a bar), training runs, and they resume — carrying a staleness counter. Trajectories whose oldest segment exceeds 3 policy updates are discarded, shown in red. Drag the tail severity and the completion threshold and watch utilisation and waste move against each other.
Partial rollout fixes idling. It does not make a token come out faster. For that the paper adds speculative decoding — and then hits a problem specific to RL.
The standard method: a small, cheap draft model proposes several tokens ahead; the expensive policy model verifies all of them in one parallel forward pass, using an exact rejection-sampling procedure. Because the verification is exact, "this verification procedure preserves the sampling distribution of the policy model" — so, crucially, "speculative decoding accelerates rollout generation without introducing additional off-policy bias." You are not approximating the policy. You are sampling from it, faster.
The answer is to train the draft online: at each RL iteration, update the draft using the current policy's token distributions on the rollout states just collected, "while gradients are stopped through the policy model." The draft chases; the policy never feels it.
Let p be the target policy's distribution at a draft position and q the draft's, both computed at the rollout sampling temperature. Two divergences matter:
And now the identity that ties the second one directly to speed, Equation (21):
Under lossless speculative sampling, the probability that a drafted token is accepted equals the overlap of the two distributions — the area both agree on. Minimising total-variation distance is therefore literally maximising the acceptance rate. Not a proxy for it. The same number.
Vocabulary of three, target p = (0.60, 0.30, 0.10), draft q = (0.50, 0.20, 0.30).
Overlap: min(0.60, 0.50) + min(0.30, 0.20) + min(0.10, 0.30) = 0.50 + 0.20 + 0.10 = 0.80.
Total variation: ½( |0.60−0.50| + |0.30−0.20| + |0.10−0.30| ) = ½(0.10 + 0.10 + 0.20) = ½(0.40) = 0.20.
And 1 − 0.20 = 0.80. The identity holds. Four out of five drafted tokens are accepted here.
The classical speculative-sampling result (Chen et al. and Leviathan et al., 2023, both cited by the paper) says that with acceptance rate a and K drafted positions, the expected number of tokens produced per verification round is (1 − aK+1)/(1 − a). The paper uses K = 4. So:
| Acceptance a | (1 − a5)/(1 − a) | Expected tokens per round |
|---|---|---|
| 0.30 | (1 − 0.00243)/0.70 | 1.425 |
| 0.50 | (1 − 0.03125)/0.50 | 1.938 |
| 0.70 | (1 − 0.16807)/0.30 | 2.773 |
| 0.80 | (1 − 0.32768)/0.20 | 3.362 |
| 0.90 | (1 − 0.59049)/0.10 | 4.095 |
That table is standard theory, not the paper's measurement — include it to build intuition, not to attribute. What the paper reports is the end result: speculative decoding "ultimately delivers an approximately 2× speedup in rollout generation and a 1.7× end-to-end speedup for the overall RL training pipeline."
So why not just minimise DTV, since that is the acceptance rate? Because absolute value has a constant-magnitude subgradient — it points the right way but tells you nothing about how far off you are, which makes it a poor optimisation target when the draft starts far from the policy. Forward KL has the opposite character: smooth, well-scaled gradients, but it is optimising a proxy.
The paper uses the hybrid LK loss, Equation (22), and mixes the two with a coefficient that depends on how well things are going, Equation (23):
ᾱk is the current acceptance rate at draft position k, aggregated over sequence and batch. Compute the schedule:
| Acceptance ᾱk | λk = e−3ᾱ | Weight on KL | Weight on TV | Regime |
|---|---|---|---|---|
| 0.00 | e0 = 1.0000 | 100% | 0% | Draft is lost. Pure distribution matching |
| 0.20 | e−0.6 = 0.5488 | 54.9% | 45.1% | Getting there |
| 0.50 | e−1.5 = 0.2231 | 22.3% | 77.7% | TV has taken over |
| 0.80 | e−2.4 = 0.0907 | 9.1% | 90.9% | Nearly pure acceptance-rate optimisation |
| 0.95 | e−2.85 = 0.0578 | 5.8% | 94.2% | Polishing |
The paper's summary of the schedule matches the arithmetic exactly: when alignment is poor, "the objective is therefore dominated by the forward KL term, which provides smooth and well-scaled gradients for rapidly aligning the draft distribution with the evolving policy"; as acceptance rises, "the objective gradually shifts from stable distribution matching to direct acceptance-rate optimization."
The full objective averages over K draft positions, Equation (24):
with K = 4 and η = 3. Note λk is per-position: the first drafted token is easy to get right and the fourth is not, so position 1 will be deep in TV mode while position 4 is still doing KL. One schedule per lookahead depth, automatically.
co-located partial rollout# One RL iteration on a shared GPU pool. XTuner trains, LMDeploy generates. def iteration(prompts, batch_target=8192, max_stale=3): launch(prompts) # keep the engine saturated: as one done = [] # finishes, another request takes its slot while len(done) < batch_target: traj = next_completed() done.append(traj) launch_one(next_prompt()) # PAUSE, do not abort: prefixes + metadata are retained paused = pause_in_flight() # each keeps tokens, logprobs, policy version # the SAME GPUs now train for mb in split(done, n=8): # 8 mini-batch update steps policy_update(mb) # each step makes the REST more off-policy version += 1 offload_training_state() sync_weights_to_inference() # resume, dropping anything that has drifted too far for t in paused: if version - t.oldest_segment_version > max_stale: discard(t) # hard staleness bound = 3 updates else: resume_from_prefix(t) # the correction that pause-and-resume makes necessary def token_weight(tok): rho = exp(logp_now(tok) - tok.logp_at_generation) # Eq (10), per-token behaviour version rho = clip(rho, 1 - eps_low, 1 + eps_high) # Eq (11) return detach(rho) # NOT part of the graph - this is the # difference from PPO surrogate clipping
The line worth pausing on is for mb in split(done, n=8). Eight mini-batch updates per rollout batch means that even the completed trajectories are off-policy for seven of the eight steps — they were generated by the policy as it stood before step one. Partial rollout is not the only source of staleness; it is the source that makes staleness per-token rather than per-batch.
Translate the staleness bound into tokens. Suppose a batch closes when 70% of rollouts have completed, and the median completed rollout ran 4,000 tokens. Then a paused trajectory resumes having been paused once, and can be paused at most three times before it is dropped. Three pause cycles is roughly three more batch windows, so a surviving long rollout can accumulate on the order of four windows' worth of generation — call it 16,000 tokens — split across four policy versions.
Now count gradient steps. Each window is 8 mini-batch updates, so a token generated in the first window and used in the fourth is being evaluated by a policy that is 3 × 8 = 24 gradient steps away from the one that produced it. At a learning rate of 1 × 10−6 that is a small drift, which is precisely why 3 is a defensible bound and 30 would not be:
| Staleness (policy updates) | Gradient steps of drift | What happens to ρ | Verdict |
|---|---|---|---|
| 0 | 0–7 (within-batch mini-steps) | Near 1. Clipping rarely binds | Fine |
| 1–3 | 8–24 | Drifts; clipping starts to bind on some tokens, bounding the variance | Accepted — the correction handles it |
| > 3 | > 24 | Many tokens pinned at the clip bound, so the weight carries little information about the true ratio | Discarded |
It is easy to lose track of what is fixing what, because Chapter 4 stacks four corrections. Sort them by the question each one answers:
| Question | Failure if unanswered | Mechanism |
|---|---|---|
| Did the same weights produce this token in both engines? | You are computing gradients for a function that never ran | R3 routing replay |
| Did the same arithmetic run? | Log-probabilities disagree at the fifth decimal, everywhere | The FP8 / BF16 / FP32 precision map |
| Is this specific token's recorded log-probability trustworthy? | A handful of tokens with garbage weights inject unbounded noise | The bidirectional-KL mask |
| Was this token generated by the policy I am updating? | Biased gradient with unbounded variance | The clipped importance weight and the staleness bound |
The first three are about agreement between two implementations. The fourth is about agreement between two moments in time. Conflating them is the easiest mistake to make while reading §4.3.1, and the paper is careful to keep them apart: R3 "removes discrete expert-routing mismatch, whereas the BKL mask filters the remaining token-level numerical outliers," and the clipped weight "corrects the policy mismatch introduced by pause-and-resume partial rollouts and repeated mini-batch updates."
By the end of Chapter 4 we have tokens, log-probabilities, and a repaired importance weight. What we do not yet have is the number that says how good was this response. That number — the advantage — is what multiplies the log-probability in the gradient, and this chapter is about the three transforms the paper applies to it, in order, and why each one exists.
Here is the pipeline. Everything downstream of the verifier:
Why does a policy gradient need a baseline at all? Because raw rewards have an arbitrary origin. If every response to a query scores 1.0, multiplying every log-probability by +1.0 pushes all of them up — a large, uninformative update that says nothing about which response was better. What you want is the relative quality within the group.
The paper follows Intern-S1-Pro in using the leave-one-out form, Equation (27):
The baseline for response i is the mean of the others, excluding i itself. That exclusion is not fussiness — if i were included in its own baseline, the baseline would be correlated with the thing it is subtracted from, which biases the estimator. Leaving one out makes the baseline independent of the sample it corrects.
G = 8 rollouts on one maths query, verifier gives 1 for correct and 0 for incorrect. Six correct, two wrong: R = (1, 1, 1, 0, 1, 0, 1, 1), so ∑R = 6.
For a correct response (Ri = 1), the others sum to 6 − 1 = 5, so the baseline is 5/7 = 0.714286 and
For an incorrect response (Ri = 0), the others sum to 6 − 0 = 6, so the baseline is 6/7 = 0.857143 and
Check the group sums to zero, as a correct baseline must: 6(+0.285714) + 2(−0.857143) = 1.714286 − 1.714286 = 0.000000. ✓
Which is also why a group where every reward is identical is worthless: every advantage is exactly zero and the gradient contribution is nil. Rather than waste the rollouts, the paper adopts DAPO's dynamic sampling: "query groups whose rewards are all identical are filtered out online and replaced with newly sampled groups." You keep sampling until you get a group that disagrees with itself.
Now the multi-task problem. The RL mixture spans "diverse scientific and general-purpose tasks" that "differ in structure, solution diversity, and uncertainty of policy exploration." Consider two extremes:
| A competition maths problem | Open-ended scientific generation | |
|---|---|---|
| Correct answers | Essentially one | Very many |
| Policy entropy while solving | Low — the model commits early to a chain and follows it | High — many tokens are genuinely open |
| What a strong push does | Sharpens an already-sharp distribution. Risk: collapse | Nudges a broad distribution. Risk: little |
| What suppressing failures does | Removes a wrong path. Usually fine | Can kill exploration that had not paid off yet |
The paper's diagnosis: this heterogeneity "makes group-based policy optimization methods induce an entropy-dependent bias, making advantage signals across prompt groups statistically non-comparable." Two groups can produce advantages of the same magnitude that mean completely different things about the update they will cause.
Group-level entropy, Equation (25), is the diagnostic — estimated from samples you already have, with no extra rollouts:
Note the inner sum runs over t, so this is total sequence surprisal averaged across the group, not a per-token average. Longer responses contribute more. Then GEPO reshapes:
The published coefficient values are not in the report, so the worked numbers below are illustrative; the branch structure is the paper's.
Take K = 4 responses per group, five tokens each, and read off the average per-token log-probability.
Group M (maths, verifiable answer). The policy is confident: log π ≈ −0.05 per token. Per response, ∑t log π = 5(−0.05) = −0.25. So
Group S (open-ended scientific write-up). Many tokens are genuinely free: log π ≈ −1.20 per token. Per response, 5(−1.20) = −6.00. So
A factor of twenty-four between two groups in the same batch. Now suppose at this training step the thresholds are Hlow = 1.0 and Hhigh = 4.0. Group M sits below Hlow, so its positive advantages are attenuated; group S sits above Hhigh, so its negative advantages are attenuated. With illustrative coefficients of 0.5 on the low-entropy positive branch and 0.8 on the high-entropy negative branch, and reusing the advantages from Worked Example 14:
| Group | Hg | Branch triggered | Advantage before | Advantage after |
|---|---|---|---|---|
| M (maths) | 0.25 | Low entropy, A > 0 | +0.2857 | 0.5 × 0.2857 = +0.1429 |
| M (maths) | 0.25 | Negatives untouched | −0.8571 | −0.8571 |
| S (generation) | 6.00 | Positives untouched | +0.2857 | +0.2857 |
| S (generation) | 6.00 | High entropy, A < 0 | −0.8571 | 0.8 × (−0.8571) = −0.6857 |
Read what that does to the entropy gap over time. In group M, rewarding successes is what sharpens the distribution further — so damping the positives slows the slide toward collapse. In group S, punishing failures is what narrows exploration — so damping the negatives keeps the search alive. Each branch pushes back against the direction each regime was already drifting.
Long-chain-of-thought models overthink. The paper cites the literature on it and names the symptom: "producing unnecessarily long reasoning trajectories even when the correct solution can be reached with substantially less computation."
The standard fixes both have costs the paper wants to avoid: an explicit length reward "introduce[s] auxiliary optimization objectives that may conflict with task rewards," and a separate length-control fine-tuning stage "complicate[s] the post-training pipeline and may disturb capabilities acquired during earlier RL stages." So instead: reweight advantages directly, with two principles.
| Principle | The rule | The stated reason |
|---|---|---|
| 1 | Never regularise negative responses | "Since an incorrect response may fail for many different reasons, penalizing its length can prematurely suppress potentially useful exploration and consequently degrade model performance" |
| 2 | Activate only when the pass rate on that query is high enough | "This design allows the model to freely explore difficult queries and encourages concise reasoning only after it has largely mastered them" |
Formally, let Pq = { i : Âi > 0 } be the positive set, Equation (14). Then, Equation (15):
with the length weight, Equations (16) and (17):
Three things to notice before computing anything. The min and max are taken over the positive set only, so length is scored relative to the other successful answers, not to failures. α is "the minimum weight assigned to long responses" — a floor, so the longest correct answer is down-weighted but never zeroed. And γ "controls the shape of the length-dependent decay," so you can make the penalty gentle near the short end and steep near the long end, or the reverse.
The big fraction in front is a normaliser, and it is the whole safety argument. Read it as: multiply everything by whatever constant restores the original total.
Continue Worked Example 14. Six positives with  = 2/7 = 0.285714 each, two negatives at −0.857143. Their reasoning lengths, in tokens:
Activation check. |Pq| = 6, G = 8. With an illustrative τ = 0.5 the threshold is τG = 4, and 6 ≥ 4, so regularisation fires. (Had only three of eight been correct, nothing below would happen at all.)
Compute the weights. L+min = 900, L+max = 5000, so the span is 4100. Take α = 0.2 and γ = 1 (illustrative — the paper does not publish them):
| Li | (Li−900)/4100 | 1 − that | wi = 0.2 + 0.8(·) |
|---|---|---|---|
| 900 | 0/4100 = 0.00000 | 1.00000 | 0.2 + 0.80000 = 1.00000 |
| 1200 | 300/4100 = 0.07317 | 0.92683 | 0.2 + 0.74146 = 0.94146 |
| 1500 | 600/4100 = 0.14634 | 0.85366 | 0.2 + 0.68293 = 0.88293 |
| 2400 | 1500/4100 = 0.36585 | 0.63415 | 0.2 + 0.50732 = 0.70732 |
| 3000 | 2100/4100 = 0.51220 | 0.48780 | 0.2 + 0.39024 = 0.59024 |
| 5000 | 4100/4100 = 1.00000 | 0.00000 | 0.2 + 0.00000 = 0.20000 |
Compute the normaliser. The weights sum to 1.00000 + 0.94146 + 0.88293 + 0.70732 + 0.59024 + 0.20000 = 4.32195. Since every Âj is the same 0.285714 here, both sums factor:
Apply it. Ãi = 1.388263 × wi × 0.285714:
| Li | wi | Âi before | Ãi after | Change |
|---|---|---|---|---|
| 900 | 1.00000 | +0.285714 | +0.396647 | ×1.39 |
| 1200 | 0.94146 | +0.285714 | +0.373432 | ×1.31 |
| 1500 | 0.88293 | +0.285714 | +0.350217 | ×1.23 |
| 2400 | 0.70732 | +0.285714 | +0.280572 | ×0.98 |
| 3000 | 0.59024 | +0.285714 | +0.234142 | ×0.82 |
| 5000 | 0.20000 | +0.285714 | +0.079329 | ×0.28 |
| sum of positives | 1.714339 | vs 1.714286 before | ||
The sum came back to 1.714339 against an original 1.714286 — a discrepancy of 0.000053, entirely from rounding the weights to five decimals. That is the invariant the paper describes: "The normalization term approximately preserves the total positive advantage mass, thereby changing the relative preference among successful responses without substantially altering the overall optimization scale."
And the reported result of the whole mechanism, from the Intern-S2-Preview-35B ablation in Figure 8: "Both settings achieve comparable reward curves, while adaptive length regularization substantially reduces the average output length." Same accuracy, shorter answers — which is the only version of this result worth having, because a length penalty that costs accuracy is just a worse model.
Eight rollouts on one query. Each bar is a response: height is its advantage, width encodes its reasoning length. Toggle the three stages on and off and watch the bars move. The running totals under the chart check the two invariants — LOO advantages sum to zero, and the length stage preserves the positive mass. Push the pass rate below the activation threshold and stage 3 switches itself off, exactly as Equation (15) says it should.
Equation (28) states the composition:
GEPO first, length second. The paper gives the reason for that order in one line: "This ordering ensures that the length-dependent weights act on the final entropy-adjusted advantages rather than modifying the verifier rewards." Since the length stage's normaliser is computed from the advantages it is rescaling, running it after GEPO means it preserves the post-GEPO mass — the thing that will actually be used — rather than a quantity GEPO is about to change.
Everything from Chapters 4 and 5 arrives in Equation (29):
| Factor | What it is | Which problem it solves |
|---|---|---|
| 1/G | Average over the group | A query with more rollouts should not dominate |
| 1/|yi| | Average over the response's tokens | A 60,000-token response should not outweigh a 600-token one by a factor of 100 |
| mBKLi,t | The 0/1 numerical-consistency mask, Equation (13) | Deletes tokens where the two engines disagree beyond φ |
| sg[ρ̄i,t] | Detached clipped importance weight, Equation (11) | Corrects for pause-and-resume staleness with bounded variance |
| Ãi | The shaped, sequence-level advantage | "The sequence-level advantage Ãi is shared by all policy-generated tokens in response yi" |
| log πθ | The only factor carrying gradient | This is plain REINFORCE underneath all the machinery |
| Setting | Value | What it implies |
|---|---|---|
| Optimizer | Muon | A matrix-aware optimizer that orthogonalises the update direction rather than rescaling coordinate-wise like Adam. Increasingly the default for very large training runs |
| Learning rate | 1 × 10−6 | Small. RL on a post-SFT checkpoint is a nudge, not a re-training |
| Weight decay | 0.01 | — |
| Rollout batch | 8,192 completed responses | Note "completed" — paused trajectories do not count toward it |
| Mini-batch updates per batch | 8 | So 1,024 responses per gradient step, and the later steps are already off-policy with respect to the batch — which is the second reason Equation (11) exists |
| Maximum generation length | 65,536 tokens | The straggler ceiling from Chapter 4 |
Equation (29) is REINFORCE, and REINFORCE is one line of calculus that is worth deriving because every term in this chapter is a modification of it.
You want to maximise the expected reward of your policy: J(θ) = Ey ∼ πθ[R(y)]. Write the expectation as a sum and differentiate:
That is not yet an expectation — you cannot sample it. Multiply and divide by πθ(y), which is legal wherever the probability is nonzero:
using ∇ log f = ∇f / f. That is the whole trick, and it is why every policy-gradient objective you will ever read has a log-probability in it: the log is what turns a derivative of a probability into something you can estimate by sampling.
And now the baseline is easy to justify. Adding any constant b that does not depend on y leaves the gradient unbiased, because E[∇ log π] = ∇ ∑y π(y) = ∇1 = 0. So R(y) − b has the same expected gradient as R(y), with a variance you can choose b to minimise. The leave-one-out mean is a b that is nearly optimal and, critically, independent of the sample it corrects.
advantage shaping# From a group of verifier rewards to the scalar that multiplies log pi. def shape(R, lengths, group_entropy, H_lo, H_hi, tau=0.5, alpha=0.2, gamma=1.0): G = len(R) if all_equal(R): return None # DAPO: resample this group entirely # --- 1. leave-one-out baseline, Eq (27) --- tot = sum(R) A = [(r - (tot - r) / (G - 1)) for r in R] # sums to exactly zero # --- 2. GEPO, Eq (25)-(26): entropy-regime rebalancing --- if group_entropy < H_lo: A = [a_lo * a if a > 0 else a for a in A] # damp exploitation elif group_entropy > H_hi: A = [a_hi * a if a < 0 else a for a in A] # protect exploration # --- 3. adaptive length regularisation, Eq (14)-(17) --- P = [i for i in range(G) if A[i] > 0] if len(P) >= tau * G and P: lo, hi = min(lengths[i] for i in P), max(lengths[i] for i in P) w = {i: alpha + (1 - alpha) * (1 - (lengths[i] - lo) / (hi - lo + 1e-9)) ** gamma for i in P} norm = sum(A[i] for i in P) / (sum(w[i] * A[i] for i in P) + 1e-9) for i in P: A[i] = norm * w[i] * A[i] # mass preserved, order changed return A # one scalar per RESPONSE, shared by its tokens
Note the guard on the length stage: if len(P) >= tau * G and P. When the model is failing most of the time on a query, the branch never runs and every advantage passes through unchanged. Difficulty gates concision, automatically, per query, with no schedule.
α sets the floor and γ sets the shape. Take α = 0.2 and vary γ over the normalised length r = (L − L+min) / (L+max − L+min), so w = 0.2 + 0.8(1 − r)γ:
| r | γ = 0.5 (concave) | γ = 1 (linear) | γ = 2 (convex) | γ = 3 |
|---|---|---|---|---|
| 0.00 | 1.0000 | 1.0000 | 1.0000 | 1.0000 |
| 0.25 | 0.8928 | 0.8000 | 0.6500 | 0.5375 |
| 0.50 | 0.7657 | 0.6000 | 0.4000 | 0.3000 |
| 0.75 | 0.6000 | 0.4000 | 0.2500 | 0.2125 |
| 1.00 | 0.2000 | 0.2000 | 0.2000 | 0.2000 |
Check one cell by hand at r = 0.5, γ = 2: (1 − 0.5)2 = 0.25, so w = 0.2 + 0.8(0.25) = 0.2 + 0.2 = 0.4000. ✓ And at γ = 0.5: (0.5)0.5 = 0.70711, so w = 0.2 + 0.8(0.70711) = 0.2 + 0.56569 = 0.76569. ✓
Read the columns as policies. γ < 1 is forgiving in the middle and punishes only the extreme tail — "I do not mind moderately long answers, but the very longest should not be the template." γ > 1 falls away immediately — "I want the shortest one, and everything else is roughly equivalent." Since the normaliser restores the total either way, γ controls purely who gets the credit, not how much there is.
"We use the Muon optimizer with a learning rate of 1 × 10−6 and a weight decay of 0.01." One line, easy to skip. But Adam and Muon differ in a way that matters at this scale.
| Adam-family | Muon | |
|---|---|---|
| Treats a weight matrix as | A bag of independent scalars | A matrix, with structure |
| What it normalises | Each coordinate, by its own running second moment | The update matrix's spectrum — roughly, it orthogonalises the update |
| Consequence | A few directions can dominate the step | The step spreads its energy across directions more evenly |
| Extra state | Two moments per parameter | Momentum plus a short iterative orthogonalisation per step |
For RL on a post-SFT checkpoint, "spread the update evenly across directions" is exactly the property you want: you are making a small correction to a model that is already good, and you would rather not let a handful of coordinates take the whole step. Combined with a learning rate of 1 × 10−6 — two to three orders of magnitude below a typical pre-training rate — the message of the configuration line is consistent: this stage is a nudge.
Everything so far trains on a response: one prompt in, one long generation out, one verifier score. But the whole premise of Chapter 0 was that scientific work is a loop. So how do you run reinforcement learning when the episode is not a paragraph but a forty-minute session in which the model opens files, runs a test suite, reads a stack trace, edits three files, and runs the suite again?
The paper's answer is not an algorithm. It is an abstraction and a lot of infrastructure. And the abstraction is worth the chapter, because it is genuinely reusable.
Before this framework, an agentic RL setup was usually one bespoke pipeline per combination: this agent scaffold running these tasks. Change the scaffold and you rewrote the rollout code; change the task source and you rewrote the verification code. The paper's move is to name the two axes and cut between them:
| Harness | Task | |
|---|---|---|
| Definition, from the paper | "specifies how an agent is instantiated, driven, and observed" | "specifies the initial environment, executable objective, and verifier-defined outcome" |
| Concretely | The control loop, the prompt scaffolding, the tool protocol, when it stops. OpenClaw, Claude Code, OpenCode, OpenHands, Mini-SWE, or your own loop | A container or repository at a known state, an instruction in English, and a program that returns solved / not solved |
| What varying it changes | "a harness determines the interaction policy and context construction" | "the task determines the environment and reward semantics" |
Their composition, in the paper's words, "converts heterogeneous agent executions into a common form of RL experience: an interactive rollout with an explicit environment, an observable action–observation history, and automatic outcome signals."
The harness axis splits in two, and the black-box half is the ambitious part.
| White-box harness | Black-box harness | |
|---|---|---|
| What you have | The control loop's source; you can orchestrate it directly | A shipped agent runtime with its own CLI, SDK, or model API. You do not get to reach inside |
| Named examples | The lab's own loops | OpenClaw, Claude Code, OpenCode, OpenHands, Mini-SWE |
| What the framework does | Drives it | Lets it "retain their native messages, tool loops, and control flow" and wraps it with an adapter that "translate[s] session lifecycle events, model calls, and interaction artifacts" |
Read that last cell again. The claim is that Intern-S2-Preview was trained with reinforcement learning inside real, third-party agent runtimes, unmodified. The agent framework thinks it is calling an ordinary model API. It is actually generating RL rollouts.
Which forces a specific engineering problem: those frameworks speak different protocols. The serving layer therefore accepts OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages, streaming or not, and relays "streamed text, reasoning, and tool-call events … to the harness in their native form." From the client's side, in the paper's phrase, "this remains an ordinary model service."
Here is the problem that would kill this if it were not solved. To compute a policy gradient you need the exact token IDs the policy emitted and the exact log-probabilities it assigned. But a black-box harness gives you back a string. Re-tokenising that string is not guaranteed to reproduce the original token sequence — tokenisers are not injective over rendering round-trips, and one merged or split token silently corrupts your gradient.
So the serving layer "transparently captures training-only evidence, including exact input and output token IDs, rollout log probabilities, and token-wise MoE router experts, without exposing these extensions to the agent's control logic." The paper names the interface token-in–token-out (TITO):
The summary sentence is precise and worth memorising: "TITO therefore preserves the sampled token sequence, while R3 preserves the conditional computation path that produced it." Two different kinds of fidelity, both required, and the second one only exists because the model is a mixture of experts. This is the same R3 from Chapter 4, doing the same job in a harder setting.
The protocol list in §4.4.1 is short and its implications are not. "Our LLM serving layer accepts OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages, and supports both regular and streaming generation."
| Protocol | What a harness expecting it assumes | What the gateway must therefore normalise |
|---|---|---|
| OpenAI Chat Completions | A messages array with roles; tool calls as a structured field on the assistant message | Role rendering into the model's chat template; tool-call serialisation |
| OpenAI Responses | A different item-based shape, with reasoning and tool items as first-class entries | The same underlying turn, re-rendered into a different envelope |
| Anthropic Messages | Its own content-block structure, including separate thinking and tool-use blocks | Again the same turn, again a different envelope — and streaming events with different names |
The trap hiding in that table is that each envelope implies a different string, and therefore a different token sequence, for what is semantically the same conversation. Which is exactly why the next section's TITO design matters: if the gateway rendered a response into a protocol envelope and the trainer later re-tokenised that envelope, the token sequence it recovered would depend on which harness happened to be connected. The tokens are captured before the envelope is applied.
A rollout produces two completely different kinds of record, and the design's cleverness is refusing to merge them.
| The semantic view | The execution view | |
|---|---|---|
| Produced by | The Agent Runner and Judger Adapters | LLM Serving |
| Contents | "the action–observation trajectory, outcome reward, process annotations, and session metadata" | "token IDs, loss labels, behavior log probabilities, and router experts" |
| Stored in | The Replay Buffer | The Rollout Trace Store |
| Who reads it | Anything that reasons about what the agent did | Only the trainer |
The stated benefit: keeping the views separate "decouples environment-facing logic from model-specific training representations while retaining a lossless path from an agent action to the policy tokens that generated it." You can change the tokeniser without touching the environment code, and change the environment without touching the trainer.
Now the data structure, which is the most quietly elegant thing in the paper.
An agentic session is a growing context. Turn 1 is the system prompt plus the task. Turn 2 is all of that, plus the assistant's first response, plus a tool result. Turn 3 is all of that, plus more. Store each model call as an independent record and you store the system prompt once per call — and if you sample several rollouts from the same task, you store the shared history once per rollout too. At 256K-token sessions this is ruinous.
So: "The Trace Store organizes each session as an incremental PrefixTree. Each node represents a newly appended context delta or assistant response and stores its token IDs, labels, rollout log probabilities, and router experts. Longest-prefix matching reuses the stable history of a session and appends only newly observed segments."
And the tree carries the loss mask with it, which is the second thing it is for: "System instructions, user messages, and tool observations are masked from the loss, while eligible policy-generated segments retain their training labels."
That masking is not optional bookkeeping. Consider what happens without it. A tool observation is text the model did not write — it is a compiler error, a directory listing, a JSON blob. Train on it and you are doing maximum-likelihood on your own environment's output format, teaching the policy to hallucinate plausible-looking tracebacks. The mask is the line between "the model's actions" and "the world's replies," and the PrefixTree is where that line is recorded.
The third job the tree does is the subtle one: "the PrefixTree preserves the lineage and exact boundaries of model calls across multi-turn and branching interactions. It thus establishes a stable correspondence between a semantic agent action and its rollout-time token span." That correspondence — "this tool call, in the transcript" maps to "these 340 token positions, in the trace" — is what makes Chapter 7's per-message credit assignment possible at all.
An agent RL framework with no tasks trains nothing. The task distribution comes from two sources with very different characters.
Source 1 — curated executable coding and terminal tasks. Table 1 of the paper, in full:
| Provider | Collection | Tasks | Environments | Tasks per environment |
|---|---|---|---|---|
| SWE-bench | SWE-smith | 59,136 | 222 | 266.4 |
| SWE-Gym | SWE-Gym | 2,438 | 2,401 | 1.02 |
| R2E-Gym | R2E-Gym-V1 | 7,480 | 8,101 | 0.92 |
| Nebius | SWE-rebench-V2 | 32,100 | 32,075 | 1.00 |
| AweAI-Team | Scale-SWE | 20,200 | 19,472 | 1.04 |
| NVIDIA | Nemotron-Terminal-Synthetic-Tasks | 80,000 | 8 | 10,000.0 |
| RUC-AIBOX | ClawGym-Task | 13,500 | 1 | 13,500.0 |
| Total | — | 214,854 | 62,280 | 3.45 |
First verify the totals. Tasks: 59,136 + 2,438 = 61,574; + 7,480 = 69,054; + 32,100 = 101,154; + 20,200 = 121,354; + 80,000 = 201,354; + 13,500 = 214,854. Environments: 222 + 2,401 = 2,623; + 8,101 = 10,724; + 32,075 = 42,799; + 19,472 = 62,271; + 8 = 62,279; + 1 = 62,280. Overall ratio 214,854 / 62,280 = 3.45.
Now the interesting part. That 3.45 average is a lie in the way averages usually are, because the column is wildly bimodal:
| Group | Tasks | Share of tasks | Environments | Share of environments |
|---|---|---|---|---|
| The five SWE-family sources | 121,354 | 56.5% | 62,271 | 99.99% |
| Nemotron-Terminal + ClawGym | 93,500 | 43.5% | 9 | 0.014% |
Check: 121,354 + 93,500 = 214,854 ✓, and 62,271 + 9 = 62,280 ✓. So 43.5% of all training tasks live inside nine environments. Those two collections are procedural terminal and workspace tasks — many different objectives inside a small number of containers. The SWE family is the mirror image: one repository snapshot per issue, so nearly one environment per task, which is exactly what "mine real-world GitHub issues, pull requests, and repository histories" produces.
Whatever the source, everything is normalised into the same contract — "an initialized execution environment, a natural-language objective, and an automatic verifier" — by "materializing its base repository or container and required assets as the initial environment, translating its issue statement or instruction into the task objective, and retaining its tests or reward programs as the verifier."
And one line about what this normalisation deliberately does not do: "these tasks remain grounded in live environments rather than being reduced to static instruction–response pairs, so their rewards reflect program behavior, repository state, and task-specific execution outcomes." The reward is what the computer did, not what a judge thought about a transcript.
Curated coding tasks teach coding. For "broader agentic coverage" the paper builds a closed loop that manufactures its own tasks out of community-contributed skills — documents that "describe concrete user workflows and their required tools and dependencies."
One more mechanism, and it is a nice one. When synthesised tasks are rolled out to build offline training data, trajectories that pass outcome filtering still get step-level curation. Each interaction step is annotated by behaviour type — the paper's list is worth reading in full, because it is a taxonomy of how agents fail:
| Annotated behaviour | What it looks like in a transcript |
|---|---|
| Normal progress | The agent did a sensible next thing |
| Tool-use errors | Wrong tool name, malformed arguments, a call that could never have worked |
| Repetitive failed attempts | The same failing command three times in a row |
| Invalid recovery | A response to an error that does not address the error |
| Premature termination | Declaring victory before the objective was met |
| Protocol violations | Breaking the harness's message or tool contract |
| Unsupported assumptions | Acting on a fact nothing in the session established |
| Hallucinated observations | Referring to output the environment never produced — the worst one |
And then the treatment: "Erroneous steps remain in the interaction context but can be marked as skip and excluded from the imitation loss, while the remaining responses serve as optimization targets."
That sentence contains a real insight. You cannot simply delete a bad step, because the steps after it were caused by it — the recovery only makes sense given the error. Delete the error and the recovery becomes an unmotivated non-sequitur, and you have taught the model to produce recoveries out of nowhere. Keeping the step in context and excluding it from the loss says: this happened, condition on it, but do not become it. The paper's own summary: "This selective masking avoids imitating flawed intermediate behavior without destroying the causal context of later actions."
An abstraction is only real if you can write its interface down. Here is harness × task, with the two halves that never touch each other.
harness x task# A TASK knows nothing about agents. A HARNESS knows nothing about tasks. class Task: def setup(self) -> Env: ... # materialise repo/container + assets objective: str # the instruction, in English def verify(self, env) -> Reward: ... # run tests / reward program AFTER the agent stops class Harness: def run(self, objective, env, model_url): ... # its OWN loop, prompts, tools, stop rule def rollout(harness, task): env = task.setup() session = trace_store.new_session() # a PrefixTree root # the harness thinks model_url is an ordinary OpenAI/Anthropic endpoint harness.run(task.objective, env, model_url=gateway.url(session)) reward = task.verify(env) # executed, not judged notes = process_annotator.scan(session) # deterministic error detection return replay_buffer.add(session, reward, notes) # what the gateway captures WITHOUT the harness ever knowing (TITO) def on_model_call(session, new_context): prefix_ids = session.tokenised_prefix # reused, never re-tokenised new_ids = tokenize(new_context) # only the delta out = engine.generate(prefix_ids + new_ids) trace_store.append(session, token_ids = out.ids, labels = "trainable", logprobs = out.logprobs, experts = out.router_experts) # R3 return render_native(out, protocol=session.protocol) # chat / responses / messages
Everything the trainer needs is captured in on_model_call, and nothing in Harness.run knows it happened. That is the whole black-box story in one function.
Take a single task rolled out G = 8 times, as a group-relative method requires. Each session is a 10-turn interaction; suppose the shared system prompt plus task statement is 3,000 tokens, and each turn adds an average of 1,200 tokens of assistant response plus tool observation. Assume the eight rollouts agree for the first two turns and then diverge (a plausible pattern — the opening moves of a task are nearly forced).
Naive storage: one flat context per model call. Turn t of one session contains the whole history, so its stored length is 3,000 + 1,200t. Across 10 turns, one session stores:
Eight sessions: 768,000 tokens.
PrefixTree storage: each node once. The shared trunk is the 3,000-token header plus two shared turns, so 3,000 + 2,400 = 5,400 tokens, stored once. Each of the eight sessions then contributes eight divergent turns of 1,200 tokens: 8 × 1,200 = 9,600 tokens each. Total:
Two separate effects are stacked in that number, and it is worth separating them. Most of the saving is that a node is stored once rather than once per turn that contains it — that is the incremental-delta property, and it applies even to a single session with no branching (96,000 tokens flat versus 15,000 as deltas, a 6.4× saving). The rest is prefix sharing across the eight rollouts of the trunk. As the paper puts it: "Longest-prefix matching reuses the stable history of a session and appends only newly observed segments."
Suppose you support 5 harnesses and 4 task families. Count the integration work under each design.
| Design | Units of work | Arithmetic | Adding a 6th harness costs |
|---|---|---|---|
| Bespoke pipeline per pairing | 20 | 5 × 4 | 4 more pipelines |
| Harness × task with adapters | 9 | 5 + 4 | 1 thin adapter |
Twenty against nine is a 2.2× saving today; the ratio grows as H·T against H + T. But the marginal number is the one that actually decides whether a research group can move: adding a harness costs one adapter instead of four pipelines, which is the difference between "we will support the new agent framework next quarter" and "someone can do it this afternoon."
And there is a second-order benefit the paper gestures at in its evaluation. Because the training framework can drive real harnesses, the evaluation can too — and it does: SkillsBench on OpenClaw 2026.5.7, Terminal-Bench on Terminus 2, SWE-Bench Pro and Multilingual on Mini-SWE-Agent, ResearchClawBench on ResearchHarness v0.0.49. Train and test on the same class of artefact, and the distribution shift between the two shrinks to the difference between task sets rather than the difference between a synthetic loop and a real one.
§4.4.1 names half a dozen components. Sorted by the problem each one exists to solve:
| Component | Problem it solves | What breaks without it |
|---|---|---|
| Agent Rollout Runner | Provisions the environment and manages the interaction "until normal completion or a termination condition" | Sessions run forever, or leak containers |
| Shared Sandbox Provider | Abstracts "environment creation, command and tool execution, isolation, error handling, and resource cleanup across local, remote, and custom backends" | Every task source needs its own execution plumbing |
| Agent Gateway & Adapters | A stable interface over white-box, black-box, and custom harnesses | Each harness needs its own RL execution stack |
| LLM Serving (TITO) | Speaks three protocols outward, captures token-level evidence inward | You cannot compute a gradient from a black-box session |
| Judger Adapters | Outcome verification and process annotation "against the same session state and execution artifacts" | Verification drifts from what actually ran |
| Replay Buffer | Holds the semantic view | Nothing can reason about what the agent did |
| Rollout Trace Store | Holds the execution view as a PrefixTree | No lossless path from an action back to its tokens |
| Experience assembly | Joins the two views "by session and segment, computes advantages, and exports model-ready experiences" | The two views exist and cannot be combined |
Notice that six of those eight are not machine learning at all. They are process isolation, protocol adaptation, resource lifecycle, and storage. The paper's own framing of why this is the contribution: the composition "converts heterogeneous agent executions into a common form of RL experience."
One last thing about §4.4.2 worth drawing out. Most synthetic-data pipelines are open loops: generate, filter, train, ship. This one closes:
"We aggregate execution failures and verifier feedback by skill domain and synthesis stage, and use these statistics to update skill sampling weights as well as synthesis skills, environment templates, and stage-specific prompts. The revised system then resamples capability paths and generates the next task distribution, progressively improving executability, coverage, and difficulty from observed agent behavior."
You have a session. It has eleven assistant messages, nine tool results, and one number at the end: solved. Now answer two questions that decide whether the training works.
First: which tokens get the credit? The session succeeded, but message four called a tool that does not exist, and messages five and six were spent recovering from that. Reward everything equally and you have just taught the model that inventing tool names is part of a winning strategy.
Second: is the reward even real? The verifier ran a test suite. The agent had write access to the repository. What stopped it from editing the tests?
§4.4.3 answers both, in that order.
Start with the base case. An agentic session "may contain multiple assistant responses separated by system instructions, user messages, tool calls, and environment observations. Nevertheless, these segments jointly solve one task and receive one final outcome reward."
So within a rollout group for the same task, a group-relative advantage Ai is computed from the complete-session reward — the same group-relative machinery as Chapter 5, one level up. Then: "The same session advantage is assigned to all eligible policy-generated segments in its trace, rather than treating each model call as an independently rewarded episode."
Two bookkeeping facts make this work, both from Chapter 6: "Token-level labels exclude non-policy context from the loss, while the PrefixTree preserves the exact boundaries of the trainable response segments."
Now the interesting case. "Outcome-only credit can reinforce undesirable intermediate behavior when a session eventually succeeds despite malformed outputs, invalid or repeated tool calls, unnecessary recovery attempts, or abnormal termination."
The architecture keeps two channels strictly apart:
| The outcome verifier | The process annotator | |
|---|---|---|
| Question it answers | "Is the task solved?" | "Was this particular message well-formed behaviour?" |
| What it produces | The session reward | An adv_penalty attached to a specific assistant message |
| What it changes | Everything downstream of Ai | "These annotations do not change the session reward or the token labels" |
| Nature | Executed. A program ran | Deterministic pattern detection, not a judgement of taste |
The process weight wi,k ∈ [−1, 1] for segment k of session i enters through Equation (30):
and the advantage is zero for non-trainable tokens.
Stare at the branch. The weight applies only when the advantage is positive. The paper's reason: "They are applied only to positive advantages, so the negative learning signal of failed trajectories is preserved."
A session succeeded and drew a group-relative advantage of Ai = +0.60. Four trainable assistant segments; the process annotator flagged two of them.
| Segment | What it did | wi,k | Ã = w · A | Effect on the gradient |
|---|---|---|---|---|
| k = 1 | Read the failing test, formed a hypothesis | 1.00 | +0.600 | Full positive credit |
| k = 2 | Called a tool with an invalid argument name | 0.00 | 0.000 | Contributes nothing. Not punished, not learned |
| k = 3 | Repeated the identical failing call a third time | −0.50 | −0.300 | Reversed — pushed down, inside a winning session |
| k = 4 | Wrote the correct patch, tests passed | 1.00 | +0.600 | Full positive credit |
Now run the same four segments in a session that failed, Ai = −0.60. The branch in Equation (30) means the weights are ignored entirely: every trainable segment gets −0.600, including the good ones.
That asymmetry looks unfair on segment 1 — it was a reasonable action, penalised for the company it kept. It is nonetheless the correct engineering choice, for two reasons. Reason one: if you let process weights reduce the penalty on well-formed steps inside failures, you have built an incentive to produce beautifully-formatted actions that solve nothing, and format is much easier to optimise than correctness. Reason two: outcome failure is the only signal in the entire system that is unambiguously trustworthy, because a program produced it. Weakening it with heuristic annotations trades a hard signal for a soft one.
And note what makes Equation (30) implementable at all: it needs wi,k to be applied to the exact token span of message k. That mapping is precisely what Chapter 6's PrefixTree was built to preserve — "The PrefixTree maps each annotated message to its exact trainable token span." Without the trace store, this mechanism could not exist.
One agentic session, drawn as the tree the Trace Store keeps. Grey nodes are non-policy context — system prompt, user message, tool observations — masked out of the loss entirely. Coloured nodes are policy-generated segments. Set the session outcome, then click any assistant segment to flag it with a process weight and watch its token-level advantage change while its neighbours do not. Flip the outcome to failure and the weights stop mattering, exactly as Equation (30) specifies. Branch the session to see prefix sharing: the trunk is stored once.
The split in this chapter has a name in the literature, and the paper cites it: the distinction between outcome supervision and process supervision. Outcome supervision scores the final answer; process supervision scores each intermediate step. Both have a well-known character.
| Outcome supervision | Process supervision | |
|---|---|---|
| What it needs | A verifier that runs once at the end | A judgement about every step |
| How you get it | Execute the task | Human annotation, or a learned process reward model |
| Reliability | High — it is a program's verdict | Depends on the annotator or the model |
| Credit resolution | Coarse — one number for the whole session | Fine — a number per step |
| Gameability | Low, once the environment is sealed | Higher — a learned scorer is a second thing to satisfy |
The usual move in the literature is to train a process reward model and use it to shape rewards throughout the trajectory. This paper does something more conservative: it keeps outcome supervision as the only source of reward, and uses process information solely as a multiplicative gate on positive credit, computed from deterministic checks rather than a model.
Where does Ai come from in an agentic setting? The same place it came from in Chapter 5, one level up: a group of rollouts of the same task, each scored by the verifier on the complete session.
Take G = 6 rollouts of one SWE task under one harness. All-correct semantics, so the reward is binary. Two of the six solved it: R = (1, 0, 0, 1, 0, 0).
Check the sum: 2(+0.800) + 4(−0.400) = 1.600 − 1.600 = 0.000. ✓
Now note the difference from a reasoning group. On a hard task where only two of six succeed, a success is worth +0.800 and a failure only −0.400 — the rare outcome carries twice the signal. Compare with Chapter 5's group of eight where six succeeded: there, success was worth +0.286 and failure −0.857. The estimator inverts the asymmetry automatically as difficulty changes, which is exactly the behaviour you want on a task distribution spanning "resolve a one-line typo" and "implement a multi-file feature."
And then each of those six numbers is broadcast to every trainable segment in its session, modulated by the process weights of Equation (30) whenever it is positive. A successful rollout with eleven assistant messages produces eleven token spans all carrying +0.800, minus whatever the annotator withheld.
The paper says the session advantage is assigned to "all eligible policy-generated segments." That qualifier is carrying two separate filters, and it is worth pulling them apart.
| Filter | Removes | Set by |
|---|---|---|
| Provenance — did the policy write it? | System instructions, user messages, tool observations, environment output, padding | The PrefixTree's per-node label, recorded at capture time |
| Numerical trust — is the recorded log-probability reliable? | Individual tokens where the two engines disagree beyond φ | The bidirectional-KL mask from Chapter 4, applied token by token |
These operate at different granularities and both are necessary. Provenance is a span property: an entire tool observation is out, regardless of its contents. Numerical trust is a token property: a single position inside an otherwise-good assistant message can be dropped while its neighbours train. A segment can therefore be fully eligible by provenance and still contribute nothing, if every one of its tokens failed the mask.
§4.4.2 lists the behaviour types the step-level curation annotates, and §4.4.3 lists what process weights "can suppress or reverse." Putting the two lists side by side gives you the practical mapping — the specific values are illustrative, the categories are the paper's.
| Detected behaviour | Why it is bad even when the session wins | Reasonable w |
|---|---|---|
| Parse or format error | The harness had to recover from a malformed message. Reinforcing it teaches the model that malformed output is survivable | 0.0 |
| Invalid tool name or arguments | A call that could never have worked. Zero information, one wasted turn, and it is cheap to learn to avoid | 0.0 |
| Repeated or failed tool call | Actively harmful — this is the seed of a loop. The model must learn that repeating a failure is not a strategy | −0.5 |
| Unnecessary recovery attempt | Burns context on a problem that was not there | 0.0 |
| Context-, turn-, or session-limit termination | The session ended because it ran out of room, not because it finished. Reinforcing the path that got there rewards verbosity | −0.5 |
| Premature termination | Declaring victory early. If the outcome verifier still says solved, this was luck | −0.5 |
| Unsupported assumption | Acting on a fact the session never established | 0.0 |
| Hallucinated observation | Referring to output the environment never produced — the model has started reading its own imagination as tool results | −1.0 |
| Normal progress | — | 1.0 |
Two structural notes. The weight is bounded in [−1, 1], so the most a process annotation can ever do is invert the session advantage completely — it cannot amplify it. And every one of these detections is deterministic: the paper specifies "a process annotator attaches an adv_penalty to the specific assistant message exhibiting a deterministic process error." No model judges taste here. Either the JSON parsed or it did not; either the tool name is in the registry or it is not.
This section exists because of a hard truth about executable rewards: an environment that an agent can act in is an environment an agent can corrupt. The paper names the threats — "executable environments expose the reward channel to solution leakage, test manipulation, and other forms of reward hacking" — and then lists the countermeasures. Each one is a specific attack, closed.
| Attack the agent could attempt | The countermeasure, from the paper |
|---|---|
| Read the gold patch or the held-out tests from the workspace | "Gold patches, held-out tests, and exact scoring test identifiers are excluded from the rollout workspace and made available only to the grading infrastructure after agent execution" |
Recover the real fix from the repository's own history — git log, a branch, a remote | "Repository histories are sanitized into a single baseline commit and remote references are removed" |
| Search the web for the issue by its identifier | "Task identifiers that directly reveal upstream issues are likewise omitted from agent-facing instructions when necessary" |
| Edit or delete the tests so they pass | "Canonical test files are restored or overlaid after the agent has stopped, and gold test patches are applied on top of the agent's source changes. Modifications to agent-visible tests therefore cannot directly alter the scoring procedure" |
| Fix the target bug while breaking something else | "Conservative all-correct semantics for software-engineering tasks, requiring both target-fix and regression checks to pass"; where a canonical expected test-state map exists, "the observed outcomes must match it exactly" |
| Benefit from the harness breaking — a crashed container scored as success | "Missing grading artifacts, execution failures, and unparseable verifier outputs are tracked separately from genuine task failure, preventing infrastructure errors from being interpreted as successful policy behavior" |
Notice the shape of the fourth row, because it is the general pattern: the agent's edits and the grading artefacts are applied in a fixed order, with grading last. The agent may write whatever it likes to the test files; the canonical versions are overlaid afterwards. This converts a security problem ("prevent the agent from touching the tests") into a sequencing problem ("it does not matter what it touched"), which is a much easier problem and does not require sandboxing that the agent cannot reason around.
And a small operational note buried in §5.1.2 that shows the same instinct applied at evaluation time: for SWE-Bench Pro, "we modified the official evaluation image to avoid agents getting ground truth from git logs." They found the leak in somebody else's benchmark image and closed it before reporting a number on it.
Be clear about the boundary. Session-aware outcome credit plus process weights gives you two things: an unbiased reward, and a way to withhold it from mechanically-bad steps. It does not give you an answer to the classic question.
The field's usual answers all carry costs this paper chose not to pay:
| Approach | What it would give you | The cost |
|---|---|---|
| A learned value function over session states | Per-step advantages | Another large model, trained on states that barely repeat, with its own error that the policy can exploit |
| A process reward model | Per-step scores including subtle quality | A second learned component in the reward path — exactly what Chapter 7's design is avoiding |
| Counterfactual rollouts — branch from step k and measure | An honest causal estimate | Multiplies rollout cost by the number of branch points, in a system where rollout is already 82% of wall clock |
| Broadcast the outcome, gate on mechanics | An unbiased signal, plus a filter on malformed behaviour | Coarse credit. The paper's choice |
Over many rollouts of many tasks, the coarse signal is not as bad as it sounds: a step that reliably appears in successful sessions and not in failed ones accumulates positive credit statistically, even though no single session identified it. That is the same argument that makes REINFORCE work at all, and it is why the paper can afford to leave the fine-grained question open — at the price of needing more rollouts than a per-step method would.
Figure 11 reports reward trajectories "across SWE, general-purpose, and terminal tasks under multiple agent harnesses," each panel "a representative example over 160 optimization steps," locally smoothed. The paper's own reading:
| Task family | Reported behaviour |
|---|---|
| General-purpose | "improve rapidly and then stabilize for both Claude Code and OpenClaw" |
| SWE and terminal (longer horizon) | "exhibit more harness-dependent transients, but their displayed trajectories improve or recover over the optimization window" |
And then a caveat the paper writes itself, which is worth quoting because most reports do not: "These different dynamics are expected: a harness determines the interaction policy and context construction, while the task determines the environment and reward semantics. The shared upward trend is therefore evidence that the common trace, credit-assignment, and optimization stack remains effective across distinct harness–task compositions, rather than evidence that their absolute reward scales are directly comparable."
Translated: do not read these curves against each other. A reward of 0.4 on a terminal task and 0.4 on a SWE task are different quantities with different verifiers. What the figure supports is a claim about the machinery — that one training stack works across compositions — not a claim about which composition is harder.
session credit# One session's trace -> a per-token advantage map. def assign(session, group_rewards, i): # group-relative advantage from the COMPLETE-SESSION reward A = group_rewards[i] - mean(group_rewards[:i] + group_rewards[i+1:]) adv = zeros(session.n_tokens) # default: no gradient anywhere for seg in session.segments: # from the PrefixTree, in order if seg.label != "trainable": # system / user / tool observations continue # stay ZERO - never imitate the environment w = seg.process_weight # in [-1, 1], from the annotator a = w * A if A > 0 else A # Eq (30) - the asymmetric branch # the PrefixTree gives the EXACT token span for this message adv[seg.start:seg.end] = a return adv # the process annotator never touches the reward, only the weight def annotate(seg, history): if not parses(seg): return 0.0 # malformed output if seg.tool not in TOOLS: return 0.0 # invalid tool name if identical_to_recent_failure(seg, history): return -0.5 # repeated failed call if seg.stop_reason in ("context_limit", "turn_limit"): return -0.5 return 1.0
Two lines carry the chapter. if seg.label != "trainable": continue is the boundary between the model's actions and the world's replies. a = w * A if A > 0 else A is the asymmetry. Everything else is bookkeeping that the trace store already did.
Extend the earlier example to see the full behaviour of Equation (30). Same session shape, same annotations, three different verifier verdicts, and a group whose other rollouts give A the values below.
| Segment (w) | Session solved, A = +0.60 | Session solved but most siblings did too, A = +0.10 | Session failed, A = −0.60 |
|---|---|---|---|
| k=1, good (w = 1.00) | +0.600 | +0.100 | −0.600 |
| k=2, bad args (w = 0.00) | 0.000 | 0.000 | −0.600 |
| k=3, repeated call (w = −0.50) | −0.300 | −0.050 | −0.600 |
| k=4, correct patch (w = 1.00) | +0.600 | +0.100 | −0.600 |
| Tool observations, system prompt | 0.000 | 0.000 | 0.000 |
Three readings. In column one, a clean win: the two good segments get full credit, the malformed call gets nothing, and the repeated call is actively pushed down inside a session that succeeded — which is the entire point of the mechanism. In column two, the same structure scaled down sixfold, because the leave-one-out baseline says this success was expected. In column three, the weights vanish and every trainable segment carries the full penalty.
And note the bottom row across all three columns: the tool observations are zero everywhere. There is no verdict under which the model is trained to reproduce its environment's output.
"We use conservative all-correct semantics for software-engineering tasks, requiring both target-fix and regression checks to pass." Make that concrete on a SWE-style task, which ships two test sets:
| Test set | Standard name | State before the patch | Required state after |
|---|---|---|---|
| The tests that demonstrate the bug | fail-to-pass | Failing | Passing |
| The rest of the suite | pass-to-pass | Passing | Still passing |
Suppose a task has 3 fail-to-pass and 412 pass-to-pass tests. An agent submits a patch that fixes all 3 and breaks 1 of the 412. Under a proportional metric it scores 414/415 = 99.76%. Under all-correct semantics it scores 0.
The harsh version is the right one, and the reason is what a partial reward would teach. A gradient that rewards 99.76% is a gradient that says "breaking one unrelated test is a rounding error." Compound that over training and you have a policy with a systematic tolerance for collateral damage — which is precisely the behaviour that makes an automated code agent unusable in a real repository. Binary all-correct semantics encode the actual acceptance criterion of the job.
It is tempting to read the leakage-prevention list as due diligence. It is not; each item corresponds to a channel that an optimiser will find, because the optimiser is not trying to cheat — it is trying to maximise a number, and these are the cheapest paths to that number.
| Channel | Why an optimiser finds it before it finds the fix |
|---|---|
| Gold patch in the workspace | Reading a file is one tool call. Understanding a bug is forty |
git log containing the real commit | Repository history is the first thing any competent agent inspects — for legitimate reasons |
| An issue identifier that can be searched | If the model has web access, the identifier is the answer |
| Writable tests | assert True passes every suite, and costs one edit |
| Infrastructure errors scored as success | Crashing the container is far easier than solving the task, and a naive harness may record no failure |
The last row is the subtlest and the paper closes it explicitly: "Missing grading artifacts, execution failures, and unparseable verifier outputs are tracked separately from genuine task failure, preventing infrastructure errors from being interpreted as successful policy behavior." If a broken run is silently scored as a pass, you have built a reward for breaking the runner.
There is a problem we have been walking past. Chapters 4 and 5 built a reasoning RL pipeline. Chapters 6 and 7 built an agentic RL pipeline. They are different objectives, different reward semantics, different response lengths, different entropy regimes. What happens if you just train one model on both at once?
The paper's answer is careful: "Although mixed reinforcement learning enables a single policy to acquire broad capabilities, jointly optimizing highly heterogeneous reasoning and agentic tasks can introduce optimization conflicts and prevent the model from fully exploiting domain-specific training signals."
Note it does not say joint training fails. GEPO exists precisely to make heterogeneous joint training work, and the multi-task RL stage is joint. The claim is narrower: for two families this far apart, you get more out of specialising first.
Multi-teacher distillation usually means many fine-grained domain specialists. The paper deliberately does not: "we organize specialization around two broad capability domains. Our preliminary evaluation suggests that independently training teachers for many fine-grained domains incurs substantial RL and infrastructure costs, while providing limited additional benefit for our setting."
Do the arithmetic that sentence implies. Each teacher is a full RL run on a 397-billion-parameter model — the partial-rollout cluster, the verifier fleet, the sandbox provider, all of it. Twenty teachers is twenty of those. And the marginal return is bounded: after the first few domains, teachers start overlapping, and a student cannot absorb more than the union of what its teachers know. Two teachers over two genuinely disjoint capability families sits at, in the paper's phrase, "a favorable balance between specialization quality, training cost, and distillation complexity."
Here is the failure mode that makes on-policy distillation hard. In on-policy distillation, the student generates the trajectories and the teacher scores them. That is the good property — the student is corrected on states it actually visits, not on a teacher's idealised transcript. But it has a precondition: the teacher must be competent at scoring what the student produced.
Think about what "outside the reliable support" means concretely. The teacher assigns a probability to the student's token given the student's prefix. If that prefix is somewhere the teacher would essentially never have gone, the teacher's distribution there is not a considered judgement — it is an extrapolation from a region it barely modelled. You are asking an expert about a situation they have never been in and treating the answer as ground truth.
Two things reduce the gap. First, structural: "both expert policies are derived from the same SFT checkpoint and therefore retain broadly compatible generation behaviors." They are siblings, not strangers. Second, procedural: a warmup borrowed from Nemotron 3 Ultra — "we use the reasoning and agentic experts to generate high-quality trajectories and perform a lightweight SFT warmup on the original SFT model," and that becomes the initial student. "This warmup exposes the student to the characteristic reasoning patterns and interaction behaviors of both teachers, increasing the overlap between student-generated trajectories and teacher-supported distributions before OPD optimization begins."
The idealised objective, Equation (31):
which the paper notes is equivalent to minimising
"on states induced by the student itself."
The other virtue is density. Compare it to what Chapter 5 was working with: "In contrast to RL objectives based on sparse trajectory-level rewards, OPD provides dense token-level supervision from the corresponding expert throughout the generated trajectory." One scalar for a 60,000-token response, versus a teacher opinion at every single position.
To give the student a teacher opinion at every position, the teacher's opinion has to travel from a teacher-scoring worker to a learner worker. How much data is that?
Take a single trajectory at the system's maximum, H = 256K = 262,144 tokens.
Option A — full-vocabulary logits, O(HV). The paper does not publish its vocabulary size, so use a round V = 100,000 purely to feel the magnitude:
Option B — top-k logits, O(Hk). The paper names top-64 as the realistic version of this:
Option C — the sampled token's teacher log-probability only, O(H).
Option C is 64× smaller than Option B and roughly 100,000× smaller than Option A. Now multiply by a batch: at 8,192 trajectories, Option B would be 33.6 MB × 8,192 ≈ 275 GB moving across the interconnect per batch. Option C is about 4.3 GB. That is the difference between a design that runs and one that spends its life in the network.
The paper's justification for why the cheap option suffices: "Since our teachers share the same SFT origin and the warmup stage further reduces their policy discrepancy with the student, we find that transmitting only the teacher log-probability of each sampled token is sufficient for stable distillation."
To reuse the partial-rollout infrastructure, OPD is written in the same clipped importance-weighted REINFORCE form as Chapter 5. Only the advantage changes, Equation (33):
where πprox is "the frozen proximal student policy used to construct the distillation signal." The paper's reading: "The advantage is positive when the teacher assigns a higher probability to the sampled token than the proximal student and negative otherwise, thereby increasing or decreasing the probability of the sampled action accordingly."
Because it is a difference of logs, the advantage is exactly the log of the probability ratio: ÂOPD = ln( pT / pprox ).
| Situation | pteacher | pprox | ÂOPD = ln(pT/pprox) | What the update does |
|---|---|---|---|---|
| Teacher strongly endorses a token the student under-rates | 0.40 | 0.10 | ln 4 = +1.3863 | Large push up |
| Mild endorsement | 0.22 | 0.20 | ln 1.1 = +0.0953 | Small push up |
| Perfect agreement | 0.30 | 0.30 | ln 1 = 0.0000 | Nothing. No gradient at all |
| Teacher dislikes what the student sampled | 0.05 | 0.30 | ln(1/6) = −1.7918 | Strong push down |
| Teacher considers it nearly impossible | 0.002 | 0.25 | ln 0.008 = −4.8283 | Very strong push down |
Two properties worth naming. First, the advantage is self-annihilating at convergence: when the student matches the proximal policy's teacher-agreement, the advantage is zero everywhere and training halts on its own. There is no reward to keep chasing. Second, the scale is logarithmic, so a teacher that assigns 0.002 to something the student liked produces a strongly negative but finite advantage — it does not blow up the way a raw ratio pT/pprox would in the other direction.
The importance ratio and clipping are unchanged from Chapter 4, Equations (34) and (35), using "the same interval as reasoning RL":
and the full objective is Equation (36):
Compare it with Equation (29) side by side and the symmetry is exact:
| Component | Reasoning RL (29) | OPD (36) |
|---|---|---|
| Gradient carrier | log πθ | log πθ — identical |
| Numerical mask | mBKL | mBKL — identical |
| Off-policy correction | sg[ρ̄] | sg[ρ̄OPD] — identical form, same clip interval |
| Normalisation | 1/G over the group, 1/|yi| over tokens | 1/Nd over the domain batch, 1/|Ti| over trainable tokens |
| The advantage | Sequence-level: from verifier rewards via LOO, GEPO, length regularisation. One number per response | Token-level: the teacher–student log-probability gap. One number per token |
| Masked out | Non-policy tokens | "Non-policy tokens, including prompts, environment observations, tool outputs, and padding tokens, are excluded through Ti" |
The paper says it outright: "Equation (36) has the same optimization form as the unified reasoning RL objective in Equation (29). … The only distinction is the advantage."
The direction claim in the callout above is easy to assert and worth proving to yourself once. Take a teacher that is genuinely bimodal — two acceptable continuations and one bad one — and a student restricted to a family of distributions that can only really commit to one place.
Consider two candidate students:
| Student | Distribution | Character |
|---|---|---|
| Scover | [ 0.34 , 0.33 , 0.33 ] | Spread out — covers everything the teacher might do, including the bad option |
| Smode | [ 0.90 , 0.08 , 0.02 ] | Committed to one of the teacher's two good modes |
Forward KL, D(pT ‖ S) — the mass-covering direction. For Scover:
For Smode:
Forward KL prefers Scover, 0.146 against 0.626 — by a factor of 4.3. It would rather the student hedge across all three options, including the bad one, than commit to a good one.
Reverse KL, D(S ‖ pT) — the mode-seeking direction. For Scover:
For Smode:
Reverse KL also prefers Scover here, 0.196 against 0.453 — because Smode abandoned one of the teacher's two genuinely good modes, and reverse KL does penalise that too. So where is the mode-seeking? Look at which term dominates Scover's reverse KL: 0.33 ln(0.33/0.10) = +0.394, coming entirely from the bad option. Reverse KL punishes the student for putting mass where the teacher does not, weighted by the student's own mass there. So its gradient's loudest instruction is "get out of the third slot."
Follow that instruction and see who rewards it. Move Scover's third component from 0.33 to 0.02, redistributing onto the teacher's two good modes — call it [0.49, 0.49, 0.02]. Compute both divergences for that student:
| Student | Forward KL D(pT‖S) | Reverse KL D(S‖pT) |
|---|---|---|
| [0.34, 0.33, 0.33] — hedging | 0.14631 | 0.19634 |
| [0.49, 0.49, 0.02] — on the good modes | 0.08430 | 0.05127 |
| [0.90, 0.08, 0.02] — one mode only | 0.62627 | 0.45347 |
Now compare the rewards for abandoning the bad option. Reverse KL fell from 0.19634 to 0.05127 — a 74% reduction. Forward KL fell from 0.14631 to 0.08430 — only 42%. And push the third component all the way to zero and the asymmetry becomes absolute: reverse KL's 0.02 ln(0.02/0.10) term goes to 0 · ln 0 = 0, while forward KL's 0.10 ln(0.10/q) term diverges to infinity. Forward KL will not let you drop a teacher behaviour at any price. Reverse KL positively wants you to.
Equation (33) compares the teacher against πprox, "the frozen proximal student policy used to construct the distillation signal" — not against the current learner πθ. That distinction is worth a paragraph, because it is exactly the same instinct as the detached weight in Chapter 4.
If the advantage were sg[log πT − log πθ] with πθ live, the target would move underneath every mini-batch update: the same token would have a different advantage on mini-batch 1 and mini-batch 8 of the same rollout batch, purely because the learner had drifted. Freezing the reference at the start of the batch gives every token in that batch a fixed target, so the eight mini-batch steps are all optimising the same objective. It is a trust region built out of a snapshot rather than a constraint.
on-policy distillation stepdef opd_batch(prompts_by_domain, student, teachers, prox): loss = 0.0 for d, prompts in prompts_by_domain.items(): # d in {"rea", "agt"} traj = student.generate(prompts) # ON-POLICY: the student drives for t in traj: # the teacher only ever scores the SAMPLED token -> O(H) payload lp_T = teachers[d].logprob_of(t.ids, t.states) # (H,) lp_prox = prox.logprob_of(t.ids, t.states) # (H,) adv = detach(lp_T - lp_prox) # Eq (33) = log(p_T / p_prox) rho = detach(clip(exp(student.logprob_of(t.ids, t.states) - t.logp_beh), 1 - eps_low, 1 + eps_high)) # Eq (34)-(35) mask = t.bkl_mask & t.is_policy_token # drop tool output, prompts, padding loss -= lam[d] * (mask * rho * adv * student.logprob_of(t.ids, t.states)).mean() return loss # Eq (36) - identical shape to Eq (29)
Compare the body of that loop with the reasoning-RL objective and the only line that differs is adv. Everything else — the clipped detached ratio, the numerical mask, the policy-token mask, the mean — is reused verbatim.
Equation (36) carries a per-domain coefficient λd that "controls the contribution of each teacher domain," and Equation (31) uses the same symbol to control "the sampling or loss weight of each domain." The paper does not publish its values, and the value it chose is the entire content of "how much of each expert survives."
| If λrea ≫ λagt | If they are balanced | If λagt ≫ λrea |
|---|---|---|
| The student converges toward the reasoning expert. Strong on SciReasoner and HMMT; the agentic expert's long-horizon habits fade | The student is pulled toward two different behaviours on two different prompt distributions — which is fine, because the domains are disjoint at the prompt level | Strong on Terminal-Bench and SWE-Bench; reasoning depth erodes toward whatever the agentic expert happened to retain |
The middle column is the one that makes this work, and it is worth being explicit about why. "During OPD, each query is assigned to either the reasoning or agentic domain, and the corresponding expert is selected as its teacher." The two teachers are never asked about the same prompt. There is no arbitration, no averaging of two opinions about one token, and therefore no way for the teachers to actively disagree. λd is a data mixture weight, not a blend of conflicting supervision.
The paper's closing claim for the stage: "The resulting student consolidates the scientific reasoning capabilities of the mixed-reasoning policy and the long-horizon interaction capabilities of the agentic policy into the unified Intern-S2-Preview model."
And this is why Chapter 9's shape is what it is. A model that had only run reasoning RL would look strong on SciReasoner and weak on Terminal-Bench; one that had only run agentic RL would look like the reverse. Intern-S2-Preview-397B is competitive on both and best-in-class on neither of the agentic leaders — which is the signature of a consolidation, and the price you pay for one set of weights instead of two.
| Design | What you ship | Cost |
|---|---|---|
| Joint RL over everything | One model | Optimisation conflicts between heterogeneous task families |
| Two experts, routed at inference | Two models plus a router | Double the serving footprint; a routing decision that can be wrong |
| Two experts, distilled into one | One model | An extra training stage, plus whatever the student fails to absorb |
One more pass, to make the mechanism physical. Differentiate the summand with respect to θ. Only log πθ carries gradient, so for a single trainable token:
Now read the sign. Gradient descent steps in the direction of −∇L, which here is + mρ̄ÂOPD∇ log πθ. So:
| Situation | ÂOPD | The step does |
|---|---|---|
| Teacher likes the sampled token more than the proximal student did | > 0 | Moves along +∇ log πθ(yt) — raises the probability of exactly that token in exactly that context |
| Teacher likes it less | < 0 | Moves along −∇ log πθ(yt) — lowers it |
| They agree | = 0 | Nothing. No step from this token |
| The two engines disagreed numerically | masked, m = 0 | Nothing. The token is not trusted enough to learn from |
And the magnitude is ln(pT / pprox), so a token the teacher rates ten times higher gets a push of ln 10 = 2.303 while one it rates 1.1 times higher gets 0.095 — a 24× difference in step size from a 9× difference in opinion. The logarithm compresses the extremes, which is what keeps a single confidently-disagreeing token from dominating a batch.
One honest limit before the summary. On-policy distillation transfers what a teacher would say at the student's own states. That is a strong signal, and there are things it structurally cannot move.
| What OPD transfers well | What it transfers poorly or not at all |
|---|---|
| Local next-token preferences — phrasing, formatting, tool-call syntax, the shape of a reasoning step | Capability the student cannot reach. If the student never generates a trajectory containing the insight, the teacher is never asked about it. On-policy means the student chooses the states |
| Behaviour on prefixes the student actually visits | Behaviour on prefixes it does not. The whole objective is defined on the student's own distribution |
| Habits that show up token by token — when to stop reasoning, when to call a tool | Long-range strategy that is only visible across thousands of tokens. A per-token log-ratio is a myopic signal |
| The intersection of both teachers' styles | Anything the warmup did not put in reach. The student starts inside both teachers' support by construction, and the objective keeps it there |
This is the last training chapter, so here is the complete journey from pre-trained checkpoint to released model, with every mechanism from Chapters 4 through 8 placed where it acts.
| Stage | What enters | Mechanisms in play | What leaves |
|---|---|---|---|
| 1. SFT (§4.2) | The pre-trained checkpoint from Chapter 3's data engines | A broad multimodal mixture — conversation, instruction following, safety, code, image-text, visual grounding, tool use, scientific tasks, long-horizon agentic trajectories. Chain-of-thought built by rejection sampling with Intern-S1-Pro and other open models, then validated by language models and human domain experts | A controllable assistant with tool-use and format initialisation. The common ancestor of everything downstream |
| 2a. Multi-task RL (§4.3) | The SFT checkpoint | Partial rollout + off-policy correction (Eq 10–11), R3, the FP32 precision map, the BKL mask (Eq 12–13), online speculative decoding (Eq 18–24), LOO advantages (Eq 27), DAPO dynamic sampling, GEPO (Eq 25–26), adaptive length regularisation (Eq 14–17), all composed in Eq 29. Muon, lr 1e-6, 8,192 responses per batch, 8 mini-steps, 65,536 max generation | The reasoning expert |
| 2b. Agentic RL (§4.4) | The same SFT checkpoint, in parallel | Harness × task; white-box and black-box harnesses behind a three-protocol gateway; TITO + R3 capture; the PrefixTree trace store; 214,854 executable tasks plus the self-evolving synthesiser; session-aware outcome credit; process-aware advantage control (Eq 30); verifier integrity | The agentic expert |
| 3. Warmup (§4.5) | Trajectories from both experts | A lightweight SFT pass on the original SFT model, following Nemotron 3 Ultra | The initial student, already inside both teachers' support |
| 4. OPD (§4.5) | The student, both teachers, prompts labelled by domain | Student-generated trajectories; teacher scores the sampled token only (O(H) payload); reverse KL on student states (Eq 31–32); the same clipped-REINFORCE form with a token-level advantage (Eq 33–36); the same BKL mask and clip interval as stage 2a | Intern-S2-Preview — the released model |
Two structural observations. First, stages 2a and 2b are parallel, not sequential — they branch from one checkpoint and never see each other's gradients, which is exactly what makes them specialists. Second, the same three low-level mechanisms — partial rollout, R3, the BKL mask — appear in stages 2a, 2b, and 4. They are the substrate, not features of any one stage.
Every model report's results section is written by people who want the model to look good. That is fine and expected; the reader's job is to read the table rather than the prose. This chapter puts all four evaluation tables in front of you with the losses marked, and then says what each one actually supports.
The comparison set is seven other frontier models: Qwen3.5-397B-A17B, DeepSeek-V4-pro, Kimi-K2.7-Code, GLM-5.2, GPT-5.5, Gemini-3.1-Pro, and Claude-Opus-4.8. Some are open-weight, some are not, and the paper's own convention distinguishes "best among open-sourced models" from "best among all models" — a distinction we will keep, because it changes almost every conclusion.
| Benchmark | Intern-S2- Preview-397B | Qwen3.5- 397B-A17B | DeepSeek- V4-pro | Kimi- K2.7-Code | GLM- 5.2 | GPT- 5.5 | Gemini- 3.1-Pro | Claude- Opus-4.8 | Who wins |
|---|---|---|---|---|---|---|---|---|---|
| Biology-Instructions | 56.92 | 4.49 | 9.14 | 7.68 | 6.34 | 10.52 | 13.87 | 6.78 | Intern, by 43 points |
| Mol-Instructions | 52.37 | 11.65 | 12.06 | 24.56 | 19.58 | 40.49 | 38.84 | 38.35 | Intern |
| MolecularIQ | 61.49 | 41.48 | 44.43 | 52.81 | 60.91 | 76.41 | 38.94 | 66.78 | GPT-5.5. Intern best open |
| SciReasoner | 63.97 | 45.02 | 51.11 | 51.69 | 51.45 | 61.15 | 60.35 | 58.00 | Intern |
| TOMG-Bench | 65.66 | 54.06 | 57.63 | 58.28 | 57.89 | 69.89 | 62.67 | 61.38 | GPT-5.5. Intern best open |
| MP20 | 67.88 | 6.15 | 6.75 | 8.40 | 1.50 | 16.12 | 16.75 | 15.60 | Intern, by 51 points |
| ProteinBinder-9 | 4.36 | 1.64 | 1.88 | 1.92 | 2.01 | 2.13 | 2.21 | 2.40 | Intern — but read the scale |
| Multimodal | |||||||||
| XLRS-Bench | 51.97 | 50.11 | – | 49.90 | – | 50.96 | 54.27 | 51.84 | Gemini. Intern best open |
| MicroVQA | 68.81 | 68.71 | – | 61.04 | – | 63.63 | 71.02 | 61.80 | Gemini. Intern best open by 0.10 |
| SFE | 61.67 | 62.97 | – | 50.76 | – | 52.09 | 59.57 | 59.08 | Qwen3.5 — Intern second |
| ObsCrisis-Bench | 26.07 | 19.22 | – | 32.63 | – | 28.33 | 25.71 | 24.24 | Kimi — Intern third |
| Agentic | |||||||||
| SciCode | 49.11 | 46.35 | 47.53 | 43.49 | 51.97 | 55.92 | 54.44 | 56.21 | Claude — Intern fifth |
| SGI-Bench | 49.37 | 44.44 | 45.70 | 50.63 | 52.41 | 42.77 | 45.28 | 49.06 | GLM — Intern third |
| ResearchClawBench | 18.44 | 15.86 | 13.69 | 15.40 | 23.35 | 17.00 | 14.54 | 21.74 | GLM — Intern third |
Now read it properly, because there are two completely different stories in that table.
And ProteinBinder-9 deserves a special note. Intern scores 4.36 and the field scores between 1.64 and 2.40. That is the best result in the column and it is also, in absolute terms, a pass rate of about four percent on de novo protein binder design. The benchmark asks a system to "generate protein binders that satisfy a predefined binding interface and pass a multi-stage structural and physicochemical evaluation pipeline," with candidates assessed using RFdiffusion and AlphaFold 3 and then filtered on interface confidence, binding energy, and molecular contacts. Winning a benchmark where every model is near the floor tells you the ordering is right and very little about whether the capability is usable.
| Benchmark | Intern-S2- Preview-397B | Qwen3.5- 397B-A17B | DeepSeek- V4-pro | Kimi- K2.7-Code | GLM- 5.2 | GPT- 5.5 | Gemini- 3.1-Pro | Claude- Opus-4.8 | Who wins |
|---|---|---|---|---|---|---|---|---|---|
| MMLU Pro | 89.75 | 87.80 | 86.86 | 87.10 | 87.22 | 88.20 | 91.00 | 90.12 | Gemini. Intern best open |
| SimpleQA-Verified | 69.90 | 54.80 | 46.60 | 38.60 | 37.90 | 64.30 | 75.60 | 43.30 | Gemini. Intern best open by 15 |
| AdvancedIF | 74.44 | 75.49 | 73.83 | 76.17 | 75.76 | 76.20 | 79.78 | 72.88 | Gemini. Intern sixth |
| HMMT-2026 | 91.57 | 87.88 | 91.76 | 90.34 | 92.50 | 97.06 | 94.70 | 95.36 | GPT-5.5. Intern sixth |
| Multimodal | |||||||||
| MMMU Pro | 80.46 | 80.29 | – | 77.92 | – | 81.68 | 83.99 | 76.88 | Gemini. Intern best open by 0.17 |
| ChartQAPro | 69.65 | 68.61 | – | 54.86 | – | 69.23 | 71.18 | 58.65 | Gemini. Intern best open |
| Agentic | |||||||||
| SkillsBench | 50.03 | 35.58 | 49.53 | 55.63 | 53.19 | 49.59 | 37.20 | 54.40 | Kimi — Intern fourth |
| TerminalBench 2.1 | 67.42 | 51.30 | 64.00 | 66.29 | 77.90 | 79.40 | 73.80 | 84.60 | Claude — Intern fifth |
| SWE-Bench-Pro | 61.56 | 43.55 | 55.40 | 57.59 | 62.10 | 58.60 | 54.20 | 69.20 | Claude. Intern third |
| SWE-Bench-Multilingual | 81.67 | 65.00 | 72.44 | 78.56 | 82.00 | 73.33 | 44.00 | 77.00 | GLM by 0.33 — Intern second |
| WildClawBench | 44.68 | 34.50 | 43.70 | 46.89 | 54.20 | 58.20 | 40.80 | 64.72 | Claude — Intern fifth |
The paper's summary of this table — "the best results among open-source models on MMLU-Pro (89.75), SimpleQA-Verified (69.90), MMMU-Pro (80.46), and ChartQAPro (69.65)" and, on agentic tasks, "consistently outperforms Qwen3.5-397B and demonstrates performance comparable to that of Kimi-K2.7-Code" — is accurate. It is also carefully scoped, and the scoping is where the information is.
A score is meaningless without knowing what was scored. §5.1.1 describes each benchmark, and the descriptions change how you read the numbers — particularly the ones where Intern's margin is enormous.
| Benchmark | What it asks, from §5.1.1 | Scale | Why the margin is what it is |
|---|---|---|---|
| Biology-Instructions | "Multi-omics" sequence understanding — genomic, transcriptomic, and proteomic data, combining sequence prediction with reasoning | 21 tasks | Requires reading nucleotide and amino-acid strings at character resolution. General models score 4–14 |
| Mol-Instructions | Molecule-oriented, protein-oriented, and biomolecular-text tasks | Large instruction set | Same story, one domain over |
| MolecularIQ | "Reason faithfully over molecular graphs represented as SMILES" — counting, indexing, constrained generation, with symbolic verification | 5,111 questions, 849 held-out molecules | Symbolically verifiable, so no partial credit for plausible-sounding answers. GPT-5.5 leads at 76.41 |
| SciReasoner | Scientific reasoning across 9 domains and 149 concrete tasks, ten sub-benchmarks, mixed formats including "protocol-based procedural questions" | 149 tasks | The broadest scientific reasoning test here, and Intern leads it outright at 63.97 |
| TOMG-Bench | Natural-language-guided molecule generation: editing, property optimisation, customised generation, automatically checked for validity and constraint satisfaction | 5,000 samples per subtask | Generation, not recognition — and validity is machine-checked |
| MP20 | Conditional crystal structure generation — "predicting precise atomic coordinates and lattice parameters from chemical compositions under physical constraints such as periodicity and symmetry" | 27,136 train / 9,046 test, no chain-of-thought annotations | Emitting valid crystallography. Every general model is under 17; Intern is 67.88 |
| ProteinBinder-9 | De novo protein binder design against 9 targets, graded by a pipeline using RFdiffusion and AlphaFold 3, then filtered on interface confidence, binding energy, and molecular contacts | 9 targets | Everyone is near the floor. Intern's 4.36 is the best of a very low field |
Look again at the multimodal blocks of Tables 2 and 3 and count the dashes. DeepSeek-V4-pro and GLM-5.2 have no entry on XLRS-Bench, MicroVQA, SFE, ObsCrisis-Bench, MMMU-Pro, or ChartQAPro — six rows, two models, twelve missing cells.
That matters for how you read "best among open-sourced models." On MMMU-Pro, Intern's 80.46 is compared against Qwen3.5's 80.29 and Kimi's 77.92, and GLM-5.2 — which beats Intern on SGI-Bench, ResearchClawBench, TerminalBench, SWE-Bench-Pro, and SWE-Bench-Multilingual — simply is not in the column. The lead is real over the models that were measured. It is silent about the two that were not.
The likely and unremarkable explanation is that those models are text-only or their multimodal variants were unavailable. The reading instruction stands regardless: a dash is not a zero and it is not a loss; it is an absence, and an absence narrows the claim.
Two scientific-multimodal rows go against the model, and they are worth a look because they are the only places in Table 2 where a general model beats it on perception.
| Benchmark | Intern | Winner | What the benchmark demands | A plausible reading |
|---|---|---|---|---|
| SFE | 61.67 | Qwen3.5-397B-A17B, 62.97 | "830 verified visual question answering pairs across 66 multimodal tasks" spanning five disciplines, using "authentic raw scientific data formats" | A 1.30-point gap on 830 items is about 11 questions, against a binomial standard error of roughly √(0.62×0.38/830) = 1.68 points. Statistically a tie |
| ObsCrisis-Bench | 26.07 | Kimi-K2.7-Code, 32.63 | Multimodal reasoning about extreme weather and geophysical crises from multispectral satellite observations plus optional weather-station measurements; 4,202 VQA samples, 127 events, eight disaster categories, 61 countries, across multiple observation timesteps | A 6.56-point gap on 4,202 items is real — the standard error is about 0.68 points, so this is roughly ten sigma. A genuine loss |
ObsCrisis-Bench is the interesting one, because it is the benchmark in the table that most resembles the paper's own thesis: heterogeneous evidence (multispectral imagery plus optional numerical station measurements), across multiple timesteps, requiring "early warning, event-type and timing prediction, impact assessment, and post-event recovery analysis." A model with a dedicated time-series encoder ought to be advantaged here. It scores fourth of six models with a number, and the whole field is under 33.
This is where the architecture chapter cashes out, and the margins are enormous.
| Model | ASU01 | ASU03 | BIU01 | BIU03 | EAU01 | MEU01 | NEU06 | PHU01 | PHU04 | RAU01 | RAU02 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| GPT-4.1-mini (text) | 67.2 | 15.6 | 0.2 | 12.7 | 67.0 | 44.0 | 16.1 | 24.0 | 52.7 | 24.6 | 10.6 |
| Gemini2.5-Flash (text) | 64.1 | 16.3 | 1.5 | 12.4 | 67.6 | 60.9 | 5.8 | 20.7 | 64.8 | 20.9 | 13.5 |
| DeepSeek-V3 (text) | 1.1 | 12.3 | 0.0 | 5.8 | 40.2 | 59.3 | 13.6 | 28.9 | 50.7 | 19.4 | 4.2 |
| GPT-5-mini (VL) | 65.7 | 18.9 | 0.8 | 17.9 | 67.6 | 30.4 | 13.3 | 21.4 | 47.8 | 24.3 | 9.1 |
| Gemini2.5-Flash (VL) | 61.6 | 15.2 | 0.9 | 8.3 | 72.5 | 64.1 | 11.6 | 22.7 | 59.0 | 31.6 | 11.3 |
| Intern-S1-Pro (1T) | 98.0 | 75.9 | 20.8 | 88.3 | 99.5 | 65.6 | 71.3 | 36.8 | 93.2 | – | – |
| Intern-S2-Preview-397B | 97.1 | 91.0 | 36.5 | 98.3 | 100.0 | 81.8 | 70.2 | 66.9 | 99.9 | 88.4 | 60.2 |
Three separate claims live in that table, and they are worth separating.
Claim 1 — modelling the numbers beats describing them. Look at BIU01: every general model scores between 0.0 and 1.5 F1. Both Intern models — the only two with a dedicated time-series encoder — score 20.8 and 36.5. The paper's reading: this highlights "the importance of directly modelling the underlying time series rather than relying solely on textual descriptions or visualized signals." Note also that the vision-language variants do not rescue it: GPT-5-mini scores 0.8 looking at a plot of the signal. A picture of the data is not the data.
Claim 2 — the smaller model beat the bigger one, and you can count it. Nine tasks are supported by both Intern models. Intern-S2-Preview-397B wins seven: ASU03 (75.9 → 91.0), BIU01 (20.8 → 36.5), BIU03 (88.3 → 98.3), EAU01 (99.5 → 100.0), MEU01 (65.6 → 81.8), PHU01 (36.8 → 66.9), PHU04 (93.2 → 99.9). It loses two: ASU01 (98.0 → 97.1) and NEU06 (71.3 → 70.2), both by about one point. Seven of nine, at "less than half the number of parameters." The single largest jump is PHU01, 36.8 to 66.9 — the paper calls this out by name.
Claim 3 — two tasks are new. RAU01 and RAU02 are blank for Intern-S1-Pro. These are the radar tasks — "radar coding-scheme classification and mode-and-modulation classification, which was not supported by Intern-S1-Pro." S2 scores 88.4 and 60.2 against general-model baselines in the 4–32 range. That capability is a direct consequence of the Chapter 1 change that made the encoder handle "high-frequency but short sequence lengths."
This is the most instructive table in the paper, and the reason is the parenthesis.
| Model | ENG02 | ENG03 | MEG03 | NEG03 | PHG02 | URG01 | URG05 |
|---|---|---|---|---|---|---|---|
| GPT-4.1-mini (text) | 125.0 (1.4) | 8.3 (96.0) | 42.1 (49.6) | 95.2 (96.4) | 1.1e3 (94.2) | 320.6 (18.6) | 126.6 (100) |
| Gemini2.5-Flash (text) | 72.5 (5.9) | 9.6 (99.0) | 62.2 (57.9) | 63.5 (99.2) | 110.8 (99.0) | 246.0 (23.3) | 98.6 (100) |
| DeepSeek-V3 (text) | 117.2 (46.1) | 7.7 (98.0) | 46.4 (30.9) | 4.3 (3.1) | 200.1 (92.2) | 350.0 (18.6) | 296.7 (93.0) |
| GPT-5-mini (VL) | 56.1 (4.5) | 11.2 (76.0) | 37.6 (51.8) | 74.3 (97.2) | 155.3 (97.4) | 182.1 (58.1) | 71.1 (72.9) |
| Gemini2.5-Flash (VL) | 103.9 (7.4) | 15.6 (53.0) | 53.1 (37.2) | – | 185.2 (36.9) | 351.9 (16.3) | 114.6 (91.2) |
| Moirai-Large | 121.2 (100) | 12.8 (100) | 51.7 (100) | 59.1 (100) | 116.9 (100) | 294.7 (100) | 74.6 (100) |
| TimeMoE-Large | 70.4 (100) | 11.6 (100) | 39.0 (100) | 70.1 (100) | 80.2 (100) | 218.4 (100) | 84.4 (100) |
| Chronos-bolt-Base | 73.7 (100) | 12.0 (100) | 41.5 (100) | 78.5 (100) | 109.3 (100) | 139.3 (100) | 70.6 (100) |
| UniTS | 70.1 (100) | 12.8 (100) | 42.0 (100) | 95.2 (46.4) | 135.9 (44.1) | 389.7 (100) | – |
| TimeOmni | 68.6 (100) | 7.4 (100) | 37.5 (100) | 78.7 (100) | 163.0 (100) | 247.0 (100) | 174.0 (100) |
| Intern-S2-Preview-397B | 60.2 (100) | 7.1 (100) | 32.8 (100) | 59.2 (100) | 72.2 (100) | 138.9 (100) | 60.6 (100) |
Lower MAPE is better; higher success rate is better.
Look at ENG02. GPT-5-mini reports a MAPE of 56.1, which is lower — better — than Intern's 60.2. If you read only the first number, the general vision-language model wins that column.
Now read the second number: 4.5. It produced a usable forecast on 4.5% of the cases. The 56.1 is the error on the 4.5% it managed, which is a conditional average over a self-selected sample — the easy ones, the short horizons, the cases where the output length happened to fit. Intern's 60.2 is the error over 100% of them.
Make the comparison honest by asking a question that does not depend on which subset was attempted: on 1,000 forecasting requests, how many produce a usable answer at all?
| Model on ENG02 | MAPE on attempted | Success rate | Usable forecasts per 1,000 requests |
|---|---|---|---|
| GPT-4.1-mini | 125.0 | 1.4% | 14 |
| GPT-5-mini (VL) | 56.1 | 4.5% | 45 |
| Gemini2.5-Flash (text) | 72.5 | 5.9% | 59 |
| DeepSeek-V3 | 117.2 | 46.1% | 461 |
| TimeMoE-Large | 70.4 | 100% | 1,000 |
| Intern-S2-Preview-397B | 60.2 | 100% | 1,000 |
The paper explains the failures precisely: "Text and Vision-Language LLMs often exhibit low success rates because long prediction horizons can exceed their output capacity, while strict sequence-length and formatting requirements frequently lead to instruction-following failures. Moreover, generating forecasts through discrete text tokens can compromise numerical precision."
Every one of those three failure modes is what Chapter 1's Lane 4 was built to remove. Output capacity: a numerical branch emits values, not thousands of numerals. Formatting failures: there is no format to get wrong. Precision: values are values. And the horizon predictor — that unglamorous module with 99% accuracy — is what turns "forecast the next two seconds" into an integer without an instruction-following failure.
Against the specialised forecasters, which all achieve 100% success by construction, Intern wins six of the seven columns outright — ENG02, ENG03, MEG03, PHG02, URG01, URG05 — and on NEG03 it posts 59.2 against Moirai-Large's 59.1, a gap of 0.1. Winning six of seven against dedicated time-series models, while also being a 397-billion-parameter language model that reads PDFs, is the strongest single result in the report. The paper adds one more data point: on GIFT-Eval, "a benchmark for general time series forecasting," it achieves "a competitive zero-shot MASE of 0.785."
Table 4 has eleven columns and it is easy to lose the shape. Average the F1 scores over the nine tasks both Intern models support — ASU01, ASU03, BIU01, BIU03, EAU01, MEU01, NEU06, PHU01, PHU04:
Intern-S1-Pro (1T): 98.0 + 75.9 + 20.8 + 88.3 + 99.5 + 65.6 + 71.3 + 36.8 + 93.2.
Running: 98.0, 173.9, 194.7, 283.0, 382.5, 448.1, 519.4, 556.2, 649.4. Divide by 9:
Intern-S2-Preview-397B: 97.1 + 91.0 + 36.5 + 98.3 + 100.0 + 81.8 + 70.2 + 66.9 + 99.9.
Running: 97.1, 188.1, 224.6, 322.9, 422.9, 504.7, 574.9, 641.8, 741.7. Divide by 9:
A gain of 10.25 F1 points, at roughly 40% of the parameters. And the strongest general-purpose baseline on the same nine tasks — take Gemini2.5-Flash in its text configuration: 64.1 + 16.3 + 1.5 + 12.4 + 67.6 + 60.9 + 5.8 + 20.7 + 64.8 = 314.1, so 314.1 / 9 = 34.90.
| System | Mean F1 over the 9 shared tasks | Gap to Intern-S2 |
|---|---|---|
| Gemini2.5-Flash (text) | 34.90 | −47.51 |
| Intern-S1-Pro (1T) | 72.16 | −10.25 |
| Intern-S2-Preview-397B | 82.41 | — |
Two different comparisons live in that column and they should be read differently. The 47-point gap to a general model is an architecture gap — one system models the signal, the other reads a description of it. The 10-point gap to the predecessor is a refinement gap: same idea, better encoder, half the parameters. Chapter 1's channel-wise Transformer and adaptive patching are what that ten points is made of.
Against the five specialised forecasters — all of which achieve 100% success by construction, since they are purpose-built numerical models — here is who wins each column of Table 5, by lowest MAPE.
| Task | Best specialist | Its MAPE | Intern's MAPE | Winner |
|---|---|---|---|---|
| ENG02 | TimeOmni | 68.6 | 60.2 | Intern, by 8.4 |
| ENG03 | TimeOmni | 7.4 | 7.1 | Intern, by 0.3 |
| MEG03 | TimeOmni | 37.5 | 32.8 | Intern, by 4.7 |
| NEG03 | Moirai-Large | 59.1 | 59.2 | Moirai, by 0.1 |
| PHG02 | TimeMoE-Large | 80.2 | 72.2 | Intern, by 8.0 |
| URG01 | Chronos-bolt-Base | 139.3 | 138.9 | Intern, by 0.4 |
| URG05 | Chronos-bolt-Base | 70.6 | 60.6 | Intern, by 10.0 |
Six of seven, with the loss being a tenth of a point. And note which specialist is strongest changes column by column — TimeOmni three times, Chronos twice, Moirai and TimeMoE once each — while one general-purpose foundation model is at or near the top of every column. That is the strongest form the result can take: not "we beat the best baseline" but "we beat a different best baseline in each domain."
Domain-native scientific tasks: dominant, by margins that indicate a capability difference rather than a tuning difference. Time series: dominant, understanding and forecasting alike, with a smaller model beating its trillion-parameter predecessor seven times out of nine. General knowledge and factuality: best among open models, behind Gemini-3.1-Pro. Multimodal: best among open models by margins running from 0.10 to 1.9 points, behind Gemini-3.1-Pro. Strict instruction following: a genuine weakness — sixth of eight, fourth of five open models. Competition mathematics: sixth, on a 33-problem benchmark. Agentic coding, terminal, and research: competitive, frequently second among the open models, generally behind Claude-Opus-4.8 and GLM-5.2 — though it does beat Claude on SWE-Bench-Multilingual (81.67 against 77.00) and edges it on SGI-Bench (49.37 against 49.06). That is a specialist that has not given up being a generalist — which is precisely what the Chapter 8 distillation stage was for.
Same treatment for Table 3, because two of its rows are far more informative than their numbers suggest once you know the protocol.
| Benchmark | What it asks, from §5.1.2 | Scale | What Intern's score means |
|---|---|---|---|
| MMLU-Pro | MMLU with more choices and "more challenging, reasoning-intensive questions" | Broad subject coverage | 89.75, best open. Knowledge is intact after all four training stages |
| SimpleQA-Verified | Short-form factuality "without access to retrieval tools," on prompts deduplicated, topic-balanced, source-reconciled, ambiguity-removed and adversarially filtered; the autorater separates correct, incorrect, and not-attempted | 1,000 human-verified prompts | 69.90 — 15 points clear of the next open model. A pre-training result |
| AdvancedIF | Instruction following under "complex single-turn instructions, multi-turn carried context, and system-prompt steerability." Rubrics of up to 20 criteria; "a response succeeds only when it satisfies all applicable criteria" | 1,645 human-written prompts | 74.44, sixth of eight and fourth of five open models. The genuine weakness |
| HMMT-2026 | 33 problems from the February 2026 Harvard–MIT tournament via MathArena, "evaluated soon after the competition" so it is a relatively fresh test | 33 problems | 91.57. Note the tiny n — one problem is 3.03 points |
| SkillsBench | Whether "structured packages of procedural knowledge improve the performance of language-model agents," using matched evaluations with and without Skills | 87 tasks, 8 domains | 50.03. Evaluated on OpenClaw 2026.5.7 |
| Terminal-Bench 2.1 | Agents on "89 difficult, realistic tasks executed in isolated command-line environments," each with a dedicated environment, human reference solution, and automated tests | 89 tasks | 67.42. Evaluated on Terminus 2; some results from Artificial Analysis |
| SWE-Bench Pro | "Long-horizon, enterprise-oriented" tasks that "may require hours or days of professional work," across public, held-out, and commercial sets | 1,865 problems, 41 repositories | 61.56. Evaluated on Mini-SWE-Agent, with the official image modified to close a git-log leak |
| SWE-bench Multilingual | Issue resolution beyond Python across nine languages, requiring both fail-to-pass and pass-to-pass tests | 300 tasks, 42 repositories | 81.67, second by 0.33 |
Prose summaries in results sections are selection functions. Do the counting yourself. Across the 25 benchmark rows in Tables 2 and 3, here is where Intern-S2-Preview-397B lands:
| Outcome | Count | Rows, with Intern's overall rank |
|---|---|---|
| Best of all eight models | 5 | Biology-Instructions, Mol-Instructions, SciReasoner, MP20, ProteinBinder-9 |
| Best among open models, behind a closed one | 8 | TOMG-Bench (2), XLRS-Bench (2), MicroVQA (2), SimpleQA-Verified (2), ChartQAPro (2), MolecularIQ (3), MMLU-Pro (3), MMMU-Pro (3) |
| Top three overall, but another open model is ahead | 6 | SFE (2), SWE-Bench-Multilingual (2), ObsCrisis-Bench (3), SGI-Bench (3), ResearchClawBench (3), SWE-Bench-Pro (3) |
| Fourth to sixth overall | 6 | SkillsBench (4), SciCode (5), TerminalBench 2.1 (5), WildClawBench (5), AdvancedIF (6), HMMT-2026 (6) |
Check the arithmetic: 5 + 8 + 6 + 6 = 25 rows, which is Table 2's fourteen plus Table 3's eleven. Thirteen of the twenty-five — 52% — are "best overall or best open." That is a strong result and it is not a clean sweep.
And the distribution of the other twelve is informative. Of the six rows where Intern places fourth to sixth, five are agentic or strict instruction-following benchmarks — SkillsBench, SciCode, TerminalBench, WildClawBench, AdvancedIF. The single exception is HMMT-2026, competition mathematics, on 33 problems. Not one of the twelve is a knowledge, science, or perception benchmark.
Two rows in the tables are claimed as leads and deserve to be read with a ruler on them. MicroVQA: Intern 68.81, Qwen3.5 68.71 — a gap of 0.10. MMMU-Pro: Intern 80.46, Qwen3.5 80.29 — a gap of 0.17.
MicroVQA "consists of 1,042 expert-curated multiple-choice questions." A gap of 0.10 percentage points on 1,042 items is:
One question. Now put an error bar on it. For a binomial proportion at p ≈ 0.69 with n = 1,042, the standard error is
The claimed lead is 0.10 points against a one-sigma sampling error of 1.43 points — roughly one fourteenth of a standard error. These two systems are, on this benchmark, indistinguishable.
Apply the discipline to Chapter 2's headline as well. The +3.40 average on Biology-Instructions came from 21 tasks, so the per-task deltas are the sample. Fourteen positive, seven negative. The positive deltas average +6.24 and the negative ones −2.22. The largest single move, +16.01 on promoter–enhancer interaction, contributes 16.01 / 21 = 0.76 points of the 3.40 — 22% of the whole gain from one task out of twenty-one.
Drop the top three gains (+16.01, +10.57, +10.13 = 36.71) and the average gain falls from 3.40 to (71.56 − 36.71)/21 = 34.85/21 = +1.66. Still positive, still real, half the headline. The honest sentence is: the memory produces large gains on a handful of nucleotide-sequence tasks, small gains on many, and small regressions on a third of the benchmark.
This chapter has been an exercise in one skill, and it generalises. Six questions, in the order they are worth asking:
| # | Question | What it caught here |
|---|---|---|
| 1 | Is the comparison set "all models" or a subset? Which subset does each claim use? | Almost every general-benchmark lead is "among open models," with Gemini-3.1-Pro ahead |
| 2 | Is there a coverage or attempt-rate number next to the quality number? | Table 5's success rates invert three apparent losses |
| 3 | Divide each margin by its sampling error. Which "wins" survive? | MicroVQA and MMMU-Pro are ties |
| 4 | Which rows are missing, or marked with a dash? | DeepSeek-V4-pro and GLM-5.2 have no multimodal numbers at all |
| 5 | Is the aggregate carried by a few components? | Three of 21 tasks supply half the Memory Decoder gain |
| 6 | What is reported as a figure rather than a table? | The no-regression claim, the length-regularisation ablation, and the agentic reward curves — all shapes |
Run those six over any report, including the ones you write, and most of what a results section can hide stops being hidden.
Intern-S2-Preview is a system report, and the right way to hold a system report in memory is not as one idea but as a set of independently reusable mechanisms plus a claim that they compose. Here is that set, each pointing at where you can go deeper.
| Mechanism in this paper | The idea underneath | Go deeper |
|---|---|---|
| Sparse MoE backbone, R3 routing replay | Conditional computation with a discrete router — and every problem that a discrete choice creates | Mixture of experts · CS336 MoE · DeepSeek-V3 |
| Memory Decoder fusion, pfinal = (1−λ)pS2 + λpmem | Combining a parametric memory with a frozen base at the output | RAG · Vector embeddings · Knowledge distillation |
| Q-Former compression in the time-series encoder | Learned fixed-size pooling by cross-attending learnable queries | InternVL · Vision-language models |
| Numerical forecasting branch, horizon predictor | Emitting numbers as numbers, and why text tokenisers are bad at real values | Time-series forecasting |
| Contrastive next-latent prediction (Visual Pre-training) | Identify rather than reconstruct — avoiding the conditional-mean collapse of L2 | Contrastive learning · CLAP |
| Importance ratio ρ, clipping, staleness bound | Learning from data your current policy did not generate | Importance sampling · Policy gradients · RL policy gradients |
| Leave-one-out advantage, dynamic sampling, GEPO | Group-relative RL without a value model | DAPO · DeepSeek-R1 · DeepSeekMath (GRPO) |
| Speculative decoding with an online draft model | Lossless acceleration by rejection sampling, and what changes when the target moves | Speculative decoding |
| Muon optimizer | Matrix-aware updates instead of coordinate-wise adaptivity | The Polar Express (Muon) · LLM optimizers · Optimizers |
| Harness × task, TITO, PrefixTree trace store | Turning a real agent runtime into RL experience | Code as agent harness · The agent loop · Agent architectures |
| Skill-state graph task synthesis | Generating solvable-by-construction tasks by typed composition | Agent skills · Tools and sandboxing |
| Verifier integrity, all-correct semantics | Reward hacking, and closing the channel rather than punishing the behaviour | Reward alignment · Agent evaluation · Agent evaluation survey |
| On-policy distillation with sampled-token transfer | Reverse-KL supervision on student-visited states, and why the payload can be O(H) | On-policy distillation survey · On-policy distillation · Distillation scaling laws |
| The overall model family | Frontier open-weight systems built the same way | Kimi K2 · InternVL · Qwen2.5-Omni |
None of this appeared from nowhere. The paper's own citation trail sketches a fairly clean lineage, and knowing it tells you what to read next.
| Thread | The steps | What this paper adds |
|---|---|---|
| The Intern line | InternVL and InternImage (perception) → Intern-S1 and Intern-S1-Pro (scientific multimodal, 1T) → Intern-S2-Preview-397B | Agentic training; a forecasting branch; a memory path; half the parameters |
| Group-relative RL | PPO → GRPO (DeepSeekMath) → DAPO's dynamic sampling → leave-one-out REINFORCE → GEPO | Entropy-regime rebalancing so heterogeneous task mixtures stay comparable |
| RL systems at scale | Synchronous rollout → co-located partial rollout → full disaggregation → co-located partial rollout with per-token off-policy correction, R3, and BKL masking | An MoE-aware consistency story between two execution engines |
| Agent training | Agent-FLAN (agent tuning data) → Lagent (framework) → T-Eval and CIBench (stepwise evaluation) → MindSearch (long-horizon search) → SciExplore → harness × task | Training inside unmodified third-party runtimes, with a lossless action-to-token mapping |
| Memory-augmented LMs | kNN-LM style retrieval → Memory Decoder (NeurIPS 2025) → Intern-MemDec-4B on a frozen 397B | A demonstration at frontier scale, with a 21-task audit including its regressions |
| Distillation | Hard-label distillation → soft-logit distillation → on-policy distillation → multi-teacher → two broad experts, sampled-token transfer | An O(H) payload, licensed by shared SFT ancestry |
The most useful thing to carry away from a system report is a set of borrowable decisions. Sorted by what you might be building:
| If you are building… | Take this | Because |
|---|---|---|
| An RL trainer for a large model | Partial rollout with a per-token behaviour version, a hard staleness cap, and a detached clipped weight | The long tail of generation lengths will otherwise idle your cluster, and PPO clipping will delete exactly the tokens you paid to keep |
| Anything with two execution engines | R3-style replay of discrete decisions, plus a per-sample consistency mask | Discrete choices do not degrade gracefully across implementations — they flip |
| A multi-task RL mixture | Group-level entropy as a diagnostic before you touch anything else | It costs nothing — you already have the log-probabilities — and it tells you whether your advantage scales are even comparable |
| Any reweighting of advantages | The normaliser from Equation (15) | Any reweighting silently changes the balance between reward and punishment unless you restore the mass |
| An agent RL loop | Separate the harness from the task; store the session as a prefix tree; keep semantic and token views apart | H + T units of work instead of H·T, and a lossless path from an action to its tokens |
| Any executable-reward environment | The whole leakage table — sanitise history, withhold graders, overlay canonical tests after the agent stops, and track infrastructure failures separately | Reward hacking is the default outcome, not a rare adversarial event |
| A domain specialisation of a good general model | Output-level fusion with a per-token router, before you consider fine-tuning | λ = 0 is a hard floor: the worst case is "no change" |
| A document ingestion pipeline | Visual gain as a filter, and reading-order reassembly instead of caption pairing | Counterfactual utility is a definition of quality you can actually compute |
| Anything that outputs numbers | A numerical head with an explicit horizon predictor | Table 5's success-rate column is what happens when you do not |
| A distillation stage | Shared ancestry, a teacher-trajectory warmup, and sampled-token transfer | Each one licenses the next; the O(H) payload is not independently available |
The paper's conclusion volunteers most of these, which is worth acknowledging: "Intern-S2-Preview remains a preview system; future work should improve reliability over longer scientific workflows, expand domain-specific memories and task environments, strengthen verifiers, and deepen integration with specialized scientific tools."
| Limit | Evidence in the paper | Which chapter it comes from |
|---|---|---|
| Memory specialisation is not uniform | 7 of 21 Biology-Instructions tasks regressed, four of them protein property-prediction tasks | Ch 2 — one memory has one centre of mass |
| The no-regression claim is a shape, not a table | Cross-domain behaviour is reported as a radar plot; no per-benchmark deltas are printed | Ch 2 |
| Strict instruction following is weak | AdvancedIF 74.44, sixth of eight, and fourth of the five open models | Ch 9 |
| General agentic coding and terminal work lags the leaders | TerminalBench 67.42 vs 84.60; WildClawBench 44.68 vs 64.72; SciCode 49.11 vs 56.21 | Ch 9 |
| De novo design is near the floor for everyone | ProteinBinder-9 best-in-class score is 4.36 | Ch 9 |
| Several hyperparameters are unpublished | α, γ, τ for length regularisation; GEPO's coefficients and thresholds; β and αs for Memory Decoder; εIS and φ; the vocabulary size; layer counts and expert counts | Ch 2, 4, 5, 8 — reproduction from this report alone is not possible |
| Reward curves are not comparable across harnesses | The paper says so itself, explicitly | Ch 7 |
| "Preview" | The name | — |
A compression of the whole lesson: each design decision paired with the single reason it exists. If you can reconstruct the right-hand column from the left, you have the paper.
| Decision | The reason, in one sentence |
|---|---|
| Channel-wise Transformer instead of mean pooling | A mean over the channel axis is permutation-invariant, so it cannot represent propagation direction — three physically distinct states pool to one vector |
| Adaptive patch length | A constant output token budget with an input-proportional receptive field is the only kind of encoder you can drop into a fixed context window without per-domain configuration |
| A numerical forecasting branch | A text decoder quantises real values through its digit vocabulary and has no notion that 0.037 and 0.038 are adjacent |
| Convex combination of probabilities, not logits | Logit mixing is a geometric mean, which is multiplicative — a small specialist could never override a confident generalist |
| A frozen visual encoder in Visual Pre-training | If the target could move, the cheapest way to reduce a contrastive loss is for the encoder to collapse every patch onto one vector |
| Contrastive next-latent, not L2 regression | Squared error on a continuous target is minimised by the conditional mean, which for document imagery is a grey smudge |
| Visual gain as a filter | When you cannot define quality directly, define it as the loss reduction it causes on a task you can measure |
| Pause instead of abort | A rollout 40,000 tokens deep represents 40,000 forward passes, and discarding it burns all of them |
| A detached clipped weight, not PPO clipping | PPO's min/clip zeroes the gradient for tokens outside the trust region, and pause-and-resume manufactures exactly those tokens by design |
| Rollout Routing Replay | A discrete top-k over experts has no tolerance: a 10−6 logit difference makes the two engines compute different functions |
| A bidirectional KL mask | Each single direction of KL is blind in a different place, so the conjunction of two one-sided tests is the symmetric admission rule |
| Leave-one-out baseline | Including a sample in its own baseline correlates the two and biases the estimator |
| GEPO's entropy branches | Advantages of equal magnitude from different entropy regimes cause updates of very different sizes, so they are not comparable |
| The length normaliser | Without it, reweighting silently changes the reward-to-punishment balance per query, depending on how spread out that query's lengths happened to be |
| Length regularisation only on positives, only above a pass-rate threshold | An incorrect response may fail for many reasons, and a hard query still needs exploration |
| Online draft training | The target policy moves every step, so a fixed draft model's acceptance rate decays throughout training |
| The LK loss with an acceptance-dependent mixture | Total variation is the acceptance rate but optimises badly when far away; forward KL has smooth gradients but is a proxy |
| Harness × task | H + T units of integration work instead of H·T, and a new harness becomes one thin adapter |
| Token-in–token-out | Re-tokenising a rendered string is not guaranteed to reproduce the sampled token sequence, and one merged token corrupts the gradient |
| The PrefixTree | Store each context delta once, carry the loss mask with it, and preserve the map from an agent action to its exact token span |
| Loss-masking tool observations | Otherwise you are doing maximum likelihood on your environment's output format, teaching the model to hallucinate plausible tracebacks |
| Marking bad steps skip, not deleting them | Delete the error and the recovery that followed becomes an unmotivated non-sequitur |
| Process weights on positives only | Softening the penalty on well-formed steps inside failures rewards format over correctness, and format is far easier to optimise |
| Overlaying canonical tests after the agent stops | It converts "prevent the agent from touching the tests" into "it does not matter what it touched" |
| All-correct semantics | A gradient that rewards 414 of 415 tests teaches a systematic tolerance for collateral damage |
| Two experts, not twenty | Each teacher is a full RL run at 397B, and teachers start overlapping after the first few domains |
| Reverse KL on student states | Mode-seeking is what you want from a policy you will sample once, in production, on a real task |
| Sampled-token-only teacher transfer | Shared SFT ancestry plus warmup makes surprising tokens rare, and 0.5 MB per trajectory instead of 34 MB is the difference between running and not |
| A frozen proximal student in the advantage | Otherwise the target drifts across the eight mini-batch steps of the same batch |
The most useful thing a reader can extract from a system report is the list of experiments nobody has run yet. Each of these is answerable and none of them is answered here.
| Question | Why it matters | What would settle it |
|---|---|---|
| How do the two experts score before distillation? | It is the only way to know what consolidation cost. The paper reports the unified model and no expert baselines | Two extra columns in Table 3 |
| Do multiple memories compose? | The architecture's headline promise is plug-and-play modularity, demonstrated with exactly one memory | Attach a chemistry memory and a biology memory at once and re-run both benchmarks |
| What does the router actually learn? | The regressions in §5.3 look like router error, not memory error — but λt is never plotted | A histogram of λt by task, split by whether that task gained or lost |
| How much of the agentic score is harness-specific? | Trained inside real harnesses, evaluated inside real harnesses. Some skill is scaffold knowledge | Evaluate on a harness the model never trained inside |
| Does the BKL mask ever bite hard? | φ and the masked-token fraction are both unpublished. If the mask silently drops 5% of tokens, that is a different algorithm | Report the masked fraction over training |
| What does adaptive length regularisation cost on hard queries? | Figure 8's ablation is at 35B on aggregate reward. The mechanism is explicitly gated on pass rate, so its risk lives in the tail | Split the ablation by query difficulty |
| Term | One line | First appeared |
|---|---|---|
| Agentic foundation model | A model trained inside a loop with an environment, tools, and an executable verifier — not merely queried | Ch 0 |
| Verifiable reward | A reward produced by running a program, not by a learned preference model | Ch 0 |
| Q-Former | A small Transformer with a fixed set of learnable queries that cross-attend into a variable-length input, giving content-aware pooling to a constant token count | Ch 1 |
| Horizon predictor | The module that reads a forecasting instruction in English and outputs how many values to emit — a numerical head has no stop token | Ch 1 |
| Memory Decoder | A separately trained model whose next-token distribution is fused with a frozen backbone's, weighted per token by a router | Ch 2 |
| Retrieval distribution | A distance-weighted vote over the next tokens stored by a prefix's nearest neighbours in a token-level datastore | Ch 2 |
| Perplexity | The exponential of the average per-token cross-entropy: PPL = eH, so H = ln(PPL) | Ch 3 |
| Visual gain | PPL(text only) − PPL(interleaved) — a counterfactual measure of whether an image helps predict the page's text | Ch 3 |
| Partial rollout | Pausing in-flight generations at the batch boundary and resuming them after the update, instead of aborting or waiting | Ch 4 |
| Importance sampling | Reweighting a sample by how much more likely it is under the target policy than under the one that produced it | Ch 4 |
| Rollout Routing Replay (R3) | Recording the rollout engine's expert selections and replaying them during training, so both engines compute the same function | Ch 4 |
| Bidirectional binary KL | KL on the two-outcome question "was it this token or anything else?", required to pass a threshold in both directions | Ch 4 |
| Speculative decoding | A cheap draft model proposes K tokens; the policy verifies them in one pass by exact rejection sampling, so the output distribution is unchanged | Ch 4 |
| Draft model | The small proposer. Here it is trained online, because the policy it is chasing keeps moving | Ch 4 |
| Advantage | The coefficient that multiplies log π in a policy gradient — a reward with a baseline subtracted | Ch 5 |
| Leave-one-out baseline | The mean of the other rewards in the group, excluded from its own sample so it stays uncorrelated | Ch 5 |
| Group-level entropy | Total sequence surprisal averaged over a group's responses — the diagnostic GEPO uses to decide which branch fires | Ch 5 |
| Dynamic sampling | Discarding and resampling any group whose rewards are all identical, since every advantage in it is zero | Ch 5 |
| Harness | How an agent is instantiated, driven, and observed — the control loop, prompts, tool protocol, stop rule | Ch 6 |
| Task | The initial environment, the executable objective, and the verifier-defined outcome | Ch 6 |
| Token-in–token-out (TITO) | Serving that reuses the recorded tokenised prefix and captures exact output token IDs, so a black-box harness's session is still differentiable | Ch 6 |
| PrefixTree | A per-session trie of context deltas with longest-prefix matching — storage sharing, loss masks, and action-to-token-span mapping in one structure | Ch 6 |
| Process weight | A per-message coefficient in [−1, 1] that can withhold or reverse positive credit, and never softens a punishment | Ch 7 |
| All-correct semantics | Binary scoring requiring both fail-to-pass and pass-to-pass checks — 414 of 415 tests scores zero | Ch 7 |
| On-policy distillation | The student generates the trajectory; the teacher scores the student's own states. Reverse KL, so mode-seeking | Ch 8 |
| Proximal student | The frozen snapshot the distillation advantage is measured against, so the target does not move across mini-batch steps | Ch 8 |
| Eq | Statement | What it is for |
|---|---|---|
| (1) | pret(y|ct) ∝ ∑N(kt) 1[y=vj] exp(−d/τ) | The retrieval teacher for the memory |
| (2) | Lmem = βLKL + (1−β)LCE | Compress retrieval into parameters, anchored to gold |
| (3) | pfinal = (1−λt)pS2 + λtpmem | Token-level fusion with a frozen backbone |
| (4) | Lrouter = LCE + αs st λt | Train λ with a signed, corpus-keyed prior |
| (5)–(6) | U = RasterScan{zi | mi=1}; ût+1 = ψ([Φθ(Winu≤t)]t) | Page → foreground patch sequence → next-latent prediction |
| (7)–(8) | stj = cosine/τ; LVP = −(1/|B|)∑log ptt | Contrastive scoring — identify, do not reconstruct |
| (9) | L = λtextLCE + λvisLVP | Text and visual objectives interleaved |
| (10)–(11) | ρ = πθ/πbeh; ρ̄ = clip(ρ, 1−εlow, 1+εhigh) | Correct pause-and-resume staleness with bounded variance |
| (12)–(13) | DBKL(p‖q) = p log(p/q) + (1−p)log((1−p)/(1−q)); mask if both directions ≤ φ | Delete tokens where the two engines disagree |
| (14)–(17) | Pq = {Âi>0}; Ãi = (∑Â/∑wÂ)wiÂi; wi = α+(1−α)(1−normalised length)γ | Prefer short correct answers, mass-preserving, positives only |
| (18)–(24) | αt,k = ∑min(p,q) = 1−DTV; LLK = λkDKL + (1−λk)DTV; λk = e−ηᾱ | Train a draft model online, targeting acceptance directly |
| (25)–(26) | Hg(x) = −(1/K)∑i∑t log π; branch-wise attenuation | GEPO — make advantages comparable across entropy regimes |
| (27)–(28) | ALOO = Ri − mean(others); Ã = Rlen(RGEPO(ALOO)) | The baseline, and the composition order |
| (29) | LRL = −E[(1/G)∑(1/|y|)∑ m · sg[ρ̄] · Ã · log πθ] | The unified reasoning-RL objective |
| (30) | Ãi,k,t = wi,kAi if Ai>0, else Ai | Process weights withhold credit, never soften punishment |
| (31)–(32) | Maximise E[log πT − log πθ] ≡ minimise DKL(πθ ‖ πT) on student states | On-policy distillation, reverse KL, mode-seeking |
| (33)–(36) | ÂOPD = sg[log πT − log πprox]; same clipped-REINFORCE form | Distillation reusing the whole RL stack |
| Number | What it is |
|---|---|
| 397B | The main model's parameter count — against Intern-S1-Pro's 1T, "less than half" |
| 56.92 → 60.32 | Biology-Instructions average, frozen backbone → with Intern-MemDec-4B. 14 tasks up, 7 down |
| 240,000 → 300,000 | Maximum time-series input length, with 5–6× faster inference at 20% of the memory |
| 256k / 512 | Pre-training chunk size and overlap; also the maximum sequence length in distillation |
| 3 | Policy updates of staleness after which a partial rollout is discarded |
| 65,536 | Maximum generation length in reasoning RL — the source of the straggler problem |
| 8,192 / 8 | Completed responses per rollout batch, and mini-batch update steps per batch |
| K = 4, η = 3 | Draft positions and the LK mixing exponent for speculative decoding |
| 2× / 1.7× | Speculative-decoding speedup on rollout generation and end to end — implying rollout was about 82% of wall clock |
| 214,854 / 62,280 | Executable coding and terminal tasks, and the environments they live in. 43.5% of tasks sit in 9 environments |
| 160 | Optimization steps shown in the agentic reward trajectories of Figure 11 |
| O(HV) → O(H) | Distillation payload reduction — about 0.5 MB instead of 34 MB per 256K trajectory versus top-64 |
| 99% | Horizon-predictor accuracy — the reason every forecasting success rate is 100 |
| 0.785 | Zero-shot MASE on GIFT-Eval |
| 7 of 9 | SciTS understanding tasks where the 397B model beat the 1T predecessor |
If you remember nothing else, remember these. Each is a claim you can now defend from first principles.
| # | The sentence | Where it was earned |
|---|---|---|
| 1 | An agentic model is one whose training signal came from an execution, not from a preference. That single change makes the reward a program, and therefore an attack surface | Ch 0, Ch 7 |
| 2 | Modelling numbers as numbers beats describing them. Every general model scores 0.0–1.5 F1 on SciTS BIU01; the two models with a time-series encoder score 20.8 and 36.5. A picture of the data is not the data | Ch 1, Ch 9 |
| 3 | Reweighting advantages without restoring the mass is a bug. The normaliser in Equation (15) is what turns a length preference into a reallocation rather than a silent, per-query change to the reward/punishment balance | Ch 5 |
| 4 | A quality metric without a coverage number is a conditional average over a self-selected subset. MAPE 56.1 at 4.5% success is worse than MAPE 60.2 at 100% | Ch 9 |
| 5 | Efficiency tricks are load-bearing on assumptions made stages earlier. The O(H) distillation payload is only sufficient because both teachers share an SFT ancestor with the student | Ch 8 |
Almost none of this needs 397 billion parameters to understand. Every mechanism has a toy version.
| Mechanism | Toy version you can build today | The thing you will learn |
|---|---|---|
| Memory fusion | Two small language models, one general and one fine-tuned on a niche corpus. Fuse their next-token distributions with a hand-set λ and sweep it | How little memory weight is needed to break a tie, and how quickly a high λ wrecks general text |
| LOO advantage | A NumPy function over a reward vector. Check it sums to zero | How the baseline automatically makes the rare outcome the informative one |
| Length regularisation | Implement Equations (15)–(17) and assert that the positive mass is preserved | Why the normaliser is not optional — remove it and watch the positive/negative balance drift per query |
| Bidirectional binary KL | Twenty lines. Plot DBKL(p‖q) and DBKL(q‖p) over a grid of (p,q) | Where each direction is blind, and why the conjunction is the right admission rule |
| Speculative acceptance | Two small models. Measure ∑min(p,q) empirically and compare it with your observed acceptance rate | That Equation (21) is an identity, not an approximation |
| PrefixTree trace store | A trie over token-ID lists with longest-prefix insertion. Store ten rollouts of one prompt | How much storage prefix sharing saves, and how the loss mask rides along with the tree |
| Verifier integrity | Give a coding agent a repo with the tests writable, and watch what it does | That reward hacking is not a rare adversarial event. It is the default |
Stand back from the tables. The claim a report like this can actually support is narrower than "we built a better model," and it is more interesting.
It is evidence that a scientific specialist need not be a narrow one. The model that scores 56.92 on multi-omics sequence analysis — against a field between 4.49 and 13.87 — also scores 89.75 on MMLU-Pro and 61.56 on SWE-Bench Pro. Ten years of intuition said those trade against each other. The staged pipeline of Chapter 8 is the mechanism by which they did not, and the two-expert distillation is the specific step that made it affordable.
It is also evidence that the interesting frontier has moved from the model to the loop around it. Two of this paper's four architecture pages are about input and output paths for signals. Twenty of its thirty content pages are about rollout scheduling, numerical consistency between engines, credit assignment across a session tree, and stopping an optimiser from cheating a test harness. If you had told a researcher in 2020 that a frontier model report would spend two thirds of its length on those subjects, they would have thought you were describing a different field. They would have been right, and the field is this one now.
If this paper interested you, there is a natural reading order that builds the background it assumes rather than the background it cites.
| Order | Read | Why here |
|---|---|---|
| 1 | Policy gradients, then importance sampling | Chapters 4 and 5 are unreadable without both, and readable to the last symbol with them |
| 2 | DeepSeekMath for GRPO, then DAPO | The group-relative family this paper's Equation (27) belongs to, and the dynamic-sampling rule it adopts verbatim |
| 3 | DeepSeek-R1 | The long-chain-of-thought RL regime whose overthinking problem Chapter 5's length regulariser exists to fix |
| 4 | Mixture of experts | Everything R3 does only makes sense once you have seen a top-k router |
| 5 | Speculative decoding | Chapter 4's Equation (21) is an identity you should meet in its original setting first |
| 6 | Agent architectures, then the agent loop | Chapter 6 is about turning these into RL environments; know what they are first |
| 7 | On-policy distillation, then the survey | Chapter 8's reverse-KL argument in its own habitat |
| 8 | InternVL | The perception lineage this model's Lane 2 descends from, from the same lab |
| 9 | Time-series forecasting | So Table 5's specialised baselines — Moirai, TimeMoE, Chronos, UniTS — stop being names |
| 10 | Reward alignment | Chapter 7 read from the other direction: what happens when the reward channel is not sealed |
Without scrolling up: (1) explain why pause-and-resume forces the behaviour policy to be indexed by both trajectory and token position, and write the resulting importance ratio; (2) state what PPO-style clipping does to a token with ρ = 8 that the paper's detached clipped weight does not; (3) compute the leave-one-out advantages for a group of 8 with 5 correct, and check they sum to zero; (4) explain what the leading fraction in Equation (15) preserves and why removing it would be a bug rather than a simplification; (5) explain why process weights apply only to positive advantages; (6) explain, using ENG02, why a MAPE of 56.1 can be worse than a MAPE of 60.2. If any of the six stalls, its chapter is one tap away.