Manuscript Offprint
arXiv:2610.25359CD-OPD: Contextual Digest for On-Policy Distillation
ABSTRACT
Teacher takeover in on-policy distillation (OPD) can produce incorrect responses even when the student and teacher independently answer the same problem correctly, a failure we quantify using Collaboration Failure Rate (CFR). To address it, we propose Contextual Digest for On-Policy Distillation (CD-OPD). CD-OPD structures the earlier context of teacher guidance through a teacher-generated dependency graph, curating the required problem conditions and preceding reasoning as node summaries alongside the unchanged guidance in a Contextual Digest before student continuation. We further develop online meta-reweighting, which compares Digest segment gradients with a task gradient from independent student responses to improve student-only performance, favoring updates predicted to reduce task loss. Across eight benchmarks, CD-OPD improves average accuracy by 1.32–7.05 percentage points over representative existing OPD methods. It also reduces CFR by 27.4%–56.4% relative to existing takeover-based OPD methods.
1 Introduction
Knowledge distillation (KD) trains a smaller student model with supervision from a larger teacher model to reduce inference costs (Hinton et al., 2015). For language generation and reasoning, teacher-generated responses and rationales can serve as training targets (Kim and Rush, 2016; Hsieh et al., 2023). To reduce the distribution mismatch between teacher-generated training responses and student-generated

(a) Accuracy comparison
(b) CFR comparison
Figure 1: Accuracy and CFR under teacher takeover (1,024 mathematical problems randomly sampled from our local copy of DAPO-Math-17k-dedup; student: Qwen3-1.7B; teacher: Qwen3-4B-Instruct-2507; accuracy reported as mean@4).
responses at inference time, on-policy distillation (OPD) trains on responses sampled from the current student policy. At each token position, the teacher takes the problem and preceding student-generated tokens as input and provides its next-token probability distribution as supervision (Song and Zheng, 2026; Yu et al., 2026; Zhao et al., 2026).
However, such a teacher evaluates the sampled response without revising it, so its supervision can remain conditioned on prefixes containing earlier reasoning errors (Li et al., 2026; Fu et al., 2026; Zhang et al., 2026). To provide corrections during generation, teacher takeover allows the teacher to generate a continuation from a student-generated prefix before the student resumes; the combined response is used for distillation (Koo et al., 2025; Xu et al., 2026). A key design choice in teacher takeover is when to intervene. We consider two representative strategies. Fixed-prefix takeover begins at a predetermined student-prefix length (Li et al., 2026). Reflection-triggered takeover instead compares the teacher's and student's next-token predictions at the same prefix. The teacher takes over when its most probable next token is a reflection token (e.g., Wait), while the student's top-K predictions contain no reflection tokens (Xu et al., 2026). Both strategies determine when
A PREPRINT

Figure 2: Comparison of independent student and teacher responses, takeover-based OPD, and CD-OPD.
the teacher intervenes, but the final response also depends on how the student continues after teacher guidance; if the student misapplies the guidance, the intervention may be ineffective or even misleading. We observe incorrect takeover responses even when the student and teacher independently answer the same problem correctly. Overall accuracy gains may obscure these failures.
To uncover this failure mode, we define Collaboration Failure Rate (CFR) as the proportion of incorrect takeover responses among cases where the corresponding student-only and teacher-only responses are both correct. Figure 1 compares accuracy and CFR for fixed-prefix takeover (Vanilla Takeover-based OPD) and reflection-triggered takeover (Relay-OPD), with the takeover length L ranging from one to six teacher-generated segments. Across these lengths, Relay-OPD achieves higher accuracy and lower CFR than Vanilla Takeover-based OPD, yet its CFR of 17.5%–23.2% corresponds to roughly one counterproductive takeover response in every five cases with correct student-only and teacher-only responses. Increasing the takeover length does not consistently reduce CFR: from L = 5 to L = 6, Relay-OPD's reported accuracy remains at 41.8%, while CFR rises from 17.5% to 20.4%. These findings motivate assessing collaboration failures separately from overall accuracy and examining how the student effectively uses teacher guidance during continuation. Figure 2 illustrates a collaboration failure of the kind measured by CFR. The problem asks for the original number x. Both the student-only and teacher-only responses correctly obtain x = 3 (Figure 2(a)). Under takeover-based OPD, the student prefix defines and expresses the given condition as . The teacher factors the equation as and correctly obtains u = 5 (Figure 2(b)). The student then mistakenly reports x = 5, treating the value of u as the original number. This example shows a failure to use existing context despite correct teacher guidance: the student does not apply the definition , already recorded in its prefix, to recover x from the teacher's result.
To address this failure mode, we propose Contextual Digest for On-Policy Distillation (CD-OPD). A teacher-generated dependency graph selects problem conditions and preceding reasoning for summarization under the current guidance in a Contextual Digest. The Digest incorporates the teacher's corrections and is inserted after the guidance, before the student resumes (Figure 2(c)). A Digest segment that aids continuation need not improve independent reasoning when emphasized during training. We therefore develop online meta-reweighting to favor Digest-segment OPD updates predicted to reduce student-only task loss. During training, we determine segment weights by comparing segment gradients from takeover-based responses with a task gradient from separate student-only training responses.
Our contributions are twofold.
• We introduce CFR to measure the rate of incorrect takeover responses among cases where both the student-only and teacher-only responses are correct. Our analysis reveals collaboration failures that persist despite the overall accuracy gains of teacher takeover.
• We propose CD-OPD, which uses a teacher-generated dependency graph to condense the existing context and current teacher guidance into a Contextual Digest before student continuation, helping the student apply the guidance using relevant earlier context. Online meta-reweighting uses the task gradient and segment gradients to weight each Digest segment’s OPD loss, favoring
A PREPRINT
updates expected to improve student-only performance.
Our code is publicly available at https://anonymous.40pen.science/r/CD-OPD-291D/.
Takeover-based OPD. Teacher intervention modifies student-generated responses through revision or corrective continuation. TRD (Jiang et al., 2026) asks the teacher to revise student-generated responses and trains the student on the revised responses through distillation. At the token level, Speculative Knowledge Distillation (Xu et al., 2025) replaces student-proposed tokens outside the teacher's top-K predictions with tokens sampled from the teacher. SWITCH (Koo et al., 2025) determines whether the teacher or student generates each token according to the Jensen–Shannon divergence between their next-token distributions. MOTAB (Wang et al., 2026) generates a teacher continuation after backtracking to an earlier student prefix, then appends it to the interruption point for fine-tuning. Relay-OPD (Xu et al., 2026) instead triggers teacher takeovers at the current prefix based on teacher–student disagreement over reflection tokens; the student resumes generation after the teacher provides guidance. Existing takeover methods primarily control teacher intervention but leave the dependencies between teacher guidance and earlier context implicit, so correct guidance may still be misapplied. Our proposed CD-OPD explicitly uses a teacher-generated dependency graph to identify the required problem conditions and preceding reasoning, which are summarized under the current guidance as an enrichment, helping the student apply the guidance using the relevant earlier context during continuation.
3 Method
3.1 Preliminaries
On-Policy Distillation. Let denote the student policy and the frozen teacher policy, with a shared token vocabulary . Given a training problem , OPD samples an -token response from . For , the prefix contains the problem and preceding student-generated tokens. For , the student and teacher next-token probabilities conditioned on the same prefix are
At each fixed prefix , we use the reverse Kullback–Leibler (KL) divergence (Kullback and Leibler, 1951; Gu et al., 2026):
We minimize this divergence averaged over response-token positions. For a student-sampled token , the token-level OPD advantage is
We update only by policy-gradient ascent, weighting by . The sampled prefixes and advantages are treated as constants during the update. Problem and padding tokens are excluded from the loss. The next iteration samples responses from the updated student policy .
Teacher Takeover. During response generation, the teacher may take over at selected prefixes (Koo et al., 2025; Wang et al., 2026). Let denote the resulting response, and let denote its prefix at position .
Following Relay-OPD (Xu et al., 2026), we determine takeover positions during student generation using a predefined reflection-token set (e.g., token variants of Wait, But, and However). Given , let denote the teacher's most probable next token and the set of the student's most probable next tokens:
(4)
Here, returns the set of K tokens with the highest probabilities. The takeover criterion is
where denotes the indicator function. We allow at most takeovers per response and teacher-generated segments per takeover. Each teacher-generated segment is a paragraph delimited by a blank line. When and fewer than takeovers have occurred, the teacher generates the current guidance , beginning with . Otherwise,
A PREPRINT
(a) Trajectory Construction with Contextual Digest

