HuggingFace Daily Papers(社区热门论文)
40AI 编辑部评分,满分 100

Flux-OPD:用演化上下文进行在线策略蒸馏

2026-07-30 08:00· 1天前
跳到正文
AI 摘要

Flux-OPD 提出一种新的在线策略蒸馏(OPD)范式,利用随学生表现演化的上下文作为训练监督,以捕捉开放领域中的任务偏好。该方法通过反向 KL 目标分解,将上下文条件教师与无上下文教师的差异作为上下文校正信号注入,并用冲突项加权校正强度。实验表明,Flux-OPD 在开放任务上优于现有 OPD 范式。

Yuran Wang

, Zekun Wang

, Bohan Zeng

, Ruixu Zhang

, Wenxuan Liu

, Liu Yang

Yifan Dai

, Bozhou Li

, Chengzhuo Tong

, Daili Hua

Kling Team,

Beijing Key Laboratory of Data Intelligence and Security (Peking University)

Corresponding Author: wentao.zhang@pku.edu.cn

Abstract

Large language model training in open-ended domains lacks verifiable rewards, making task preferences difficult to formalize as effective supervision. Contexts can convey such preferences, yet provide little additional supervision once distilled into the student, motivating contexts that evolve with student performance. However, directly using evolving contexts as in-training supervision results in an unstable distillation target and conflicting distributions, requiring mechanisms to stabilize target and downweight conflicts. In this paper, we analyze the effect of contexts through a decomposition of the reverse KL objective, revealing two findings: the student is distilled toward the geometric mean of context-conditioned teachers, and the objective contains a conflict term that measures conflicts among these teachers. Based on this decomposition, we propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains. Flux-OPD treats the differences between context-conditioned and context-free teachers as contextual difference signals, injects them as contextual corrections into the context-free teacher anchor, and weights their correction strength using the conflict term as an indicator. Experiments on open-ended tasks show that Flux-OPD outperforms existing OPD paradigms, highlighting the potential to combine teacher supervision with evolving contexts.

1 Introduction

Refer to caption
Figure 1: Motivations. (a) OPCD underperforms OPD on HealthBench, while OEL does not yield consistent gains. (b) Evolving contexts cause loss surges, and conflicts among them produce conflicting target distributions.

Large language models achieve remarkable progress through Reinforcement Learning with Verifiable Rewards in verifiable domains [18]. However, open-ended domains often lack verifiable rewards, making it difficult to formalize supervision signals that effectively capture task preferences. Rubrics-as-Rewards [9, 20] uses rubrics as supervision but still provides sparse feedback, limiting its effectiveness in capturing complex preference priors [25, 16, 17].

An alternative is to use contexts as supervision signals. Context Distillation and On-Policy Context Distillation (OPCD) [3, 27] distill the student toward a context-conditioned teacher, enabling it not only to benefit from dense teacher supervision, as in vanilla On-Policy Distillation (OPD) [1], but also to directly learn behaviors that the teacher exhibits after observing the contexts. Thus, explicit contexts can convey task preferences that are difficult to formalize in open-ended domains. However, we find that directly distilling toward the context-conditioned teacher (OPCD) underperforms distilling toward the context-free teacher (OPD), as shown in Fig. 1. We attribute this gap to contexts extracted before training: once their information is distilled into student, they contribute little additional supervision. This motivates us to evolve contexts with student performance, enabling continuous student improvement.

The key challenge is to incorporate evolving contexts as supervision signals throughout training without disrupting optimization. Online Experiential Learning (OEL) [26] alternates between deployment and OPCD training, accumulating experience items from extensive student trajectories as contexts. To provide in-training supervision, we extend this paradigm to a single training run, using only a small set of trajectories at each update to provide timely feedback on the current student. However, as shown in Fig. 1, evolving contexts do not yield consistent gains. Each update abruptly shifts the target distribution, causing loss surges and destabilizing training. Moreover, conflicting contexts can produce conflicting target distributions. These observations motivate us to stabilize the distillation target and downweight conflicting distributions.

To better leverage contexts, we analyze their effect on the reverse KL objective in the OPCD paradigm. We show that this objective can be equivalently decomposed into a distillation term and a conflict term. The former computes the KL divergence between the student and the geometric mean of context-conditioned teacher distributions, while the latter measures conflicts among these teachers. Conditioned on fixed sampled histories, the decomposition shows that the conflict term contributes no direct gradient, leaving the distillation term as the directly optimized component of the conditional objective.

Based on this decomposition, we propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains. Flux-OPD is an iterative training process that divides a single training run into multiple iterations, each comprising context extraction and context distillation. The teacher extracts contexts from student trajectories during context extraction and conditions on these contexts during context distillation.

We design two distillation strategies: contextual correction and contextual weighting. To stabilize the distillation target, the contextual correction strategy anchors it to the stable context-free teacher and injects contextual difference signals that capture task preferences from evolving contexts, rather than directly treating context-conditioned teachers as distillation targets. Contextual difference signals are defined as the differences between the context-conditioned and context-free teachers. To downweight conflicting distributions, the contextual weighting strategy adjusts the correction strength using the conflict term as an indicator, strengthening corrections when context-conditioned distributions are consistent and weakening them when they conflict.

We evaluate our method on two open-ended tasks with real-world applicability: prompt optimization for video generation and medical question answering, both of which involve complex preferences and rely on rich contextual information. Results show that Flux-OPD outperforms existing OPD paradigms on both tasks across different student-teacher settings. Our contributions are threefold:

  • We analyze the effect of contexts through a reverse KL decomposition, showing that the student is distilled toward the geometric mean of the context-conditioned teachers and that the objective contains a conflict term measuring conflicts among them.

  • We propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains.

  • Experiments on open-ended tasks show that Flux-OPD outperforms existing OPD paradigms, highlighting the potential to combine teacher supervision with evolving contexts as in-training supervision.

2 Related Works

2.1 Open-Ended Reward Modeling

Large language model training in open-ended domains lacks verifiable rewards, making task preferences difficult to formalize as effective supervision. Reinforcement Learning with Verifiable Rewards (RLVR) compresses these preferences into coarse outcomes. Rubrics-as-Rewards (RaR) [9, 20] uses rubrics as structured supervision signals but still provides sparse feedback. On-Policy Distillation (OPD) trains on trajectories sampled from the current student policy and provides dense teacher supervision [1, 28, 12, 6, 7], but its supervision primarily reflects teacher preferences rather than real task preferences [8, 22, 23]. Flux-OPD complements teacher supervision by using evolving contexts as in-training supervision to capture task preferences.

2.2 Context Distillation

Context Distillation [3, 19] distills a student from a context-conditioned teacher, enabling it to learn behaviors that the teacher exhibits after observing the contexts. On-Policy Context Distillation (OPCD) [27] further samples from the current student, reducing the mismatch between offline data and the student’s generation distribution. Although contexts can convey task preferences that are difficult to formalize in open-ended domains, contexts fixed before training cannot adapt to the evolving student. OEL [26] alternates between deployment and OPCD training, updating contexts between runs. Directly extending this paradigm to a single continuous run results in an unstable distillation target and conflicting distributions. Flux-OPD instead uses evolving contexts as in-training supervision by distilling contextual difference signals into a context-free anchor rather than fully imitating context-conditioned teachers.

3 Preliminaries

3.1 Paradigms

In vanilla On-Policy Distillation (OPD), given a user prompt , the student autoregressively generates a response . Let denote the decoding history and the vocabulary. At step , the student and teacher distributions are defined as

(1)

In On-Policy Context Distillation (OPCD), the teacher additionally receives a privileged context , while the student observes only . The context-conditioned teacher distribution is

(2)

Training minimizes the reverse KL under on-policy histories:

(3)

For simplicity, fixing and omitting the condition gives

(4)

3.2 KL Decomposition

For a fixed decoding history at step , let and . We omit for readability.

Forward KL

Prior work [22] decomposes the forward KL objective into a distillation term toward a marginal teacher and a mutual information term:

(5)

where the marginal teacher is defined as

(6)

Thus, under forward KL, the student is distilled toward the arithmetic mean of context-conditioned teachers.

Reverse KL

We analyze the context effect through the reverse KL objective in Eq.(4).

Refer to caption
Figure 2: Applying the Reverse KL Decomposition to Training with Evolving Contexts. At each iteration, the objective decomposes into a distillation term and a conflict term. (a) Evolving contexts cause shifts in context-conditioned teacher distributions, destabilizing training. (b) The conflict term captures conflicts among context-conditioned teachers, contributes to the loss, and varies with the sampled histories and contexts rather than through direct optimization.
Refer to caption
Figure 3: Overview of Flux-OPD. (a) illustrates the iterative training process, which divides a single training run into iterations, each consisting of context extraction and context distillation. (b) illustrates the contextual correction strategy, which corrects the distillation target by combining the context-free teacher distribution with contextual difference signals from context-conditioned teachers. (c) illustrates the contextual weighting strategy, which further adjusts correction strengths using the conflict term as an indicator, strengthening corrections when context-conditioned teacher distributions are consistent and weakening them when they conflict.
Proposition 1(Reverse KL Decomposition).

For a fixed decoding history, let and be distributions over the same vocabulary , where for every context and token . Let denote expectation with respect to a fixed context distribution. Define the normalized geometric mean of context-conditioned teachers and its normalization constant as

(7)

Then, the reverse KL objective decomposes as

(8)
Proof.

Expanding the reverse KL objective gives

(9)

According to Eq.(7),

(10)

Substituting this relation into Eq. (9) yields

(11)

which gives Eq. (8).

Moreover, by Jensen’s inequality [13],

(12)

Therefore, . ∎

Under reverse KL, the student is thus distilled toward the normalized geometric mean of context-conditioned teachers, rather than the arithmetic mean under forward KL. The geometric mean assigns high probability only to tokens that receive consistently high probability across contexts. Moreover, the conflict term measures the distributional disagreement among these teachers: lower distributional overlap decreases and increases .

Corollary 1(Gradient Independence of the Conflict Term).

For fixed decoding histories, a fixed context distribution, and fixed context-conditioned teacher distributions, the conflict term is independent of the current student token distribution. Therefore, it contributes no direct gradient with respect to the student parameters through .

Thus, only the distillation term is directly optimized in the conditional objective, and the geometric mean of context-conditioned teachers serves as distillation target.

We apply the fixed-history decomposition above to analyze training with evolving contexts. Fig. 2(a) visualizes the mean output embeddings of different distillation targets, showing that context-conditioned teachers undergo large shifts, whereas the context-free teacher remains stable. Moreover, as shown in Fig. 2(b), variations in the conflict value reflect changes in the sampled histories and context pools across iterations rather than direct optimization of the conflict term.

4 Method

We propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains. As shown in Fig. 3, it is an iterative training process including two distillation strategies: contextual correction and contextual weighting.

4.1 Iterative Training

To enable continuous student improvement, we evolve contexts with student performance. We update contexts within a single training run, using a small set of trajectories at each update to provide timely feedback on the current student.

These evolving contexts makes the training a iterative process that divides a single training run into iterations, each consisting of context extraction and context distillation. As shown in Fig. 3(a), the teacher extracts contexts from student trajectories during context extraction and conditions on these contexts during context distillation.

Context Extraction

Following existing context distillation methods [27, 26], contexts consist of experience items extracted from student interaction trajectories. At the beginning of iteration , we collect trajectories from the previous student policy :

(13)

where is the user prompt, is the student response and optional supplements, such as downstream video result generated from in prompt optimization task and rubrics in medical question answering task. For the first iteration, user prompts are randomly sampled from the entire training set. For subsequent iterations, they are randomly sampled from the training data seen in the previous iteration.

Given each trajectory, the teacher extracts new experience items that differ from existing ones and accumulate them with previous experience items to form a complete context. This process is repeated for turns with different random seeds, yielding a context pool:

(14)

Context Distillation

Contexts sampled from the context pool condition the teacher, allowing the target distribution to evolve with the current student performance. Considering the context-free teacher provides a stable anchor for the base optimization target, while the conflict term indicates conflicting context-conditioned teacher supervision, we stabilize distillation through contextual correction and contextual weighting.

4.2 Contextual Correction

To stabilize the distillation target, the contextual correction strategy anchors it to the stable context-free teacher and injects contextual difference signals that capture task preferences from evolving contexts, rather than directly using context-conditioned teachers as distillation targets, as shown in Fig. 3(b).

For iteration , at each response position, we first compute the normalized geometric mean of context-conditioned teachers:

(15)
(16)

Since the context-conditioned teacher is constructed in log-probability space, we compute the contextual difference signal relative to the context-free teacher , as

(17)

The final corrected teacher distribution is then obtained through log-space interpolation:

(18)

where controls the strength of contextual correction. When , the target reduces to the context-free teacher ; when , it recovers the context-conditioned teacher . Thus, the context-free teacher provides a stable anchor, while the contextual difference signal injects task preferences derived from contexts.

4.3 Contextual Weighting

To downweight conflicting distributions, the contextual weighting strategy adjusts the correction strength using the conflict term as an indicator, as shown in Fig. 3(c).

From the reverse KL decomposition in Eq.(8), the conflict term measures distributional disagreement among context-conditioned teachers. Motivated by this observation, we use it as a signal to adjust the correction strength:

(19)

where a larger indicates lower overlap among context-conditioned teacher distributions at the current decoding position.

We design the weighting mechanism from two perspectives: conflict awareness and strength calibration. Conflict awareness strengthens corrections when context-conditioned teacher distributions are consistent and weakens them when they conflict through a function that decreases monotonically with . Strength calibration adjusts the effective range of correction strengths according to overall context consistency through either scaling or clipping. Scaling globally reduces correction strengths for less consistent contexts, whereas clipping controls the lower and upper bounds of strengths when contexts are more consistent.

Thus, we define the weight using the conflict term as an indicator as follows:

(20)

where is a scaling factor, is the conflict threshold, and define the clipping bounds. At each decoding position, the same weight is applied to the contextual correction of all vocabulary logits. Without strength calibration, we set , and .

4.4 Training Objective

In summary, Flux-OPD trains the student toward the reformulated target at each iteration by computing the reverse KL divergence between the student distribution and the corrected teacher distribution:

(21)
媒体内容 · 前往原文查看
Method VBench  Video-Bench 
Wan2.1-VACE-1.3B CogVideoX-2B Average Wan2.1-VACE-1.3B CogVideoX-2B Average
Quality Semantic Total Quality Semantic Total Quality Align Total Quality Align Total
Original 81.47 53.89 75.95 77.51 63.32 74.67 75.31 4.10 2.53 3.23 3.58 2.69 3.08 3.16
Teacher 82.52 77.34 81.48 78.15 75.81 77.68 79.58 4.43 3.18 3.74 3.92 3.06 3.44 3.59
Student 82.48 77.08 81.40 78.09 77.51 77.97 79.69 4.47 3.14 3.73 3.88 3.05 3.42 3.58
+ OPD 82.24 76.67 81.13 78.14 74.54 77.42 79.28 4.47 3.13 3.73 3.82 2.95 3.34 3.54
+ OPCD 82.42 76.23 81.18 77.74 73.31 76.85 79.02 4.48 3.14 3.74 3.84 3.04 3.40 3.57
+ OEL 80.98 77.36 80.26 76.07 63.05 73.46 76.86 4.26 3.06 3.60 3.46 2.66 3.01 3.31
\rowcolormyLightPurple  + Flux-OPD 82.64 80.70 82.25 78.19 77.78 78.11 80.18 4.54 3.16 3.77 3.93 3.08 3.45 3.61
Table 1: Results on the Prompt Optimization Task with a Qwen3-VL-Instruct 8B Teacher and 4B Student. The best and second-best student results are highlighted in bold and underlined, respectively.
媒体内容 · 前往原文查看
Method HealthBench 
Completeness Context Awareness Accuracy Communication Quality Instruction Following Total
Teacher 30.70 32.40 46.61 63.65 52.96 37.38
Student 11.34 20.14 29.40 40.84 40.23 19.06
+ OPD 13.01 21.13 29.10 39.79 38.80 19.63
+ OPCD 12.16 20.84 29.78 41.09 37.06 19.53
+ OEL 11.88 21.27 29.67 41.07 38.68 19.66
\rowcolormyLightPurple  + Flux-OPD 12.86 21.30 31.50 41.99 39.67 20.61
Table 2: Results on the Medical Question Answering Task with a Qwen3 8B Teacher and 1.7B Student. The best and second-best student results are highlighted in bold and underlined, respectively.

5 Experiments

5.1 Implementation Details

Models

We conduct experiments under different student-teacher settings: Qwen3-VL-Instruct [21] with a 4B student and an 8B teacher, Qwen2.5-VL-Instruct [4] with a 7B student and a 32B teacher, and Qwen3 with a 1.7B student and an 8B teacher. For each setting, the student is initialized from the SFT model trained on offline teacher-distilled outputs, while the teacher is the base model.

Baselines

We compare Flux-OPD with several OPD paradigms: (1) OPD [1], which distills teacher supervision on trajectories sampled from the current student policy; (2) OPCD [27], which conditions the teacher on privileged experience items as contexts; and (3) OEL [26], which equips the teacher with evolving contexts for continuous student improvement. All baselines are implemented in a single-run training setting.

Tasks

We focus on two open-ended tasks with real-world applicability: prompt optimization for video generation and medical question answering, both of which involve complex preferences and rely on rich contextual information. Prompt optimization rewrites imperfect user prompts into generator-aligned prompts, requiring not only text-level teacher supervision but also contexts that convey video-level preferences of a specific generator. Medical question answering spans diverse user queries and clinical workflows, where contexts help capture domain knowledge and interaction preferences.

Training Details

(1) Datasets. For prompt optimization, we use the 10K SFT prompts from VPO [5]. For medical question answering, we use RaR-Medicine [9], which contains approximately 18K questions paired with rubrics. (2) Context Extraction. Each context is extracted from student rollouts. At each iteration, we extract contexts using random seeds. For prompt optimization, we additionally generate downstream videos from student responses as supplements. For medical question answering, we use the paired rubrics as supplements. (3) Context Distillation. The OPCD and OEL baselines use the same initial contexts as Flux-OPD. For OEL and Flux-OPD, contexts are updated every steps.

媒体内容 · 前往原文查看
Method VBench 
Wan2.1-VACE-1.3B CogVideoX-2B Avg.
Qua. Sem. Total Qua. Sem. Total
Original 81.47 53.89 75.95 77.51 63.32 74.67 75.31
Teacher 82.53 78.39 81.70 78.79 79.21 78.87 80.29
Student 82.29 77.76 81.38 77.66 78.53 77.83 79.61
+ OPD 82.54 79.87 82.00 77.72 78.02 77.78 79.89
+ OPCD 82.10 79.15 81.51 78.22 76.02 77.78 79.65
+ OEL 82.12 80.08 81.71 78.12 76.44 77.78 79.75
\rowcolormyLightPurple  + Flux-OPD 82.82 80.01 82.26 78.51 77.01 78.21 80.24
Table 3: Results on the Prompt Optimization Task with a Qwen2.5-VL-Instruct 32B Teacher and 7B Student. The best and second-best student results are highlighted in bold and underlined, respectively. Qua.: Quality; Sem.: Semantic.
Refer to caption
Figure 4: Results across Three Independent Training Runs. Flux-OPD consistently outperforms OPD across all runs.

Evaluation Settings