(b) Policy Update with Online Meta-Reweighting

Figure 3: Overview of CD-OPD: (a) Trajectory Construction with Contextual Digest (Section 3.3); (b) Policy Update with Online Meta-Reweighting (Section 3.4).
the next token is sampled from . After each takeover, the student resumes from the extended prefix if the response is unfinished. The completed response z is used for token-level distillation, with both policies evaluated at each prefix .
3.2 Overview
As shown in Figure 3, CD-OPD operates at two stages of takeover-based OPD: trajectory construction and policy update. After each takeover, the teacher constructs a dependency graph from the context comprising the problem, the response prefix before takeover, and the current teacher guidance. The graph identifies the problem conditions and preceding reasoning needed to apply the guidance in answering the problem. The teacher summarizes this selected information under the current guidance, producing node summaries that are combined with the unchanged guidance in a Contextual Digest. The Digest is appended after the guidance for student continuation (Figure 3(a)). During policy updates, online meta-reweighting uses a task gradient from student-only responses and segment gradients to determine each Digest segment's OPD loss weight, favoring updates expected to improve student-only performance (Figure 3(b)).
3.3 Trajectory Construction with Contextual Digest
At takeover position t, the current teacher guidance T may depend on problem conditions in x and preceding reasoning in without restating them. CD-OPD appends a Contextual Digest D after T to help the student apply the guidance using this earlier information.
The teacher constructs a directed dependency graph from the context . Each node represents one condition, variable definition, intermediate result, or reasoning step explicitly stated in the inputs. Its source spans are the text spans in , , or that express its content. Source spans share a node only when their content, variable meanings, units, or conditions overlap. The teacher adds an edge to when it identifies information in needed to interpret or apply the content of in answering the problem. If explicitly corrects a statement in , the graph uses the correction in place of that statement and cites its source span in ; remains unchanged.
The nodes associated with at least one source span in T form . Starting from , we recursively follow incoming edges to select
where contains all nodes with a directed path to a node in . We topologically sort the nodes in according to their dependencies in . Let . For each node in , the teacher summarizes its source spans under the current guidance . The resulting node summaries form the Digest segments in this order. We copy unchanged as the final Digest segment, . The resulting Contextual Digest is
where denotes text concatenation. If , then . If the response is unfinished, the student resumes generation conditioned on . The resulting response, including the inserted Digest tokens, is still denoted by .
3.4 Policy Update with Online Meta-Reweighting
A Digest segment may help the current continuation, but increasing its OPD loss weight need not improve student-only performance. We therefore compare each segment's
A PREPRINT
OPD gradient with a task gradient from student-only responses, assigning larger weights to updates predicted to reduce student-only task loss.
Trajectory Construction. At the start of each training iteration, we set and keep fixed throughout the iteration. All student generation uses , both in responses with Contextual Digest and in separate student-only responses. For task feedback, we sample distinct training problems and generate responses per problem, without teacher takeover or Contextual Digest.
Online Meta-Reweighting. Let indicate whether the final answer in is correct. To obtain a task gradient that favors correct responses over incorrect alternatives to the same problem, we define the task advantage as
Let denote the number of tokens in . We define the task loss and its gradient using the length-normalized log-probability assigned by to each sampled response, weighted by :
(9)
The conditional log-probability of a response under is obtained by summing the token log-probabilities given the problem and preceding response tokens. By favoring higher-scoring responses to each problem, provides the reference gradient for evaluating segment-level OPD updates.
For each token in a completed response , we compute the fixed advantage using the log-probability difference in Eq. (3), with and conditioned on . We use the following token-level OPD surrogate loss for all response tokens, including teacher guidance and Digest tokens:
Let be the set of response-token positions in the OPD training batch, excluding problem and padding positions. Let be the index set of all Digest segments in this batch, including the copied guidance segments. For , is the set of positions occupied by , and is its token count. The segment gradient is computed from the mean OPD loss over the tokens in :
Here, is the loss in Eq. (10) for the token at batch position , evaluated at its own response prefix. Both and are taken with respect to all trainable student parameters.
Under a first-order approximation, a positive inner product predicts a decrease in after a small step along . We use the nonnegative part of this inner product as the segment score (Ren et al., 2018):
The score depends on both the direction and norm of . When at least one segment score is positive, we normalize the scores to obtain segment weights (meta-weights) , keeping the mean weight over all Digest-token positions equal to one:
If all segment scores are zero, we set for every .
Policy Update. For , we set when and otherwise. Weights above one strengthen a segment's OPD contribution, whereas weights below one weaken it. The final objective is
These segment weights emphasize Digest segments whose OPD updates are predicted to reduce more. With the sampled responses, , , and treated as constants, we perform one optimizer step using the gradient of at . The next iteration uses the updated student policy.
4 Experiments
Models and Training Data. Following prior OPD studies (Zhang et al., 2026; Xu et al., 2026), we adopt a mathematical reasoning setup with Qwen3-0.6B and Qwen3-1.7B as students and Qwen3-4B-Instruct-2507 as the teacher (Yang et al., 2025). Both students operate in non-thinking mode, and the teacher remains frozen throughout training. Training uses the English subset of DAPO-Math17K (Yu et al., 2025), which pairs mathematical reasoning problems with integer-valued reference answers. Dataset details are provided in Appendix A.1
Benchmarks and Metrics. We evaluate all methods on eight mathematical reasoning benchmarks: AIME2024 (AI-MO, 2024a), AIME2025 (Zhang and Math-AI Team, 2025), AIME2026 (Zhang and Math-AI Team, 2026), MATH500 (Lightman et al., 2023), AMC2023 (AI-MO, 2024b), OlympiadBench (He et al., 2024), HMMT-Feb26 (Dekoninck et al., 2026), and HMMT-Nov25 (Dekoninck et al., 2026). We report mean@4 for MATH500 and OlympiadBench and mean@32 for the remaining benchmarks. Avg. is the unweighted mean across benchmarks. Dataset details are provided in Appendix A.2
A PREPRINT
| Method | AIME2024 | AIME2025 | AIME2026 | MATH500 | AMC2023 | OlympiadBench | HMMT-Feb26 | HMMT-Nov25 | Avg. |
|---|---|---|---|---|---|---|---|---|---|
| Teacher | 60.42 | 46.04 | 52.19 | 94.20 | 93.83 | 70.62 | 31.25 | 41.88 | 61.30 |
| Student: Qwen3-0.6B-Non-Thinking | |||||||||
| Student | 1.77 | 2.40 | 0.73 | 44.10 | 24.45 | 16.36 | 0.76 | 3.85 | 11.80 |
| SFT@110 | 4.90 | 7.60 | 4.06 | 59.45 | 34.92 | 26.74 | 1.89 | 3.02 | 17.82 |
| KD@110 | 4.17 | 7.19 | 4.79 | 57.75 | 35.23 | 27.15 | 2.94 | 2.71 | 17.74 |
| GRPO@110 | 8.23 | 15.21 | 10.00 | 68.60 | 46.56 | 34.42 | 7.86 | 6.04 | 24.62 |
| OPD@110 | 13.44 | 17.92 | 11.98 | 75.30 | 51.23 | 41.32 | 7.39 | 5.62 | 28.03 |
| TRD@20 | 4.58 | 8.54 | 3.96 | 57.60 | 36.33 | 26.93 | 3.79 | 2.81 | 18.07 |
| FastOPD@100 | 15.83 | 20.10 | 13.54 | 75.30 | 53.67 | 44.81 | 11.55 | 8.54 | 30.42 |
| SKD@20 | 8.44 | 16.98 | 9.79 | 66.65 | 43.67 | 35.76 | 8.14 | 5.62 | 24.38 |
| Relay-OPD@75 | 15.94 | 20.94 | 14.06 | 76.80 | 55.55 | 45.03 | 11.17 | 8.85 | 31.04 |
| CD-OPD@80 | 16.77 | 20.94 | 15.63 | 77.50 | 56.33 | 49.07 | 12.97 | 10.10 | 32.41 |
| Improvement vs. OPD | +3.33 | +3.02 | +3.65 | +2.20 | +5.10 | +7.75 | +5.58 | +4.48 | +4.38 |
| Improvement vs. Relay-OPD | +0.83 | 0.00 | +1.57 | +0.70 | +0.78 | +4.04 | +1.80 | +1.25 | +1.37 |
| Student: Qwen3-1.7B-Non-Thinking | |||||||||
| Student | 12.60 | 9.58 | 7.40 | 71.95 | 47.89 | 38.54 | 6.34 | 4.38 | 24.84 |
| SFT@110 | 23.33 | 19.48 | 16.15 | 81.40 | 59.45 | 46.62 | 12.59 | 6.56 | 33.20 |
| KD@110 | 23.54 | 21.15 | 15.31 | 81.40 | 59.45 | 46.62 | 12.59 | 6.56 | 33.33 |
| GRPO@110 | 24.58 | 22.08 | 15.31 | 81.45 | 60.23 | 48.07 | 12.78 | 7.50 | 34.00 |
| OPD@55 | 35.83 | 25.52 | 23.33 | 85.70 | 70.08 | 55.27 | 20.08 | 14.06 | 41.23 |
| TRD@40 | 19.27 | 19.69 | 12.71 | 77.70 | 55.47 | 44.18 | 11.93 | 4.58 | 30.69 |
| FastOPD@45 | 42.29 | 30.42 | 26.35 | 87.95 | 74.30 | 58.16 | 23.58 | 20.73 | 45.47 |
| SKD@35 | 33.12 | 30.73 | 28.85 | 87.35 | 72.42 | 54.41 | 20.08 | 11.88 | 42.35 |
| Relay-OPD@35 | 42.71 | 32.81 | 30.52 | 89.50 | 76.88 | 58.79 | 24.72 | 19.79 | 46.96 |
| CD-OPD@40 | 43.65 | 31.56 | 33.23 | 89.80 | 79.53 | 63.46 | 24.81 | 20.21 | 48.28 |
| Improvement vs. OPD | +7.82 | +6.04 | +9.90 | +4.10 | +9.45 | +8.19 | +4.73 | +6.15 | +7.05 |
| Improvement vs. Relay-OPD | +0.94 | -1.25 | +2.71 | +0.30 | +2.65 | +4.67 | +0.09 | +0.42 | +1.32 |
Table 1: Performance across eight mathematical reasoning benchmarks. The best and second-best results within each student size are shown in bold and underlined, respectively. Blue-shaded rows denote our method, and light-blue-shaded rows denote improvements in percentage points relative to the indicated baselines.
Implementation Details. See Appendix B.
Baselines. For reference, Teacher (frozen) and Student (before training) denote the released teacher and student checkpoints evaluated without further training. We compare CD-OPD with supervised fine-tuning (SFT), knowledge distillation (KD) (Hinton et al., 2015), and Group Relative Policy Optimization (GRPO) (Shao et al., 2024). We also include OPD (Agarwal et al., 2024), TRD (Jiang et al., 2026), FastOPD (Zhang et al., 2026), SKD (Xu et al., 2025), and Relay-OPD (Xu et al., 2026) as distillation baselines. @step denotes the reported checkpoint step.
Main Experimental Results. Table 1 shows that CD-OPD achieves the highest average accuracy among the compared training methods, reaching 32.41% for Qwen3-0.6B and 48.28% for Qwen3-1.7B. The gains over standard OPD range from 4.38 to 7.05 percentage points and remain 1.32–1.37 points over Relay-OPD, the strongest baseline on average. Both CD-OPD and Relay-OPD use the same reflection-triggered takeover criterion during training; the gains over Relay-OPD highlight the value of improving how students learn from teacher guidance and support CD-OPD's effectiveness in strengthening their independent reasoning. The advantage extends across benchmarks: CD-OPD achieves the best accuracy on all eight benchmarks with Qwen3-0.6B and on six with Qwen3-1.7B. These results suggest that CD-OPD helps students learn more effectively from teacher guidance by digesting its earlier context and reweighting Digest-segment OPD losses to improve student-only performance.
Ablation Study. Removing the Contextual Digest and its segment-specific OPD loss weighting reduces CD-OPD to the Relay-OPD formulation evaluated in Table 1. Table 2 therefore examines dependency-graph-based information selection and online meta-reweighting separately. The w/o Dependency Graph variant directly summarizes the context without a dependency graph, while retaining online meta-reweighting. Average accuracy decreases by 0.94–1.50 percentage points for different students, supporting the use of explicit dependencies to select context relevant to the current teacher guidance. The w/o Online Meta-Reweighting variant retains Contextual Digest construction but assigns unit weights to all Digest segments, reducing average accuracy by 1.09–1.57 points for different students. Both settings keep the mean weight over Digest-token positions equal to one, so the gains support using the task gradient and segment gradients to adjust relative segment weights. These results show that graph-based information selection and OPD loss weighting both contribute to CD-OPD's accuracy gains.
CFR Analysis. Figure 4 compares CFR across eight mathematical reasoning benchmarks for Vanilla Takeover-based OPD, Relay-OPD, and CD-OPD. CD-OPD achieves
A PREPRINT
| Method | AIME2024 | AIME2025 | AIME2026 | MATH500 | AMC2023 | OlympiadBench | HMMT-Feb26 | HMMT-Nov25 | Avg. | Δ |
|---|---|---|---|---|---|---|---|---|---|---|
| Student: Qwen3-0.6B-Non-Thinking | ||||||||||
| CD-OPD | 16.77 | 20.94 | 15.63 | 77.50 | 56.33 | 49.07 | 12.97 | 10.10 | 32.41 | — |
| w/o Dependency Graph | 14.58 | 18.33 | 14.58 | 76.35 | 55.47 | 48.74 | 11.65 | 7.60 | 30.91 | -1.50 |
| w/o Online Meta-Reweighting | 16.35 | 17.50 | 15.21 | 76.65 | 56.02 | 48.70 | 11.46 | 8.65 | 31.32 | -1.09 |
| Student: Qwen3-1.7B-Non-Thinking | ||||||||||
| CD-OPD | 43.65 | 31.56 | 33.23 | 89.80 | 79.53 | 63.46 | 24.81 | 20.21 | 48.28 | — |
| w/o Dependency Graph | 43.23 | 31.25 | 30.73 | 88.75 | 78.26 | 62.05 | 24.43 | 20.00 | 47.34 | -0.94 |
| w/o Online Meta-Reweighting | 41.98 | 30.73 | 30.00 | 88.05 | 78.06 | 61.28 | 24.04 | 19.56 | 46.71 | -1.57 |
Table 2: Ablation results across eight benchmarks. denotes the change in average accuracy relative to CD-OPD, in percentage points.