(1) Prompt Optimization. We evaluate all methods using two downstream video generators from different model families, Wan2.1-VACE-1.3B and CogVideoX-2B [15, 24], on two video generation benchmarks: VBench and Video-Bench [11, 10]. VBench reports independent scores based on automatic metrics, whereas Video-Bench computes independent scores using GPT-4o. For VBench, we evaluate the 10 dimensions reported in prior works [5, 14]. (2) Medical Question Answering. We evaluate on HealthBench [2], which contains 5K clinical conversations to assess model safety and helpfulness in realistic medical scenarios.

5.2 Main Results

We train each baseline once and use the same seed across methods for each evaluation prompt. As shown in Tabs. 12, and 3, Flux-OPD achieves the best total scores across different student-teacher settings on two open-ended tasks. In medical question answering, where task preferences are primarily text-level, OPD improves over the initial policy and ranks second only to Flux-OPD. In contrast, in prompt optimization, where video-level feedback reflects real task preferences, OPD degrades the initial student policy. OPCD and OEL remain limited in leveraging contexts, and both degrade the initial policy on prompt optimization.

Moreover, we conduct three independent training runs for OPD and Flux-OPD. As shown in Fig. 4, Flux-OPD consistently outperforms OPD on VBench with CogVideoX-2B and on HealthBench.

媒体内容 · 前往原文查看
Variant Evolving Contexts Contextual Correction Contextual Weighting Score
V1 Eq. (20) 19.63
OEL 19.66
V2 19.73
20.03
19.97
\rowcolormyLightPurple Full Eq. (20) 20.61
Table 4: Ablation Study of Flux-OPD on HealthBench. denotes the correction strength.
Refer to caption
Figure 5: (a) Training Stability. The training losses of OPD and Flux-OPD decrease steadily, whereas OEL exhibits loss surges. Flux-OPD also maintains a stable gradient norm. (b) Out-of-Distribution Performance on IF-Eval. Flux-OPD achieves the highest prompt-level strict accuracy, outperforming OPD and suggesting better cross-domain generalization.

5.3 Ablation and Parameter Study

Effects of Evolving Contexts

As shown in Tab. 4, full Flux-OPD outperforms V1, the variant w/o evolving contexts, demonstrating that contexts evolving with student performance improve the student more effectively under the same number of training steps.

Effects of Contextual Correction

Contextual correction strategy corrects the target by combining the context-free teacher and contextual difference signals from context-conditioned teachers. As shown in Tab. 4, both OEL and V2 have evolving contexts, while V2, equipped with contextual correction, consistently outperforms OEL under all three correction strengths. This demonstrates the effectiveness of using context-conditioned teachers as contextual difference signals rather than direct distillation targets.

Effects of Contextual Weighting

Contextual weighting strategy adjusts correction strengths using the conflict term in Eq.(20) as an indicator to downweight conflicting distributions. As shown in Tab. 4, full Flux-OPD outperforms the V2 variant trained with each of the three static strengths, showing that the weighting strategy guides the student toward a more effective distillation target.

媒体内容 · 前往原文查看
Method Wan2.1-VACE-1.3B CogVideoX-2B
Teacher - 81.48 77.68
Student - 81.40 77.97
Flux-OPD 0.1 \cellcolormyLightPurple82.25 77.62
0.2 81.24 \cellcolormyLightPurple78.11
Table 5: Parameter Study of the Conflict Threshold . Results on VBench with a Qwen3-VL-Instruct 8B teacher and 4B student.

Parameter Study of Conflict Threshold

The conflict threshold controls the correction strength according to the conflict among context-conditioned teachers. We use by default and increase it slightly to when the initial student outperforms the teacher, allowing contexts to exert greater influence. For example, in Tab. 1, the student underperforms the teacher with Wan2.1-VACE-1.3B but outperforms it with CogVideoX-2B. As shown in Tab. 5, the higher threshold benefits CogVideoX-2B because contexts provide additional supervision beyond the context-free teacher.

Refer to caption
Figure 6: Conflict Dynamics. Results with Wan2.1-VACE-1.3B on the prompt optimization task.

Parameter Study of Strength Calibration

We adjust the effective range of correction strengths according to overall context consistency through either scaling or clipping, as described in Sec. 4.3. We use scaling for generally less consistent contexts, setting to uniformly reduce their influence. In contrast, we use clipping for more consistent contexts to control the lower and upper bounds of correction strengths. As shown in Fig. 6, the stronger 32B teacher setting exhibits lower conflict values than the 8B teacher setting, indicating generally higher context consistency. As shown in Tab. 6, scaling performs best with the 8B teacher, indicating that its contexts benefit from a moderate global reduction in influence. In contrast, clipping performs best with the stronger 32B teacher, whose more consistent contexts benefit from correction strengths constrained to a specified range.

媒体内容 · 前往原文查看
Teacher Calibration Student
Qwen3-VL -Instruct-8B \cellcolormyLightPurpleScaling \cellcolormyLightPurple0.9 \cellcolormyLightPurple \cellcolormyLightPurple82.25
- 1 81.67
Clipping 1 81.61
Qwen2.5-VL -Instruct-32B Scaling 0.9 81.40
- 1 81.74
\cellcolormyLightPurpleClipping \cellcolormyLightPurple1 \cellcolormyLightPurple \cellcolormyLightPurple82.26
Table 6: Parameter Study of Strength Calibration. Results with Wan2.1-VACE-1.3B on VBench.

5.4 Discussion

Stability

As shown in Fig. 5(a), the training loss of Flux-OPD decreases steadily, similar to OPD, whereas OEL exhibits abrupt loss surges when contexts are updated between iterations. OEL also shows larger fluctuations in the gradient norm near context updates.

Generalization

We evaluate out-of-distribution instruction following performance on IF-Eval [29] after training on medical question answering. As shown in Fig. 5(b), Flux-OPD achieves higher prompt-level strict accuracy than OPD, suggesting better cross-domain generalization.

6 Conclusion

We propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains. We analyze the effect of contexts through a decomposition of the reverse KL objective and address unstable distillation targets and conflicting distributions by anchoring distillation to the context-free teacher, injecting contextual difference signals, and weighting them according to conflicts among teachers. These results highlight the potential to combine teacher supervision with evolving contexts.

References

  • [1] R. Agarwal, N. Vieillard, Y. Zhou, P. Stanczyk, S. Ramos Garea, M. Geist, and O. Bachem (2024) On-policy distillation of language models: learning from self-generated mistakes. In International Conference on Learning Representations, Vol. 2024, pp. 21246–21263. Cited by: §1, §2.1, §5.1.
  • [2] R. K. Arora, J. Wei, R. S. Hicks, P. Bowman, J. Quiñonero-Candela, F. Tsimpourlas, M. Sharman, M. Shah, A. Vallone, A. Beutel, et al. (2025) Healthbench: evaluating large language models towards improved human health. arXiv preprint arXiv:2505.08775. Cited by: §5.1.
  • [3] A. Askell, Y. Bai, A. Chen, D. Drain, D. Ganguli, T. Henighan, A. Jones, N. Joseph, B. Mann, N. DasSarma, et al. (2021) A general language assistant as a laboratory for alignment. arXiv preprint arXiv:2112.00861. Cited by: §1, §2.2.
  • [4] S. Bai, K. Chen, X. Liu, J. Wang, W. Ge, S. Song, K. Dang, P. Wang, S. Wang, J. Tang, et al. (2025) Qwen2. 5-vl technical report. arXiv preprint arXiv:2502.13923. Cited by: §5.1.
  • [5] J. Cheng, R. Lyu, X. Gu, X. Liu, J. Xu, Y. Lu, J. Teng, Z. Yang, Y. Dong, J. Tang, et al. (2025) Vpo: aligning text-to-video generation models with prompt optimization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15636–15645. Cited by: Appendix D, §5.1, §5.1.
  • [6] Y. Fu, H. Huang, K. Jiang, J. Liu, Z. Jiang, Y. Zhu, and D. Zhao (2026) Revisiting on-policy distillation: empirical failure modes and simple fixes. arXiv preprint arXiv:2603.25562. Cited by: §2.1.
  • [7] Y. Gu, L. Dong, F. Wei, and M. Huang (2024) Minillm: knowledge distillation of large language models. In The twelfth international conference on learning representations, Cited by: §2.1.
  • [8] A. Gudibande, E. Wallace, C. Snell, X. Geng, H. Liu, P. Abbeel, S. Levine, and D. Song (2023) The false promise of imitating proprietary llms. arXiv preprint arXiv:2305.15717. Cited by: §2.1.
  • [9] A. Gunjal, A. Wang, E. Lau, V. Nath, Y. He, B. Liu, and S. Hendryx (2025) Rubrics as rewards: reinforcement learning beyond verifiable domains. arXiv preprint arXiv:2507.17746. Cited by: §1, §2.1, §5.1.
  • [10] H. Han, S. Li, J. Chen, Y. Yuan, Y. Wu, Y. Deng, C. T. Leong, H. Du, J. Fu, Y. Li, et al. (2025) Video-bench: human-aligned video generation benchmark. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 18858–18868. Cited by: Appendix D, §5.1.
  • [11] Z. Huang, Y. He, J. Yu, F. Zhang, C. Si, Y. Jiang, Y. Zhang, T. Wu, Q. Jin, N. Chanpaisit, et al. (2024) Vbench: comprehensive benchmark suite for video generative models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 21807–21818. Cited by: Appendix D, §5.1.
  • [12] J. Hübotter, F. Lübeck, L. Behric, A. Baumann, M. Bagatella, D. Marta, I. Hakimi, I. Shenfeld, T. K. Buening, C. Guestrin, and A. Krause (2026) Reinforcement learning via self-distillation. CoRR abs/2601.20802. Cited by: §2.1.
  • [13] J. L. W. V. Jensen (1906) Sur les fonctions convexes et les inégalités entre les valeurs moyennes. Acta mathematica 30 (1), pp. 175–193. Cited by: §3.2.
  • [14] Y. Ji, J. Zhang, J. Wu, S. Zhang, S. Chen, C. Ge, P. Sun, W. Chen, W. Shao, X. Xiao, et al. (2025) Prompt-a-video: prompt your video diffusion model via preference-aligned llm. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 18725–18735. Cited by: Appendix D, §5.1.
  • [15] Z. Jiang, Z. Han, C. Mao, J. Zhang, Y. Pan, and Y. Liu (2025) Vace: all-in-one video creation and editing. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 17191–17202. Cited by: §5.1.
  • [16] K. Lu and T. M. Lab (2025) On-policy distillation. Thinking Machines Lab: Connectionism. Note: https://thinkingmachines.ai/blog/on-policy-distillation External Links: Document Cited by: §1.
  • [17] J. Schulman and T. M. Lab (2025) LoRA without regret. Thinking Machines Lab: Connectionism. Note: https://thinkingmachines.ai/blog/lora/ External Links: Document Cited by: §1.
  • [18] Z. Shao, P. Wang, Q. Zhu, R. Xu, J. Song, X. Bi, H. Zhang, M. Zhang, Y. Li, Y. Wu, et al. (2024) Deepseekmath: pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300. Cited by: §1.
  • [19] C. Snell, D. Klein, and R. Zhong (2022) Learning by distilling context. CoRR abs/2209.15189. External Links: Link, Document, 2209.15189 Cited by: §2.2.
  • [20] H. Xiao, J. Li, Z. Li, X. Li, S. Li, and J. Han (2026) Structuring human objectives: a survey of rubrics for evaluation, alignment, and agentic ai. Alignment, and Agentic AI (June 20, 2026). Cited by: §1, §2.1.
  • [21] A. Yang, A. Li, B. Yang, B. Zhang, B. Hui, B. Zheng, B. Yu, C. Gao, C. Huang, C. Lv, et al. (2025) Qwen3 technical report. arXiv preprint arXiv:2505.09388. Cited by: §5.1.
  • [22] C. Yang, C. Qin, Q. Si, M. Chen, N. Gu, D. Yao, Z. Lin, W. Wang, J. Wang, and N. Duan (2026) Self-distilled rlvr. arXiv preprint arXiv:2604.03128. Cited by: §2.1, §3.2.
  • [23] W. Yang, W. Liu, R. Xie, K. Yang, S. Yang, and Y. Lin (2026) Learning beyond teacher: generalized on-policy distillation with reward extrapolation. arXiv preprint arXiv:2602.12125. Cited by: §2.1.
  • [24] Z. Yang, J. Teng, W. Zheng, M. Ding, S. Huang, J. Xu, Y. Yang, W. Hong, X. Zhang, G. Feng, et al. (2025) Cogvideox: text-to-video diffusion models with an expert transformer. In International Conference on Learning Representations, Vol. 2025, pp. 83048–83077. Cited by: §5.1.
  • [25] T. Ye, L. Dong, G. Chen, H. Zhu, X. Wu, S. Huang, and F. Wei (2026) LLM-as-a-coach: experiential learning for non-verifiable tasks. arXiv preprint arXiv:2607.18110. Cited by: §1.
  • [26] T. Ye, L. Dong, Q. Dong, X. Wu, S. Huang, and F. Wei (2026) Online experiential learning for language models. arXiv preprint arXiv:2603.16856. Cited by: §1, §2.2, §4.1, §5.1.
  • [27] T. Ye, L. Dong, X. Wu, S. Huang, and F. Wei (2026) On-policy context distillation for language models. arXiv preprint arXiv:2602.12275. Cited by: §1, §2.2, §4.1, §5.1.
  • [28] S. Zhao, Z. Xie, M. Liu, J. Huang, G. Pang, F. Chen, and A. Grover (2026) Self-distilled reasoner: on-policy self-distillation for large language models. arXiv preprint arXiv:2601.18734. Cited by: §2.1.
  • [29] J. Zhou, T. Lu, S. Mishra, S. Brahma, S. Basu, Y. Luan, D. Zhou, and L. Hou (2023) Instruction-following evaluation for large language models. External Links: 2311.07911, Link Cited by: §5.4.

Appendix

Appendix A Prompt Template

All prompts are intentionally concise and require minimal human engineering. They contain no human-crafted domain knowledge, allowing the models to rely on their own capabilities.

A.1 Context Extraction Prompt

Figs. 7 and 8 show the context extraction prompts used by OPCD, OEL, and Flux-OPD for the prompt optimization and medical question answering tasks. These prompts extract new experience items beyond the existing ones.

A.2 Context Distillation Prompt

Figs. 9 and 10 show the in-context learning prompts used by context-conditioned teachers in OPCD, OEL, and Flux-OPD for the prompt optimization and medical question answering tasks.

A.3 System Prompt

Fig. 11 shows the system prompt used for offline SFT data construction, student training, and evaluation in the prompt optimization task. We do not use an explicit system prompt for the medical question answering task.

Appendix B Context Example

Figs. 12 and 13 show context examples from OPCD, OEL, and Flux-OPD for the prompt optimization and medical question answering tasks.

Appendix C Additional Training Details

C.1 Hyperparameters

General Hyperparameters

For each training paradigm, we use a batch size of and a learning rate of . SFT runs for epochs, while the other paradigms run for epochs. For computational efficiency, the implemented distillation loss retains the top- target logits and renormalizes them over the selected tokens. All experiments are conducted on 8 NVIDIA A800 GPUs.

Hyperparameters of Flux-OPD

We list the hyperparameters of Flux-OPD in Tab. 7. The corresponding evaluation scores are reported in Tabs. 1, 2, and 3 of the main paper.

C.2 Training Pseudocode of Flux-OPD

The full training procedure of Flux-OPD is summarized in Algorithm 1. Flux-OPD performs a single continuous training run over multiple iterations. In each iteration, it first extracts contexts from trajectories generated by the current student and then distills contextual difference signals into a context-free teacher anchor. The correction strength is adjusted according to the conflict among context-conditioned teacher distributions.

C.3 Conflict Dynamics

We use the conflict metric to monitor distributional disagreement among context-conditioned teachers during training. For each response token position, the teacher is queried under multiple sampled contexts, producing multiple context-conditioned token distributions. These distributions are combined through a geometric mean in log-probability space. A larger conflict value indicates lower distributional overlap and stronger disagreement among context-conditioned teachers. We report the average conflict over valid response tokens at each training step.

As shown in Fig. 14, the two prompt optimization settings with the Qwen3-VL-Instruct 8B teacher exhibit substantially higher conflict values, indicating lower overlap among context-conditioned teacher distributions and thus lower overall context consistency. In contrast, the two settings with the stronger Qwen2.5-VL-Instruct 32B teacher maintain markedly lower conflict values. This difference is consistent with a stronger teacher producing more stable token preferences across sampled contexts and, consequently, more consistent context-conditioned distributions.

The medical question answering setting also uses an 8B teacher but exhibits low conflict values comparable to those of the 32B prompt optimization settings. This may be attributed to the use of rubrics as optional supplements during context extraction, which provide a standard reference and may improve the consistency of the resulting contexts.

These results suggest that overall context consistency depends not only on teacher capability but also on the optional supplements available during context extraction.

Appendix D Additional Evaluation Details

For the prompt optimization task, we evaluate the 10 VBench dimensions [11] reported in prior works [5, 14]. The quality dimensions include Subject Consistency, Background Consistency, Motion Smoothness, Dynamic Degree, Aesthetic Quality, and Image Quality, while the semantic dimensions include Multiple Objects, Human Action, Scene, and Appearance Style. These dimensions cover 523 prompts in total. We evaluate all quality and alignment dimensions of the full Video-Bench [10], covering 419 prompts.

Refer to caption
Figure 7: Prompt for Context Extraction in the Prompt Optimization Task.
Refer to caption
Figure 8: Prompt for Context Extraction in the Medical Question Answering Task.
Refer to caption
Figure 9: Prompt for Context Distillation in the Prompt Optimization Task.
Refer to caption
Figure 10: Prompt for Context Distillation in the Medical Question Answering Task.
Refer to caption
Figure 11: System Prompt for the Prompt Optimization Task.
Refer to caption
Figure 12: Context Example for the Prompt Optimization Task.
Refer to caption
Figure 13: Context Example for the Medical Question Answering Task.
媒体内容 · 前往原文查看
Algorithm 1 Flux-OPD Training
0: Training prompts , student , frozen teacher , environment , context extraction prompt , context teacher prompt , iterations , rollouts , extraction seeds , distillation contexts , scaling factor , conflict threshold , clipping bounds , and top- size.
0: Trained student .
1:for do
2:  Context extraction.
3:  Sample from and collect trajectories
4:  for do
5:   Sequentially extract context from using and with seed .
6:  end for
7:  Construct the context pool .
8:  Context distillation.
9:  for each mini-batch in iteration do
10:   Sample from .
11:   Compute the context-free teacher distribution .
12:   Compute context-conditioned teacher distributions
13:   Compute the unnormalized geometric mean and conflict:
14:   Compute the contextual weight:
15:   Construct the distillation target:
16:   Retain and renormalize the top- target probabilities.
17:   Update using
18:  end for
19:end for
20:return .
媒体内容 · 前往原文查看
Task Student & Teacher Downstream Model Calibration
Prompt Optimization Qwen3-VL-Instruct 8B4B Wan2.1-VACE-1.3B 0.1 Scaling,
CogVideoX-2B 0.2 Scaling,
Qwen2.5-VL-Instruct 32B7B Wan2.1-VACE-1.3B 0.1 Clipping,
CogVideoX-2B 0.1 Clipping,
Medical Question Answering Qwen3 8B1.7B - 0.1 Clipping,
Table 7: Additional Hyperparameters of Flux-OPD.
Refer to caption
Figure 14: Conflict Dynamics. The prompt optimization settings with the 8B teacher exhibit higher conflict values, whereas those with the stronger 32B teacher show higher overall context consistency. Despite using an 8B teacher, medical question answering also maintains low conflict, potentially because task-specific rubrics serve as optional supplements during context extraction.

Flux-OPD:用演化上下文进行在线策略蒸馏