Figure 4: CFR for Qwen3-0.6B and Qwen3-1.7B, computed by pooling numerator and denominator counts across eight benchmarks.

Figure 5: Effects of and on CD-OPD's average accuracy across eight benchmarks and additional training time relative to training without online meta-reweighting. Left: Qwen3-0.6B; Right: Qwen3-1.7B.
CFRs of 9.58% and 6.49% for Qwen3-0.6B and Qwen3-1.7B, respectively. Compared with Vanilla Takeover-based OPD, CFR decreases by 10.02 and 8.41 percentage points, corresponding to relative reductions of 51.1% and 56.4%. Relative to Relay-OPD, CD-OPD further reduces CFR by 3.62 and 3.51 percentage points, or 27.4% and 35.1%, respectively. These reductions demonstrate that CD-OPD's combination of Contextual Digest construction and online meta-reweighting improves independent reasoning while mitigating collaboration failures under teacher takeover.
Sensitivity to and . Figure 5 reports CD-OPD's average accuracy across eight benchmarks and additional training time spent on online meta-reweighting for and . With the same number of student-only responses, achieves 0.32–0.33 percentage points higher average accuracy than (4, 4) at comparable additional training time. At B = 8, increasing R from 2 to 4 yields a further 0.11-point gain for both students, but increases additional training time by 44.5%–76.8%. This cost also depends on student-only response length (at , mean lengths are 8,974.95 and 5,330.61 tokens for Qwen3-0.6B and Qwen3-1.7B, respectively). These comparisons suggest that distributing a fixed number of student-only responses across more training problems can improve the accuracy–time trade-off of CD-OPD’s online meta-reweighting. Detailed results are provided in Appendix C.