HuggingFace Daily Papers(社区热门论文)·2026-07-30 08:00·1天前
阅读原文· arxiv.org
AI 摘要

Flux-OPD 提出一种新的在线策略蒸馏(OPD)范式,利用随学生表现演化的上下文作为训练监督,以捕捉开放领域中的任务偏好。该方法通过反向 KL 目标分解,将上下文条件教师与无上下文教师的差异作为上下文校正信号注入,并用冲突项加权校正强度。实验表明,Flux-OPD 在开放任务上优于现有 OPD 范式。

原文 · 保持原样,未翻译

Yuran Wang

, Zekun Wang

, Bohan Zeng

, Ruixu Zhang

, Wenxuan Liu

, Liu Yang

Yifan Dai

, Bozhou Li

, Chengzhuo Tong

, Daili Hua

Kling Team,

Beijing Key Laboratory of Data Intelligence and Security (Peking University)

Corresponding Author: wentao.zhang@pku.edu.cn

Abstract

Large language model training in open-ended domains lacks verifiable rewards, making task preferences difficult to formalize as effective supervision. Contexts can convey such preferences, yet provide little additional supervision once distilled into the student, motivating contexts that evolve with student performance. However, directly using evolving contexts as in-training supervision results in an unstable distillation target and conflicting distributions, requiring mechanisms to stabilize target and downweight conflicts. In this paper, we analyze the effect of contexts through a decomposition of the reverse KL objective, revealing two findings: the student is distilled toward the geometric mean of context-conditioned teachers, and the objective contains a conflict term that measures conflicts among these teachers. Based on this decomposition, we propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains. Flux-OPD treats the differences between context-conditioned and context-free teachers as contextual difference signals, injects them as contextual corrections into the context-free teacher anchor, and weights their correction strength using the conflict term as an indicator. Experiments on open-ended tasks show that Flux-OPD outperforms existing OPD paradigms, highlighting the potential to combine teacher supervision with evolving contexts.

1 Introduction

Refer to caption
Figure 1: Motivations. (a) OPCD underperforms OPD on HealthBench, while OEL does not yield consistent gains. (b) Evolving contexts cause loss surges, and conflicts among them produce conflicting target distributions.

Large language models achieve remarkable progress through Reinforcement Learning with Verifiable Rewards in verifiable domains [18]. However, open-ended domains often lack verifiable rewards, making it difficult to formalize supervision signals that effectively capture task preferences. Rubrics-as-Rewards [9, 20] uses rubrics as supervision but still provides sparse feedback, limiting its effectiveness in capturing complex preference priors [25, 16, 17].

An alternative is to use contexts as supervision signals. Context Distillation and On-Policy Context Distillation (OPCD) [3, 27] distill the student toward a context-conditioned teacher, enabling it not only to benefit from dense teacher supervision, as in vanilla On-Policy Distillation (OPD) [1], but also to directly learn behaviors that the teacher exhibits after observing the contexts. Thus, explicit contexts can convey task preferences that are difficult to formalize in open-ended domains. However, we find that directly distilling toward the context-conditioned teacher (OPCD) underperforms distilling toward the context-free teacher (OPD), as shown in Fig. 1. We attribute this gap to contexts extracted before training: once their information is distilled into student, they contribute little additional supervision. This motivates us to evolve contexts with student performance, enabling continuous student improvement.

The key challenge is to incorporate evolving contexts as supervision signals throughout training without disrupting optimization. Online Experiential Learning (OEL) [26] alternates between deployment and OPCD training, accumulating experience items from extensive student trajectories as contexts. To provide in-training supervision, we extend this paradigm to a single training run, using only a small set of trajectories at each update to provide timely feedback on the current student. However, as shown in Fig. 1, evolving contexts do not yield consistent gains. Each update abruptly shifts the target distribution, causing loss surges and destabilizing training. Moreover, conflicting contexts can produce conflicting target distributions. These observations motivate us to stabilize the distillation target and downweight conflicting distributions.

To better leverage contexts, we analyze their effect on the reverse KL objective in the OPCD paradigm. We show that this objective can be equivalently decomposed into a distillation term and a conflict term. The former computes the KL divergence between the student and the geometric mean of context-conditioned teacher distributions, while the latter measures conflicts among these teachers. Conditioned on fixed sampled histories, the decomposition shows that the conflict term contributes no direct gradient, leaving the distillation term as the directly optimized component of the conditional objective.

Based on this decomposition, we propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains. Flux-OPD is an iterative training process that divides a single training run into multiple iterations, each comprising context extraction and context distillation. The teacher extracts contexts from student trajectories during context extraction and conditions on these contexts during context distillation.

We design two distillation strategies: contextual correction and contextual weighting. To stabilize the distillation target, the contextual correction strategy anchors it to the stable context-free teacher and injects contextual difference signals that capture task preferences from evolving contexts, rather than directly treating context-conditioned teachers as distillation targets. Contextual difference signals are defined as the differences between the context-conditioned and context-free teachers. To downweight conflicting distributions, the contextual weighting strategy adjusts the correction strength using the conflict term as an indicator, strengthening corrections when context-conditioned distributions are consistent and weakening them when they conflict.

We evaluate our method on two open-ended tasks with real-world applicability: prompt optimization for video generation and medical question answering, both of which involve complex preferences and rely on rich contextual information. Results show that Flux-OPD outperforms existing OPD paradigms on both tasks across different student-teacher settings. Our contributions are threefold:

  • We analyze the effect of contexts through a reverse KL decomposition, showing that the student is distilled toward the geometric mean of the context-conditioned teachers and that the objective contains a conflict term measuring conflicts among them.

  • We propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains.

  • Experiments on open-ended tasks show that Flux-OPD outperforms existing OPD paradigms, highlighting the potential to combine teacher supervision with evolving contexts as in-training supervision.

2 Related Works

2.1 Open-Ended Reward Modeling

Large language model training in open-ended domains lacks verifiable rewards, making task preferences difficult to formalize as effective supervision. Reinforcement Learning with Verifiable Rewards (RLVR) compresses these preferences into coarse outcomes. Rubrics-as-Rewards (RaR) [9, 20] uses rubrics as structured supervision signals but still provides sparse feedback. On-Policy Distillation (OPD) trains on trajectories sampled from the current student policy and provides dense teacher supervision [1, 28, 12, 6, 7], but its supervision primarily reflects teacher preferences rather than real task preferences [8, 22, 23]. Flux-OPD complements teacher supervision by using evolving contexts as in-training supervision to capture task preferences.

2.2 Context Distillation

Context Distillation [3, 19] distills a student from a context-conditioned teacher, enabling it to learn behaviors that the teacher exhibits after observing the contexts. On-Policy Context Distillation (OPCD) [27] further samples from the current student, reducing the mismatch between offline data and the student’s generation distribution. Although contexts can convey task preferences that are difficult to formalize in open-ended domains, contexts fixed before training cannot adapt to the evolving student. OEL [26] alternates between deployment and OPCD training, updating contexts between runs. Directly extending this paradigm to a single continuous run results in an unstable distillation target and conflicting distributions. Flux-OPD instead uses evolving contexts as in-training supervision by distilling contextual difference signals into a context-free anchor rather than fully imitating context-conditioned teachers.

3 Preliminaries

3.1 Paradigms

In vanilla On-Policy Distillation (OPD), given a user prompt , the student autoregressively generates a response . Let denote the decoding history and the vocabulary. At step , the student and teacher distributions are defined as

(1)

In On-Policy Context Distillation (OPCD), the teacher additionally receives a privileged context , while the student observes only . The context-conditioned teacher distribution is

(2)

Training minimizes the reverse KL under on-policy histories:

(3)

For simplicity, fixing and omitting the condition gives

(4)

3.2 KL Decomposition

For a fixed decoding history at step , let and . We omit for readability.

Forward KL

Prior work [22] decomposes the forward KL objective into a distillation term toward a marginal teacher and a mutual information term:

(5)

where the marginal teacher is defined as

(6)

Thus, under forward KL, the student is distilled toward the arithmetic mean of context-conditioned teachers.

Reverse KL

We analyze the context effect through the reverse KL objective in Eq.(4).

Refer to caption
Figure 2: Applying the Reverse KL Decomposition to Training with Evolving Contexts. At each iteration, the objective decomposes into a distillation term and a conflict term. (a) Evolving contexts cause shifts in context-conditioned teacher distributions, destabilizing training. (b) The conflict term captures conflicts among context-conditioned teachers, contributes to the loss, and varies with the sampled histories and contexts rather than through direct optimization.
Refer to caption
Figure 3: Overview of Flux-OPD. (a) illustrates the iterative training process, which divides a single training run into iterations, each consisting of context extraction and context distillation. (b) illustrates the contextual correction strategy, which corrects the distillation target by combining the context-free teacher distribution with contextual difference signals from context-conditioned teachers. (c) illustrates the contextual weighting strategy, which further adjusts correction strengths using the conflict term as an indicator, strengthening corrections when context-conditioned teacher distributions are consistent and weakening them when they conflict.
Proposition 1(Reverse KL Decomposition).

For a fixed decoding history, let and be distributions over the same vocabulary , where for every context and token . Let denote expectation with respect to a fixed context distribution. Define the normalized geometric mean of context-conditioned teachers and its normalization constant as

(7)

Then, the reverse KL objective decomposes as

(8)
Proof.

Expanding the reverse KL objective gives

(9)

According to Eq.(7),

(10)

Substituting this relation into Eq. (9) yields

(11)

which gives Eq. (8).

Moreover, by Jensen’s inequality [13],

(12)

Therefore, . ∎

Under reverse KL, the student is thus distilled toward the normalized geometric mean of context-conditioned teachers, rather than the arithmetic mean under forward KL. The geometric mean assigns high probability only to tokens that receive consistently high probability across contexts. Moreover, the conflict term measures the distributional disagreement among these teachers: lower distributional overlap decreases and increases .

Corollary 1(Gradient Independence of the Conflict Term).

For fixed decoding histories, a fixed context distribution, and fixed context-conditioned teacher distributions, the conflict term is independent of the current student token distribution. Therefore, it contributes no direct gradient with respect to the student parameters through .

Thus, only the distillation term is directly optimized in the conditional objective, and the geometric mean of context-conditioned teachers serves as distillation target.

We apply the fixed-history decomposition above to analyze training with evolving contexts. Fig. 2(a) visualizes the mean output embeddings of different distillation targets, showing that context-conditioned teachers undergo large shifts, whereas the context-free teacher remains stable. Moreover, as shown in Fig. 2(b), variations in the conflict value reflect changes in the sampled histories and context pools across iterations rather than direct optimization of the conflict term.

4 Method

We propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains. As shown in Fig. 3, it is an iterative training process including two distillation strategies: contextual correction and contextual weighting.

4.1 Iterative Training

To enable continuous student improvement, we evolve contexts with student performance. We update contexts within a single training run, using a small set of trajectories at each update to provide timely feedback on the current student.

These evolving contexts makes the training a iterative process that divides a single training run into iterations, each consisting of context extraction and context distillation. As shown in Fig. 3(a), the teacher extracts contexts from student trajectories during context extraction and conditions on these contexts during context distillation.

Context Extraction

Following existing context distillation methods [27, 26], contexts consist of experience items extracted from student interaction trajectories. At the beginning of iteration , we collect trajectories from the previous student policy :

(13)

where is the user prompt, is the student response and optional supplements, such as downstream video result generated from in prompt optimization task and rubrics in medical question answering task. For the first iteration, user prompts are randomly sampled from the entire training set. For subsequent iterations, they are randomly sampled from the training data seen in the previous iteration.

Given each trajectory, the teacher extracts new experience items that differ from existing ones and accumulate them with previous experience items to form a complete context. This process is repeated for turns with different random seeds, yielding a context pool:

(14)

Context Distillation

Contexts sampled from the context pool condition the teacher, allowing the target distribution to evolve with the current student performance. Considering the context-free teacher provides a stable anchor for the base optimization target, while the conflict term indicates conflicting context-conditioned teacher supervision, we stabilize distillation through contextual correction and contextual weighting.

4.2 Contextual Correction

To stabilize the distillation target, the contextual correction strategy anchors it to the stable context-free teacher and injects contextual difference signals that capture task preferences from evolving contexts, rather than directly using context-conditioned teachers as distillation targets, as shown in Fig. 3(b).

For iteration , at each response position, we first compute the normalized geometric mean of context-conditioned teachers:

(15)
(16)

Since the context-conditioned teacher is constructed in log-probability space, we compute the contextual difference signal relative to the context-free teacher , as

(17)

The final corrected teacher distribution is then obtained through log-space interpolation:

(18)

where controls the strength of contextual correction. When , the target reduces to the context-free teacher ; when , it recovers the context-conditioned teacher . Thus, the context-free teacher provides a stable anchor, while the contextual difference signal injects task preferences derived from contexts.

4.3 Contextual Weighting

To downweight conflicting distributions, the contextual weighting strategy adjusts the correction strength using the conflict term as an indicator, as shown in Fig. 3(c).

From the reverse KL decomposition in Eq.(8), the conflict term measures distributional disagreement among context-conditioned teachers. Motivated by this observation, we use it as a signal to adjust the correction strength:

(19)

where a larger indicates lower overlap among context-conditioned teacher distributions at the current decoding position.

We design the weighting mechanism from two perspectives: conflict awareness and strength calibration. Conflict awareness strengthens corrections when context-conditioned teacher distributions are consistent and weakens them when they conflict through a function that decreases monotonically with . Strength calibration adjusts the effective range of correction strengths according to overall context consistency through either scaling or clipping. Scaling globally reduces correction strengths for less consistent contexts, whereas clipping controls the lower and upper bounds of strengths when contexts are more consistent.

Thus, we define the weight using the conflict term as an indicator as follows:

(20)

where is a scaling factor, is the conflict threshold, and define the clipping bounds. At each decoding position, the same weight is applied to the contextual correction of all vocabulary logits. Without strength calibration, we set , and .

4.4 Training Objective

In summary, Flux-OPD trains the student toward the reformulated target at each iteration by computing the reverse KL divergence between the student distribution and the corrected teacher distribution:

(21)
媒体内容 · 前往原文查看
Method VBench  Video-Bench 
Wan2.1-VACE-1.3B CogVideoX-2B Average Wan2.1-VACE-1.3B CogVideoX-2B Average
Quality Semantic Total Quality Semantic Total Quality Align Total Quality Align Total
Original 81.47 53.89 75.95 77.51 63.32 74.67 75.31 4.10 2.53 3.23 3.58 2.69 3.08 3.16
Teacher 82.52 77.34 81.48 78.15 75.81 77.68 79.58 4.43 3.18 3.74 3.92 3.06 3.44 3.59
Student 82.48 77.08 81.40 78.09 77.51 77.97 79.69 4.47 3.14 3.73 3.88 3.05 3.42 3.58
+ OPD 82.24 76.67 81.13 78.14 74.54 77.42 79.28 4.47 3.13 3.73 3.82 2.95 3.34 3.54
+ OPCD 82.42 76.23 81.18 77.74 73.31 76.85 79.02 4.48 3.14 3.74 3.84 3.04 3.40 3.57
+ OEL 80.98 77.36 80.26 76.07 63.05 73.46 76.86 4.26 3.06 3.60 3.46 2.66 3.01 3.31
\rowcolormyLightPurple  + Flux-OPD 82.64 80.70 82.25 78.19 77.78 78.11 80.18 4.54 3.16 3.77 3.93 3.08 3.45 3.61
Table 1: Results on the Prompt Optimization Task with a Qwen3-VL-Instruct 8B Teacher and 4B Student. The best and second-best student results are highlighted in bold and underlined, respectively.
媒体内容 · 前往原文查看
Method HealthBench 
Completeness Context Awareness Accuracy Communication Quality Instruction Following Total
Teacher 30.70 32.40 46.61 63.65 52.96 37.38
Student 11.34 20.14 29.40 40.84 40.23 19.06
+ OPD 13.01 21.13 29.10 39.79 38.80 19.63
+ OPCD 12.16 20.84 29.78 41.09 37.06 19.53
+ OEL 11.88 21.27 29.67 41.07 38.68 19.66
\rowcolormyLightPurple  + Flux-OPD 12.86 21.30 31.50 41.99 39.67 20.61
Table 2: Results on the Medical Question Answering Task with a Qwen3 8B Teacher and 1.7B Student. The best and second-best student results are highlighted in bold and underlined, respectively.

5 Experiments

5.1 Implementation Details

Models

We conduct experiments under different student-teacher settings: Qwen3-VL-Instruct [21] with a 4B student and an 8B teacher, Qwen2.5-VL-Instruct [4] with a 7B student and a 32B teacher, and Qwen3 with a 1.7B student and an 8B teacher. For each setting, the student is initialized from the SFT model trained on offline teacher-distilled outputs, while the teacher is the base model.

Baselines

We compare Flux-OPD with several OPD paradigms: (1) OPD [1], which distills teacher supervision on trajectories sampled from the current student policy; (2) OPCD [27], which conditions the teacher on privileged experience items as contexts; and (3) OEL [26], which equips the teacher with evolving contexts for continuous student improvement. All baselines are implemented in a single-run training setting.

Tasks

We focus on two open-ended tasks with real-world applicability: prompt optimization for video generation and medical question answering, both of which involve complex preferences and rely on rich contextual information. Prompt optimization rewrites imperfect user prompts into generator-aligned prompts, requiring not only text-level teacher supervision but also contexts that convey video-level preferences of a specific generator. Medical question answering spans diverse user queries and clinical workflows, where contexts help capture domain knowledge and interaction preferences.

Training Details

(1) Datasets. For prompt optimization, we use the 10K SFT prompts from VPO [5]. For medical question answering, we use RaR-Medicine [9], which contains approximately 18K questions paired with rubrics. (2) Context Extraction. Each context is extracted from student rollouts. At each iteration, we extract contexts using random seeds. For prompt optimization, we additionally generate downstream videos from student responses as supplements. For medical question answering, we use the paired rubrics as supplements. (3) Context Distillation. The OPCD and OEL baselines use the same initial contexts as Flux-OPD. For OEL and Flux-OPD, contexts are updated every steps.

媒体内容 · 前往原文查看
Method VBench 
Wan2.1-VACE-1.3B CogVideoX-2B Avg.
Qua. Sem. Total Qua. Sem. Total
Original 81.47 53.89 75.95 77.51 63.32 74.67 75.31
Teacher 82.53 78.39 81.70 78.79 79.21 78.87 80.29
Student 82.29 77.76 81.38 77.66 78.53 77.83 79.61
+ OPD 82.54 79.87 82.00 77.72 78.02 77.78 79.89
+ OPCD 82.10 79.15 81.51 78.22 76.02 77.78 79.65
+ OEL 82.12 80.08 81.71 78.12 76.44 77.78 79.75
\rowcolormyLightPurple  + Flux-OPD 82.82 80.01 82.26 78.51 77.01 78.21 80.24
Table 3: Results on the Prompt Optimization Task with a Qwen2.5-VL-Instruct 32B Teacher and 7B Student. The best and second-best student results are highlighted in bold and underlined, respectively. Qua.: Quality; Sem.: Semantic.
Refer to caption
Figure 4: Results across Three Independent Training Runs. Flux-OPD consistently outperforms OPD across all runs.

Evaluation Settings

(1) Prompt Optimization. We evaluate all methods using two downstream video generators from different model families, Wan2.1-VACE-1.3B and CogVideoX-2B [15, 24], on two video generation benchmarks: VBench and Video-Bench [11, 10]. VBench reports independent scores based on automatic metrics, whereas Video-Bench computes independent scores using GPT-4o. For VBench, we evaluate the 10 dimensions reported in prior works [5, 14]. (2) Medical Question Answering. We evaluate on HealthBench [2], which contains 5K clinical conversations to assess model safety and helpfulness in realistic medical scenarios.