Figure 6: Contextual Digest length distributions during training for Qwen3-0.6B and Qwen3-1.7B.
Contextual Digest Length Analysis. Figure 6 presents the cumulative distribution of Contextual Digest lengths during training. Under the 1,024-token budget, the mean Digest lengths per takeover are 253.09 and 270.52 tokens for Qwen3-0.6B and Qwen3-1.7B, respectively, while the maximum observed lengths reach 968 and 1,020 tokens. These results show that CD-OPD comfortably uses approximately one quarter of the token budget per takeover on average, while accommodating longer Contextual Digests when needed.
Training and Inference Efficiency. Relative to Relay-OPD, CD-OPD achieves higher average accuracy and lower CFR with comparable mean student-only response lengths and inference time. Detailed results are provided in Appendix D.
A PREPRINT
Case Study. We compare student-only responses from Relay-OPD and CD-OPD on an AIME2025 problem. Both students derive the correct rational product 31/13, but the Relay-OPD student later mistakes one factor, 31, for the complete product. The resulting error stems from incorrectly using an established intermediate result rather than failing to derive it. In contrast, the CD-OPD student uses the complete product in the final calculation and answers correctly. Details and prompt templates are provided in Appendices E and F, respectively.
5 Conclusion
Our CFR-based diagnosis reveals failures under teacher takeover that overall accuracy can obscure, and we propose CD-OPD to address them through trajectory construction and policy update in a novel way. Contextual Digest uses a teacher-generated dependency graph to organize and summarize teacher guidance with its earlier context, while online meta-reweighting uses the task gradient and segment gradients to determine each Digest segment's OPD loss weight. Experiments on eight benchmarks show higher average accuracy and lower CFR than the baselines. Together, these findings highlight the value of addressing both how teacher guidance is curated for student continuation and how the resulting OPD supervision is adapted to improve students' independent reasoning, while maintaining comparable inference efficiency.
Limitations
We identify two limitations of the current CD-OPD design. First, Contextual Digest construction uses fixed limits on dependency-graph size and Digest length. These limits may restrict the contextual information retained when teacher guidance depends on many problem conditions or intermediate results. A possible extension is to adapt the construction budget to the amount of earlier context required by the current guidance, rather than applying the same limit at every takeover. Second, online meta-reweighting assigns one meta-weight to each Digest segment based on its segment gradient and the task gradient. All tokens within that segment therefore share the same meta-weight, although their individual OPD gradients may differ in alignment with the task gradient. Finer-grained weighting could account for these differences, but its benefits for students' independent reasoning need to be evaluated against the additional gradient-computation cost.
References
Rishabh Agarwal, Nino Vieillard, Yongchao Zhou, Piotr Stanczyk, Sabela Ramos Garea, Matthieu Geist, and Olivier Bachem. 2024. On-policy distillation of language models: Learning from self-generated mistakes. In The Twelfth International Conference on Learning Representations.
AI-MO. 2024a. AIMO Validation AIME Dataset.
AI-MO. 2024b. AIMO Validation AMC Dataset.
Jasper Dekoninck, Nikola Jovanović, Tim Gehrunger, Kári Rögnvaldsson, Ivo Petrov, Chenhao Sun, and Martin Vechev. 2026. Beyond benchmarks: Matharena as an evaluation platform for mathematics with llms. Preprint, arXiv:2605.00674.
Yuqian Fu, Haohuan Huang, Kaiwen Jiang, Jiacai Liu, Zhuo Jiang, Yuanheng Zhu, and Dongbin Zhao. 2026. Revisiting on-policy distillation: Empirical failure modes and simple fixes. In Third Conference on Language Modeling.
Yuxian Gu, Li Dong, Furu Wei, and Minlie Huang. 2026. Minillm: On-policy distillation of large language models. Preprint, arXiv:2306.08543.
Chaoqun He, Renjie Luo, Yuzhuo Bai, Shengding Hu, Zhen Thai, Junhao Shen, Jinyi Hu, Xu Han, Yujie Huang, Yuxiang Zhang, Jie Liu, Lei Qi, Zhiyuan Liu, and Maosong Sun. 2024. OlympiadBench: A challenging benchmark for promoting AGI with olympiad-level bilingual multimodal scientific problems. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3828–3850, Bangkok, Thailand. Association for Computational Linguistics.
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the knowledge in a neural network. Preprint, arXiv:1503.02531.
Cheng-Yu Hsieh, Chun-Liang Li, Chih-kuan Yeh, Hootan Nakhost, Yasuhisa Fujii, Alex Ratner, Ranjay Krishna, Chen-Yu Lee, and Tomas Pfister. 2023. Distilling step-by-step! outperforming larger language models with less training data and smaller model sizes. In Findings of the Association for Computational Linguistics: ACL 2023, pages 8003–8017, Toronto, Canada. Association for Computational Linguistics.
Li Jiang, Haoran Xu, Yichuan Ding, and Amy Zhang. 2026. Trajectory-refined distillation. Preprint, arXiv:2606.08432.
Yoon Kim and Alexander M. Rush. 2016. Sequence-level knowledge distillation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1317–1327, Austin, Texas. Association for Computational Linguistics.
Jahyun Koo, Yerin Hwang, Yongil Kim, Taegwan Kang, Hyunkyung Bae, and Kyomin Jung. 2025. SWITCH: Studying with teacher for knowledge distillation of large language models. In Findings of the Association for Computational Linguistics: NAACL 2025, pages 3733–3746, Albuquerque, New Mexico. Association for Computational Linguistics.
Solomon Kullback and Richard A Leibler. 1951. On information and sufficiency. The annals of mathematical statistics, 22(1):79–86.
A PREPRINT
Yaxuan Li, Yuxin Zuo, Bingxiang He, Jinqian Zhang, Chaojun Xiao, Cheng Qian, Tianyu Yu, Huan ang Gao, Wenkai Yang, Zhiyuan Liu, and Ning Ding. 2026. Rethinking on-policy distillation of large language models: Phenomenology, mechanism, and recipe. Preprint, arXiv:2604.13016.
Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. 2023. Let's verify step by step. Preprint, arXiv:2305.20050.
Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. 2018. Learning to reweight examples for robust deep learning. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 4334–4343. PMLR.
Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. 2024. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. Preprint, arXiv:2402.03300.
Mingyang Song and Mao Zheng. 2026. A survey of on-policy distillation for large language models. Preprint, arXiv:2604.00626.
Bing Wang, Shaotian Yan, Chen Shen, kaiyuan liu, Sinan Fan, Ximing Li, Rui Miao, Xiaosong Yuan, Zhanming Shen, and Jieping Ye. 2026. Backtracking when it strays: Mitigating dual exposure biases in llm reasoning distillation. Preprint, arXiv:2605.19433.
Haolei Xu, Xiaowen Xu, Haiwen Hong, Zixuan Ni, Hongxing Li, Yiwen Qiu, Weiming Lu, and Yongliang Shen. 2026. Pass the baton: Trajectory-relayed on-policy distillation. Preprint, arXiv:2607.26057.
Wenda Xu, Rujun Han, Zifeng Wang, Long Le, Dhruv Madeka, Lei Li, William Yang Wang, Rishabh Agarwal, Chen-Yu Lee, and Tomas Pfister. 2025. Speculative knowledge distillation: Bridging the teacher-student gap through interleaved sampling. In The Thirteenth International Conference on Learning Representations.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, and 41 others. 2025. Qwen3 technical report. Preprint, arXiv:2505.09388.
Fangxu Yu, Weijia Xu, Michael Xu, Tianyi Zhou, and Zinan Lin. 2026. Weak-to-strong on-policy distillation. Preprint, arXiv:2607.26246.
Qiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan, Xiaochen Zuo, Yu Yue, Weinan Dai, Tiantian Fan, Gaohong Liu, Lingjun Liu, Xin Liu, Haibin Lin, Zhiqi Lin, Bole Ma, Guangming Sheng, Yuxuan Tong, Chi Zhang, Mofan Zhang, Wang Zhang, and 16 others. 2025. Dapo: An open-source llm reinforcement learning system at scale. Preprint, arXiv:2503.14476.
Dongxu Zhang, Zhichao Yang, Sepehr Janghorbani, Jun Han, Andrew Ressler II, Qian Qian, Gregory D Lyng, Sanjit Singh Batra, and Robert E. Tillman. 2026. Fast and effective on-policy distillation from reasoning prefixes. In Findings of the Association for Computational Linguistics: ACL 2026, pages 25553–25569, San Diego, California, United States. Association for Computational Linguistics.
Yifan Zhang and Math-AI Team. 2025. American invitational mathematics examination (AIME) 2025.
Yifan Zhang and Math-AI Team. 2026. American invitational mathematics examination (AIME) 2026.
Hanyang Zhao, Haoxian Chen, Han Lin, Genta Indra Winata, David Yao, and Wenpin Tang. 2026. Opd+: Rethinking the advantage design for on-policy distillation. Preprint, arXiv:2606.01039.
Zhou Ziheng, Jiaqi Li, Huacong Tang, Ying Nian Wu, and Demetri Terzopoulos. 2026. Less is more: Early stopping rollout for on-policy distillation. Preprint, arXiv:2605.27028.
A PREPRINT
A Dataset Details
A.1 Training Dataset
We use the English subset of DAPO-Math-17K (Yu et al., 2025) for training. This subset contains 14,116 mathematical reasoning problems paired with integer-valued reference answers. Problem statements are used for trajectory construction, while reference answers are used to assess final-answer correctness. At each iteration, CD-OPD samples problems for trajectory construction and online meta-reweighting from the same training subset, without overlap between the two batches. The original DAPO-Math-17K release declares an Apache-2.0 license. The processed English subset does not specify a separate license.
A.2 Evaluation Benchmarks
We evaluate on eight mathematical reasoning benchmarks. Responses are sampled with a temperature of 1.0, top- of 1.0, and a maximum response length of 32,768 tokens. Table 3 summarizes the dataset versions used in our experiments, including their sizes, the number of responses sampled per problem, and their declared licenses.
AIME2024, AIME2025, and AIME2026. Each benchmark contains 30 problems from the American Invitational Mathematics Examination in the corresponding year. We use the 2024 subset of the AI-MO AIME collection (AI-MO, 2024a) and the MathArena releases for AIME2025 and AIME2026 (Dekoninck et al., 2026).
MATH500. MATH500 (Lightman et al., 2023) is a 500-problem evaluation subset of the MATH benchmark, covering seven mathematical subjects and five difficulty levels. We use the complete MATH500 test split released by HuggingFaceH4.
AMC2023. We use the 2023 subset of the AI-MO AMC collection (AI-MO, 2024b), comprising 40 American Mathematics Competitions problems adapted to an integer-answer format.
OlympiadBench. OlympiadBench (He et al., 2024) contains mathematics and physics problems across multiple languages and modalities. We use its English, text-only, open-ended mathematics subset (OE_TO_maths_en_COMP), which contains 674 problems.
HMMT-Feb26 and HMMT-Nov25. We use the MathArena releases (Dekoninck et al., 2026) of problems from the February 2026 and November 2025 Harvard–MIT Mathematics Tournaments. HMMT-Feb26 contains 33 problems, and HMMT-Nov25 contains 30.
| Benchmark | N | K | License |
|---|---|---|---|
| AIME2024 | 30 | 32 | Apache-2.0 |
| AIME2025 | 30 | 32 | CC BY-NC-SA 4.0 |
| AIME2026 | 30 | 32 | CC BY-NC-SA 4.0 |
| MATH500 | 500 | 4 | MIT |
| AMC2023 | 40 | 32 | Apache-2.0 |
| OlympiadBench | 674 | 4 | Apache-2.0 |
| HMMT-Feb26 | 33 | 32 | CC BY-NC-SA 4.0 |
| HMMT-Nov25 | 30 | 32 | CC BY-NC-SA 4.0 |
Table 3: Evaluation dataset statistics and declared licenses.
| Hyperparameter | Value |
|---|---|
| Student generation mode | Non-thinking |
| Maximum prompt length | 2,048 tokens |
| Maximum training response length | 16,384 tokens |
| Sampling temperature | 1.0 |
| Sampling top-p | 1.0 |
| Responses per problem for trajectory construction | 1 |
| Global trajectory-construction batch size | 128 |
| PPO mini-batch size | 128 |
| PPO epochs per batch | 1 |
| PPO clipping parameter | 0.2 |
| Optimizer | AdamW |
| Learning rate | |
| Weight decay | 0.01 |
| AdamW () | (0.9, 0.999) |
| Maximum gradient norm | 1.0 |
| Student optimizer steps per iteration | 1 |
| Teacher optimizer steps | 0 |
| Training epoch budget | 1 |
| Training seed | 42 |
| Checkpoint saving interval | 5 steps |
Table 4: Training and optimization hyperparameters for CD-OPD.
B Implementation Details
B.1 Training Settings
Table 4 summarizes the training and optimization hyperparameters. We optimize the student with AdamW. Following Relay-OPD (Xu et al., 2026), we use a training seed of 42 and report results from the best checkpoint for each student size. Each iteration uses a global trajectory-construction batch of 128 problems, with one response generated per problem. Student generation and teacher guidance use the same sampling temperature and top-p. All CD-OPD experiments are conducted on four NVIDIA RTX PRO 6000 GPUs with 96 GB of memory each and 88 Intel Xeon Platinum 8470Q vCPUs, using Ubuntu 22.04, Python 3.10, PyTorch 2.1.2, and CUDA 11.8. Following Relay-OPD (Xu et al., 2026), we evaluate student-only accuracy every five training steps and select the checkpoint with the highest average accuracy across the eight bench-
https://huggingface.co/datasets/BytedTsinghua-SIA/DAPO-Math-17k
https://huggingface.co/datasets/open-r1/DAPO-Math-17k-Processed
A PREPRINT
marks. The selected checkpoints are at steps 80 and 40 for Qwen3-0.6B and Qwen3-1.7B.
Policy-loss implementation. We retain the PPO-style clipped token-level surrogate used by Relay-OPD (Xu et al., 2026). For each response token, the probability ratio is
The denominator is evaluated under the fixed student snapshot on the same prefix, including for teacher guidance and Digest tokens. The implemented token-level loss is
The PPO mini-batch contains the full global trajectory-construction batch, with one optimization pass per batch. Task and segment gradients are computed before any parameter update. After computing the meta-weights, we accumulate the final weighted OPD gradient and perform one student optimizer step. The gradients are therefore evaluated at , where lies inside the clipping interval. With fixed OPD advantages,
With the same token masks, loss normalization, and fixed meta-weights, the two surrogates yield the same segment gradients and weighted OPD gradient at this update point. The final weighted OPD gradient is clipped to a maximum norm of 1.0 before the AdamW step.
B.2 Trajectory Construction with Contextual Digest
Table 5 summarizes the teacher takeover and Contextual Digest construction hyperparameters. Following prior OPD studies (Xu et al., 2026), the reflection-token set is formed from Wait, But, Hmm, Actually, Hold, However, Yet, Oh, Alternatively, No, Ah, Oops, and Well, together with their capitalization and leading-space variants. Teacher-generated segments are paragraphs delimited by blank lines. The segment and token limits apply to each takeover.
| Hyperparameter | Value |
|---|---|
| Teacher takeover | |
| Student top-K for takeover | |
| Maximum takeovers per response | |
| Maximum teacher-generated segments per takeover | |
| Maximum teacher guidance length per takeover | 256 tokens |
| Contextual Digest construction | |
| Dependency-graph generation temperature | 0 |
| Maximum dependency-graph generation length | 2,048 tokens |
| Maximum dependency-graph nodes | 32 |
| Maximum Contextual Digest length | 1,024 tokens |
Table 5: Teacher takeover and Contextual Digest construction hyperparameters.
B.3 Online Meta-Reweighting
Table 6 summarizes the online meta-reweighting hyperparameters. At each iteration, we sample distinct problems from the same training subset, excluding those in the trajectory-construction batch, and generate student-only responses per problem. These responses use the same sampling temperature, top-, and maximum training response length as trajectory construction. Final-answer correctness is assessed against the corresponding reference answers.
| Hyperparameter | Value |
|---|---|
| Additional training problems per iteration | |
| Student-only responses per problem | |
| Maximum student-only response length | 16,384 tokens |
Table 6: Online meta-reweighting hyperparameters.
C Detailed Results for and
Table 7 provides the per-benchmark results corresponding to Figure 5. For both evaluated values of , increasing from 2 to 8 is accompanied by higher accuracy on all eight benchmarks at both student sizes. The largest gains for Qwen3-0.6B occur on AIME2025, reaching 2.87 and 2.57 percentage points at and , respectively. For Qwen3-1.7B, AIME2026 shows the largest gains, at 2.64 and 2.25 points, respectively. The advantage of sampling more distinct problems also appears when the total number of student-only responses is held fixed. Both versus and versus favor the configuration with more problems on every benchmark at both student sizes. For the latter comparison, the per-benchmark gains range from 0.09 to 1.05 percentage points for Qwen3-0.6B and from 0.13 to 0.65 points for Qwen3-1.7B. Thus, the higher average accuracy reported in the main text reflects improvements across all eight bench-
A PREPRINT
| (B,R) | AIME2024 | AIME2025 | AIME2026 | MATH500 | AMC2023 | OlympiadBench | HMMT-Feb26 | HMMT-Nov25 | Avg. |
|---|---|---|---|---|---|---|---|---|---|
| Student: Qwen3-0.6B-Non-Thinking | |||||||||
| (2,2) | 16.42 | 18.07 | 15.28 | 76.80 | 56.07 | 48.76 | 11.71 | 8.89 | 31.50 |
| (4,2) | 16.55 | 19.17 | 15.41 | 77.06 | 56.17 | 48.88 | 12.19 | 9.35 | 31.85 |
| (8,2) | 16.77 | 20.94 | 15.63 | 77.50 | 56.33 | 49.07 | 12.97 | 10.10 | 32.41 |
| (2,4) | 16.50 | 18.70 | 15.36 | 76.95 | 56.13 | 48.83 | 11.99 | 9.16 | 31.70 |
| (4,4) | 16.64 | 19.89 | 15.50 | 77.24 | 56.24 | 48.96 | 12.51 | 9.66 | 32.08 |
| (8,4) | 16.81 | 21.27 | 15.67 | 77.58 | 56.36 | 49.11 | 13.12 | 10.24 | 32.52 |
| Student: Qwen3-1.7B-Non-Thinking | |||||||||
| (2,2) | 42.29 | 30.87 | 30.59 | 88.37 | 78.33 | 61.68 | 24.18 | 19.68 | 47.00 |
| (4,2) | 42.80 | 31.11 | 31.59 | 88.91 | 78.78 | 62.35 | 24.42 | 19.88 | 47.48 |
| (8,2) | 43.65 | 31.56 | 33.23 | 89.80 | 79.53 | 63.46 | 24.81 | 20.21 | 48.28 |
| (2,4) | 42.61 | 31.02 | 31.22 | 88.71 | 78.61 | 62.10 | 24.33 | 19.80 | 47.30 |
| (4,4) | 43.31 | 31.35 | 32.58 | 89.45 | 79.23 | 63.02 | 24.66 | 20.08 | 47.96 |
| (8,4) | 43.77 | 31.56 | 33.47 | 89.93 | 79.64 | 63.62 | 24.87 | 20.26 | 48.39 |
Table 7: Per-benchmark accuracy (%) of CD-OPD for different configurations. Bold rows indicate the default setting .
| Method | Avg. Accuracy (%)↑ | CFR (%)↓ | Training Time (min/step)↓ | Response Length (tokens)↓ | Inference Time (min/response)↓ |
|---|---|---|---|---|---|
| Student: Qwen3-0.6B-Non-Thinking | |||||
| Relay-OPD | 31.04 | 13.20 | 4.67 | 14,473.80 | 0.22 |
| CD-OPD | 32.41 | 9.58 | 5.76 | 14,699.02 | 0.23 |
| Student: Qwen3-1.7B-Non-Thinking | |||||
| Relay-OPD | 46.96 | 10.00 | 4.93 | 11,738.32 | 0.28 |
| CD-OPD | 48.28 | 6.49 | 6.04 | 11,921.79 | 0.29 |
Table 8: Training and inference efficiency of Relay-OPD and CD-OPD across Qwen3-0.6B and Qwen3-1.7B.
marks rather than gains confined to a subset. Increasing R also improves the reported accuracy, although the additional gains are small at B = 8. Increasing R from 2 to 4 at this value of B yields per-benchmark gains of 0.03–0.33 percentage points for Qwen3-0.6B and 0.00–0.24 points for Qwen3-1.7B. Together, these comparisons indicate that CD-OPD benefits across benchmarks from using more distinct problems to compute the task gradient, even when the number of student-only responses is unchanged.
D Training and Inference Efficiency
Table 8 compares Relay-OPD and CD-OPD in terms of average accuracy across the eight benchmarks, CFR, training time per step, mean student-only response length, and inference time per response. For Qwen3-0.6B and Qwen3-1.7B, training time increases from 4.67 to 5.76 and from 4.93 to 6.04 minutes per step, respectively. Meanwhile, CD-OPD improves average accuracy by 1.37 and 1.32 points and reduces CFR by 3.62 and 3.51 points. During student-only inference, mean response length increases from 14,473.80 to 14,699.02 tokens for Qwen3-0.6B and from 11,738.32 to 11,921.79 tokens for Qwen3-1.7B. Inference time changes from 0.22 to 0.23 and from 0.28 to 0.29 minutes per response, respectively. Neither Contextual Digest construction nor online meta-reweighting is required for student-only inference. These results show that CD-OPD improves average accuracy and reduces CFR with a modest increase in training time per step, while maintaining student-only response lengths and inference times close to those of Relay-OPD.
A PREPRINT
E Case Study: Student-Only Reasoning
Problem (AIME2025). Let be relatively prime positive integers such that
Find .
Reference answer: 106.
Both responses are generated by the respective students independently, without teacher takeover or a Contextual Digest at inference.
| Relay-OPD | CD-OPD |
|---|---|
| 1. Rewrite and separate the product“We can cancel from numerator and denominator: ”.“Let’s now split the product into two parts: ”. | 1. Rewrite and separate the product“Now, we can write everything in terms of base 5. ”.“Let’s separate the product into two parts: factorial-like terms and logarithmic terms. ”. |
- Evaluate the two rational factors“This is a telescoping product: ”
“Similarly, look at the second part: ”
“So now, the total product of the terms is: ”
- Evaluate the two rational factors“Wait — no. Actually: ”(after revisiting the factorial simplification)
“Again, telescoping! ”
“The product of the ratio parts is ”
A PREPRINT
| Relay-OPD | CD-OPD |
|---|---|
| 3. Reassemble the original expression" "Wait — but do we have only the first two products? " "We have now: "1. First product: Reading note. The earlier factor 1/13 is no longer included in the reported rational product. | 3. Recheck the two rational factors "Wait — let me double-check: " "The product of ratios is " |
| 4. Evaluate the logarithmic product "This is a telescoping product of ratios. " | 4. Evaluate the logarithmic product "So the product telescopes: " "Wait — this simplifies exactly! " |
| 5. Final recombination and answer "Wait — so both products now are: " "1. First product: 31" "2. Second product: 3" "Therefore, the total product is: " "So " (incorrect) | 5. Final recombination and answer "So the product is: " "So 93/13 is reduced. Therefore, , and " (correct) |
A PREPRINT
F Prompt Templates
F.1 Training and Inference
Following prior OPD studies (Xu et al., 2026), we use the same problem-solving instruction for training and evaluation, including student-only responses for online meta-reweighting.
Problem-solving instruction
[System] Please reason step by step, and put your final answer within \boxed{}.
[User] {problem}
F.2 Dependency Graph Construction
The teacher constructs the dependency graph from the problem, the response prefix before takeover, and the current teacher guidance.
Dependency graph construction
Construct a directed dependency graph from the problem, response prefix, and teacher guidance.
Nodes: Include explicitly stated conditions, variable definitions, intermediate results, and reasoning steps, including teacher guidance. Record exact source spans for each node. Merge spans only if meanings, units, and conditions agree.
Edges: Add i -> j only when i is needed to interpret or apply j. Use unique node IDs, valid edge endpoints, and keep the graph acyclic. If guidance corrects a preceding statement, use the correction and cite its source. Exclude superseded claims. Do not add new reasoning. Return JSON only:
{ "nodes": [ {"id": "...", "content": "...", "source_spans": [ {"source": "...", "text": "..."} ] ], "edges": [{"from": "...", "to": "..."}] }
Valid sources: problem, response_prefix, teacher_guidance.
Problem: {problem} Response prefix: {response_prefix} Teacher guidance: {teacher_guidance}
F.3 Node Summarization
The teacher summarizes the selected contextual nodes in dependency order.
Node summarization
Write one concise summary for each selected contextual node. Use current teacher guidance to decide which details to retain.
Preserve necessary variable definitions, values, units, and conditions. Use only source spans and corrections explicitly stated in the guidance. Exclude superseded claims. Do not add new reasoning or rewrite the guidance.
Keep the node IDs and dependency order. Return one summary per node as JSON only: {"summaries": [{"id": "...", "text": "..."}]} Teacher guidance: {teacher_guidance} Selected nodes: {selected_contextual_nodes}
The node summaries are concatenated in dependency order, followed by the unchanged teacher guidance as the final Digest segment .