5.2 Main Results

We train each baseline once and use the same seed across methods for each evaluation prompt. As shown in Tabs. 12, and 3, Flux-OPD achieves the best total scores across different student-teacher settings on two open-ended tasks. In medical question answering, where task preferences are primarily text-level, OPD improves over the initial policy and ranks second only to Flux-OPD. In contrast, in prompt optimization, where video-level feedback reflects real task preferences, OPD degrades the initial student policy. OPCD and OEL remain limited in leveraging contexts, and both degrade the initial policy on prompt optimization.

Moreover, we conduct three independent training runs for OPD and Flux-OPD. As shown in Fig. 4, Flux-OPD consistently outperforms OPD on VBench with CogVideoX-2B and on HealthBench.

媒体内容 · 前往原文查看
Variant Evolving Contexts Contextual Correction Contextual Weighting Score
V1 Eq. (20) 19.63
OEL 19.66
V2 19.73
20.03
19.97
\rowcolormyLightPurple Full Eq. (20) 20.61
Table 4: Ablation Study of Flux-OPD on HealthBench. denotes the correction strength.
Refer to caption
Figure 5: (a) Training Stability. The training losses of OPD and Flux-OPD decrease steadily, whereas OEL exhibits loss surges. Flux-OPD also maintains a stable gradient norm. (b) Out-of-Distribution Performance on IF-Eval. Flux-OPD achieves the highest prompt-level strict accuracy, outperforming OPD and suggesting better cross-domain generalization.

5.3 Ablation and Parameter Study

Effects of Evolving Contexts

As shown in Tab. 4, full Flux-OPD outperforms V1, the variant w/o evolving contexts, demonstrating that contexts evolving with student performance improve the student more effectively under the same number of training steps.

Effects of Contextual Correction

Contextual correction strategy corrects the target by combining the context-free teacher and contextual difference signals from context-conditioned teachers. As shown in Tab. 4, both OEL and V2 have evolving contexts, while V2, equipped with contextual correction, consistently outperforms OEL under all three correction strengths. This demonstrates the effectiveness of using context-conditioned teachers as contextual difference signals rather than direct distillation targets.

Effects of Contextual Weighting

Contextual weighting strategy adjusts correction strengths using the conflict term in Eq.(20) as an indicator to downweight conflicting distributions. As shown in Tab. 4, full Flux-OPD outperforms the V2 variant trained with each of the three static strengths, showing that the weighting strategy guides the student toward a more effective distillation target.

媒体内容 · 前往原文查看
Method Wan2.1-VACE-1.3B CogVideoX-2B
Teacher - 81.48 77.68
Student - 81.40 77.97
Flux-OPD 0.1 \cellcolormyLightPurple82.25 77.62
0.2 81.24 \cellcolormyLightPurple78.11
Table 5: Parameter Study of the Conflict Threshold . Results on VBench with a Qwen3-VL-Instruct 8B teacher and 4B student.

Parameter Study of Conflict Threshold

The conflict threshold controls the correction strength according to the conflict among context-conditioned teachers. We use by default and increase it slightly to when the initial student outperforms the teacher, allowing contexts to exert greater influence. For example, in Tab. 1, the student underperforms the teacher with Wan2.1-VACE-1.3B but outperforms it with CogVideoX-2B. As shown in Tab. 5, the higher threshold benefits CogVideoX-2B because contexts provide additional supervision beyond the context-free teacher.

Refer to caption
Figure 6: Conflict Dynamics. Results with Wan2.1-VACE-1.3B on the prompt optimization task.

Parameter Study of Strength Calibration

We adjust the effective range of correction strengths according to overall context consistency through either scaling or clipping, as described in Sec. 4.3. We use scaling for generally less consistent contexts, setting to uniformly reduce their influence. In contrast, we use clipping for more consistent contexts to control the lower and upper bounds of correction strengths. As shown in Fig. 6, the stronger 32B teacher setting exhibits lower conflict values than the 8B teacher setting, indicating generally higher context consistency. As shown in Tab. 6, scaling performs best with the 8B teacher, indicating that its contexts benefit from a moderate global reduction in influence. In contrast, clipping performs best with the stronger 32B teacher, whose more consistent contexts benefit from correction strengths constrained to a specified range.

媒体内容 · 前往原文查看
Teacher Calibration Student
Qwen3-VL -Instruct-8B \cellcolormyLightPurpleScaling \cellcolormyLightPurple0.9 \cellcolormyLightPurple \cellcolormyLightPurple82.25
- 1 81.67
Clipping 1 81.61
Qwen2.5-VL -Instruct-32B Scaling 0.9 81.40
- 1 81.74
\cellcolormyLightPurpleClipping \cellcolormyLightPurple1 \cellcolormyLightPurple \cellcolormyLightPurple82.26
Table 6: Parameter Study of Strength Calibration. Results with Wan2.1-VACE-1.3B on VBench.

5.4 Discussion

Stability

As shown in Fig. 5(a), the training loss of Flux-OPD decreases steadily, similar to OPD, whereas OEL exhibits abrupt loss surges when contexts are updated between iterations. OEL also shows larger fluctuations in the gradient norm near context updates.

Generalization

We evaluate out-of-distribution instruction following performance on IF-Eval [29] after training on medical question answering. As shown in Fig. 5(b), Flux-OPD achieves higher prompt-level strict accuracy than OPD, suggesting better cross-domain generalization.

6 Conclusion

We propose Flux-OPD, an OPD paradigm that uses evolving contexts as in-training supervision to capture task preferences in open-ended domains. We analyze the effect of contexts through a decomposition of the reverse KL objective and address unstable distillation targets and conflicting distributions by anchoring distillation to the context-free teacher, injecting contextual difference signals, and weighting them according to conflicts among teachers. These results highlight the potential to combine teacher supervision with evolving contexts.

References

  • [1] R. Agarwal, N. Vieillard, Y. Zhou, P. Stanczyk, S. Ramos Garea, M. Geist, and O. Bachem (2024) On-policy distillation of language models: learning from self-generated mistakes. In International Conference on Learning Representations, Vol. 2024, pp. 21246–21263. Cited by: §1, §2.1, §5.1.
  • [2] R. K. Arora, J. Wei, R. S. Hicks, P. Bowman, J. Quiñonero-Candela, F. Tsimpourlas, M. Sharman, M. Shah, A. Vallone, A. Beutel, et al. (2025) Healthbench: evaluating large language models towards improved human health. arXiv preprint arXiv:2505.08775. Cited by: §5.1.
  • [3] A. Askell, Y. Bai, A. Chen, D. Drain, D. Ganguli, T. Henighan, A. Jones, N. Joseph, B. Mann, N. DasSarma, et al. (2021) A general language assistant as a laboratory for alignment. arXiv preprint arXiv:2112.00861. Cited by: §1, §2.2.
  • [4] S. Bai, K. Chen, X. Liu, J. Wang, W. Ge, S. Song, K. Dang, P. Wang, S. Wang, J. Tang, et al. (2025) Qwen2. 5-vl technical report. arXiv preprint arXiv:2502.13923. Cited by: §5.1.
  • [5] J. Cheng, R. Lyu, X. Gu, X. Liu, J. Xu, Y. Lu, J. Teng, Z. Yang, Y. Dong, J. Tang, et al. (2025) Vpo: aligning text-to-video generation models with prompt optimization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15636–15645. Cited by: Appendix D, §5.1, §5.1.
  • [6] Y. Fu, H. Huang, K. Jiang, J. Liu, Z. Jiang, Y. Zhu, and D. Zhao (2026) Revisiting on-policy distillation: empirical failure modes and simple fixes. arXiv preprint arXiv:2603.25562. Cited by: §2.1.
  • [7] Y. Gu, L. Dong, F. Wei, and M. Huang (2024) Minillm: knowledge distillation of large language models. In The twelfth international conference on learning representations, Cited by: §2.1.
  • [8] A. Gudibande, E. Wallace, C. Snell, X. Geng, H. Liu, P. Abbeel, S. Levine, and D. Song (2023) The false promise of imitating proprietary llms. arXiv preprint arXiv:2305.15717. Cited by: §2.1.
  • [9] A. Gunjal, A. Wang, E. Lau, V. Nath, Y. He, B. Liu, and S. Hendryx (2025) Rubrics as rewards: reinforcement learning beyond verifiable domains. arXiv preprint arXiv:2507.17746. Cited by: §1, §2.1, §5.1.
  • [10] H. Han, S. Li, J. Chen, Y. Yuan, Y. Wu, Y. Deng, C. T. Leong, H. Du, J. Fu, Y. Li, et al. (2025) Video-bench: human-aligned video generation benchmark. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 18858–18868. Cited by: Appendix D, §5.1.
  • [11] Z. Huang, Y. He, J. Yu, F. Zhang, C. Si, Y. Jiang, Y. Zhang, T. Wu, Q. Jin, N. Chanpaisit, et al. (2024) Vbench: comprehensive benchmark suite for video generative models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 21807–21818. Cited by: Appendix D, §5.1.
  • [12] J. Hübotter, F. Lübeck, L. Behric, A. Baumann, M. Bagatella, D. Marta, I. Hakimi, I. Shenfeld, T. K. Buening, C. Guestrin, and A. Krause (2026) Reinforcement learning via self-distillation. CoRR abs/2601.20802. Cited by: §2.1.
  • [13] J. L. W. V. Jensen (1906) Sur les fonctions convexes et les inégalités entre les valeurs moyennes. Acta mathematica 30 (1), pp. 175–193. Cited by: §3.2.
  • [14] Y. Ji, J. Zhang, J. Wu, S. Zhang, S. Chen, C. Ge, P. Sun, W. Chen, W. Shao, X. Xiao, et al. (2025) Prompt-a-video: prompt your video diffusion model via preference-aligned llm. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 18725–18735. Cited by: Appendix D, §5.1.
  • [15] Z. Jiang, Z. Han, C. Mao, J. Zhang, Y. Pan, and Y. Liu (2025) Vace: all-in-one video creation and editing. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 17191–17202. Cited by: §5.1.
  • [16] K. Lu and T. M. Lab (2025) On-policy distillation. Thinking Machines Lab: Connectionism. Note: https://thinkingmachines.ai/blog/on-policy-distillation External Links: Document Cited by: §1.
  • [17] J. Schulman and T. M. Lab (2025) LoRA without regret. Thinking Machines Lab: Connectionism. Note: https://thinkingmachines.ai/blog/lora/ External Links: Document Cited by: §1.
  • [18] Z. Shao, P. Wang, Q. Zhu, R. Xu, J. Song, X. Bi, H. Zhang, M. Zhang, Y. Li, Y. Wu, et al. (2024) Deepseekmath: pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300. Cited by: §1.
  • [19] C. Snell, D. Klein, and R. Zhong (2022) Learning by distilling context. CoRR abs/2209.15189. External Links: Link, Document, 2209.15189 Cited by: §2.2.
  • [20] H. Xiao, J. Li, Z. Li, X. Li, S. Li, and J. Han (2026) Structuring human objectives: a survey of rubrics for evaluation, alignment, and agentic ai. Alignment, and Agentic AI (June 20, 2026). Cited by: §1, §2.1.
  • [21] A. Yang, A. Li, B. Yang, B. Zhang, B. Hui, B. Zheng, B. Yu, C. Gao, C. Huang, C. Lv, et al. (2025) Qwen3 technical report. arXiv preprint arXiv:2505.09388. Cited by: §5.1.
  • [22] C. Yang, C. Qin, Q. Si, M. Chen, N. Gu, D. Yao, Z. Lin, W. Wang, J. Wang, and N. Duan (2026) Self-distilled rlvr. arXiv preprint arXiv:2604.03128. Cited by: §2.1, §3.2.
  • [23] W. Yang, W. Liu, R. Xie, K. Yang, S. Yang, and Y. Lin (2026) Learning beyond teacher: generalized on-policy distillation with reward extrapolation. arXiv preprint arXiv:2602.12125. Cited by: §2.1.
  • [24] Z. Yang, J. Teng, W. Zheng, M. Ding, S. Huang, J. Xu, Y. Yang, W. Hong, X. Zhang, G. Feng, et al. (2025) Cogvideox: text-to-video diffusion models with an expert transformer. In International Conference on Learning Representations, Vol. 2025, pp. 83048–83077. Cited by: §5.1.
  • [25] T. Ye, L. Dong, G. Chen, H. Zhu, X. Wu, S. Huang, and F. Wei (2026) LLM-as-a-coach: experiential learning for non-verifiable tasks. arXiv preprint arXiv:2607.18110. Cited by: §1.
  • [26] T. Ye, L. Dong, Q. Dong, X. Wu, S. Huang, and F. Wei (2026) Online experiential learning for language models. arXiv preprint arXiv:2603.16856. Cited by: §1, §2.2, §4.1, §5.1.
  • [27] T. Ye, L. Dong, X. Wu, S. Huang, and F. Wei (2026) On-policy context distillation for language models. arXiv preprint arXiv:2602.12275. Cited by: §1, §2.2, §4.1, §5.1.
  • [28] S. Zhao, Z. Xie, M. Liu, J. Huang, G. Pang, F. Chen, and A. Grover (2026) Self-distilled reasoner: on-policy self-distillation for large language models. arXiv preprint arXiv:2601.18734. Cited by: §2.1.
  • [29] J. Zhou, T. Lu, S. Mishra, S. Brahma, S. Basu, Y. Luan, D. Zhou, and L. Hou (2023) Instruction-following evaluation for large language models. External Links: 2311.07911, Link Cited by: §5.4.

Appendix

Appendix A Prompt Template

All prompts are intentionally concise and require minimal human engineering. They contain no human-crafted domain knowledge, allowing the models to rely on their own capabilities.

A.1 Context Extraction Prompt

Figs. 7 and 8 show the context extraction prompts used by OPCD, OEL, and Flux-OPD for the prompt optimization and medical question answering tasks. These prompts extract new experience items beyond the existing ones.

A.2 Context Distillation Prompt

Figs. 9 and 10 show the in-context learning prompts used by context-conditioned teachers in OPCD, OEL, and Flux-OPD for the prompt optimization and medical question answering tasks.

A.3 System Prompt

Fig. 11 shows the system prompt used for offline SFT data construction, student training, and evaluation in the prompt optimization task. We do not use an explicit system prompt for the medical question answering task.

Appendix B Context Example

Figs. 12 and 13 show context examples from OPCD, OEL, and Flux-OPD for the prompt optimization and medical question answering tasks.

Appendix C Additional Training Details

C.1 Hyperparameters

General Hyperparameters

For each training paradigm, we use a batch size of and a learning rate of . SFT runs for epochs, while the other paradigms run for epochs. For computational efficiency, the implemented distillation loss retains the top- target logits and renormalizes them over the selected tokens. All experiments are conducted on 8 NVIDIA A800 GPUs.

Hyperparameters of Flux-OPD

We list the hyperparameters of Flux-OPD in Tab. 7. The corresponding evaluation scores are reported in Tabs. 1, 2, and 3 of the main paper.

C.2 Training Pseudocode of Flux-OPD

The full training procedure of Flux-OPD is summarized in Algorithm 1. Flux-OPD performs a single continuous training run over multiple iterations. In each iteration, it first extracts contexts from trajectories generated by the current student and then distills contextual difference signals into a context-free teacher anchor. The correction strength is adjusted according to the conflict among context-conditioned teacher distributions.

C.3 Conflict Dynamics

We use the conflict metric to monitor distributional disagreement among context-conditioned teachers during training. For each response token position, the teacher is queried under multiple sampled contexts, producing multiple context-conditioned token distributions. These distributions are combined through a geometric mean in log-probability space. A larger conflict value indicates lower distributional overlap and stronger disagreement among context-conditioned teachers. We report the average conflict over valid response tokens at each training step.

As shown in Fig. 14, the two prompt optimization settings with the Qwen3-VL-Instruct 8B teacher exhibit substantially higher conflict values, indicating lower overlap among context-conditioned teacher distributions and thus lower overall context consistency. In contrast, the two settings with the stronger Qwen2.5-VL-Instruct 32B teacher maintain markedly lower conflict values. This difference is consistent with a stronger teacher producing more stable token preferences across sampled contexts and, consequently, more consistent context-conditioned distributions.

The medical question answering setting also uses an 8B teacher but exhibits low conflict values comparable to those of the 32B prompt optimization settings. This may be attributed to the use of rubrics as optional supplements during context extraction, which provide a standard reference and may improve the consistency of the resulting contexts.

These results suggest that overall context consistency depends not only on teacher capability but also on the optional supplements available during context extraction.

Appendix D Additional Evaluation Details

For the prompt optimization task, we evaluate the 10 VBench dimensions [11] reported in prior works [5, 14]. The quality dimensions include Subject Consistency, Background Consistency, Motion Smoothness, Dynamic Degree, Aesthetic Quality, and Image Quality, while the semantic dimensions include Multiple Objects, Human Action, Scene, and Appearance Style. These dimensions cover 523 prompts in total. We evaluate all quality and alignment dimensions of the full Video-Bench [10], covering 419 prompts.

Refer to caption
Figure 7: Prompt for Context Extraction in the Prompt Optimization Task.
Refer to caption
Figure 8: Prompt for Context Extraction in the Medical Question Answering Task.
Refer to caption
Figure 9: Prompt for Context Distillation in the Prompt Optimization Task.
Refer to caption
Figure 10: Prompt for Context Distillation in the Medical Question Answering Task.
Refer to caption
Figure 11: System Prompt for the Prompt Optimization Task.
Refer to caption
Figure 12: Context Example for the Prompt Optimization Task.
Refer to caption
Figure 13: Context Example for the Medical Question Answering Task.
媒体内容 · 前往原文查看
Algorithm 1 Flux-OPD Training
0: Training prompts , student , frozen teacher , environment , context extraction prompt , context teacher prompt , iterations , rollouts , extraction seeds , distillation contexts , scaling factor , conflict threshold , clipping bounds , and top- size.
0: Trained student .
1:for do
2:  Context extraction.
3:  Sample from and collect trajectories
4:  for do
5:   Sequentially extract context from using and with seed .
6:  end for
7:  Construct the context pool .
8:  Context distillation.
9:  for each mini-batch in iteration do
10:   Sample from .
11:   Compute the context-free teacher distribution .
12:   Compute context-conditioned teacher distributions
13:   Compute the unnormalized geometric mean and conflict:
14:   Compute the contextual weight:
15:   Construct the distillation target:
16:   Retain and renormalize the top- target probabilities.
17:   Update using
18:  end for
19:end for
20:return .
媒体内容 · 前往原文查看
Task Student & Teacher Downstream Model Calibration
Prompt Optimization Qwen3-VL-Instruct 8B4B Wan2.1-VACE-1.3B 0.1 Scaling,
CogVideoX-2B 0.2 Scaling,
Qwen2.5-VL-Instruct 32B7B Wan2.1-VACE-1.3B 0.1 Clipping,
CogVideoX-2B 0.1 Clipping,
Medical Question Answering Qwen3 8B1.7B - 0.1 Clipping,
Table 7: Additional Hyperparameters of Flux-OPD.
Refer to caption
Figure 14: Conflict Dynamics. The prompt optimization settings with the 8B teacher exhibit higher conflict values, whereas those with the stronger 32B teacher show higher overall context consistency. Despite using an 8B teacher, medical question answering also maintains low conflict, potentially because task-specific rubrics serve as optional supplements during context extraction.
阅读原文arxiv.org