From Context to Skills: Can Language Models Learn from Context Skillfully?
Paper: arXiv:2604.27660 Code: S1s-Z/Ctx2Skill Code reference:
main@9c040a41(2026-05-21)
1. Motivation (研究动机)
当前 LM 在预训练知识覆盖的问题上已经很强,但很多真实任务的关键知识不在模型参数里,而是在一次性给定的复杂上下文 中:产品手册、实验数据、长文档、搜索结果、代码仓库、操作规程等。论文把这种能力称为 context learning:模型需要从未见过的上下文中抽取新知识,并把这些知识用于推理和任务执行,而不仅是做长上下文检索或读理解。
这篇论文特别强调 context learning 和常见 long-context / ICL 任务的差别。Long-context 评测通常允许模型靠“找到正确片段”回答问题;ICL 往往是从少量 demonstrations 中识别一个简单输入输出模式。CL-bench 则更接近真实工作:上下文可能是一份手册、一组实验记录或一个规则系统,任务要求模型把分散约束归纳成可执行程序。例如“读一个新产品文档后排查故障”不只是定位某句话,而是要理解先后步骤、例外条件、检查顺序和失败恢复策略。
如果每次任务都把完整上下文重新喂给模型,模型可能会重复做昂贵的阅读和归纳;如果先把上下文压缩成自然语言 skills,就可以把一次性归纳结果复用到同一上下文下的多个任务。因此本文关注的不是训练一个新 LM,而是在 inference-time 构造一个可插拔的 context-specific skill layer。这个 layer 必须满足三点:忠实于上下文、足够简洁、能迁移到未见任务,而不是保存某个训练任务的答案。
本文认为现有方法的核心缺口有三点:
- 长上下文不等于会学习上下文:Long-context benchmark 往往考检索、定位和问答;但 CL-bench 要求模型归纳上下文内部的规则、流程、约束和隐含模式,再把这些知识迁移到同一上下文下的新任务。
- Inference-time skill augmentation 有潜力但缺自动构造机制:把上下文中的规则和流程抽成自然语言
SKILL.md,再在推理时 prepend 给 LM,是一个直观路线;问题是人工读完复杂上下文再写技能成本太高。 - 上下文学习缺少外部反馈:在 coding / web navigation / game 等 agent 场景里,skill evolution 可以依赖执行结果、reward 或 ground truth;但给定只有上下文 时,很难知道一个自动生成的 skill 是否 faithful、是否漏掉关键知识。
所以这篇论文要解决的具体问题是:在没有人工标注、没有参数更新、没有外部 reward 的条件下,能否只从上下文 自动发现、改写并选择一组可复用的 context-specific skills,用于提升 LM 在同一上下文上处理未见任务的能力? 这个问题重要,是因为如果成立,模型可以把一次昂贵的长上下文阅读转化为可复用的短技能文件;同一上下文下后续多个任务都可以复用这组技能,推理成本和上下文理解难度都会下降。
2. Idea (核心思想)
核心洞察是:即使没有外部标签,模型也可以通过“自己出题—自己作答—自己严格打分”的 self-play 产生内部反馈;失败样例暴露 Reasoner skill 缺口,成功样例暴露 Challenger skill 不够刁钻,从而让两套技能共同演化。 这不是简单让 LM 总结上下文,而是把 skill 构造改成一个带对抗压力的闭环。
本文提出 Ctx2Skill:一个多代理、冻结 LM、文本技能自演化框架。它维护两套技能: 给 Reasoner 用于答题, 给 Challenger 用于生成更有区分度的任务与 rubrics。每轮 Challenger 生成 个任务和 rubrics,Reasoner 用当前 作答,Judge 逐 rubric 做 all-or-nothing 判定;失败任务送到 Reasoner Proposer/Generator 以补技能,成功任务送到 Challenger Proposer/Generator 以增强出题策略。
和 Prompting / AutoSkill4Doc 的根本差别在于反馈来源:Prompting 是一次性从 直接生成技能;AutoSkill4Doc 是切窗提取再合并技能;Ctx2Skill 则用任务级和 rubric 级结果驱动技能迭代。它还额外提出 Cross-Time Replay,不盲目使用最后一轮技能,而是在 self-play 过程中收集 hard/easy probe,回放评估历史技能版本,选出在困难失败和简单成功之间最平衡的一版,避免 Challenger 越来越极端时 Reasoner 过拟合病态任务。
这个设计有一个比较微妙的点:Challenger 和 Reasoner 不是共享同一份 skill,也不是简单互相蒸馏。Challenger skill 学的是“如何围绕上下文提出更能暴露缺口的问题和 rubrics”,Reasoner skill 学的是“如何根据上下文规则答题”。成功样例并不直接更新 Reasoner,因为成功说明当前 Reasoner 已经掌握了这些约束;它们反而应该更新 Challenger,让下一轮题目更有压力。失败样例也不直接更新 Challenger,因为失败说明题已经足够暴露缺口;它们应该进入 Reasoner 侧补足知识。这个 routing 是 Ctx2Skill 区别于普通 self-refinement 的关键。
另一个核心思想是把 skill selection 从“最新 checkpoint 最好”改成“泛化 checkpoint 最好”。在参数训练里后期 checkpoint 常常更优,但这里的 skill 是文本编辑累积,后期可能包含越来越多窄化规则。Cross-Time Replay 用 hard probes 保留挑战性,用 easy probes 防止遗忘基础约束,因此选择目标不是最大化某一轮新任务分数,而是最大化跨时间代表性任务上的平衡表现。
3. Method (方法)
3.1 Overall framework:从上下文到可复用技能
Figure 1 解读:这张图展示了 Ctx2Skill 的目标形态:输入是一个复杂上下文 ,输出不是某个具体任务的答案,而是一组自然语言 skills。skills 记录从 中归纳出的规则、流程和约束,并在推理时作为额外 instruction 注入 LM。关键点是整个 skill 构造过程不需要人工标注,也不需要外部环境 reward。
形式化地,一个 context learning 任务由上下文 、任务 与 rubrics 组成。LM 对任务的回答为: 因为评测是 all-or-nothing,任务 被解出当且仅当每条 rubric 都通过: Ctx2Skill 引入自然语言技能集 ,在推理时改为: 在 skill 构造阶段, 被拆成两套:Reasoner skill 和 Challenger skill ;最终部署时只使用 。这点很重要:Challenger skill 不是为了最终答题,而是为了持续产生能暴露 Reasoner 缺陷的任务。
Figure 2 解读:Figure 2a 是 self-play loop:Challenger 根据 和 出题与 rubrics,Reasoner 根据 和 作答,Judge 输出每条 rubric 的二值结果;失败样例更新 Reasoner skill,成功样例更新 Challenger skill。Figure 2b 是 Cross-Time Replay:不是直接拿最后一轮 ,而是把历史候选 在 hard/easy probe 上重测,选出最均衡的一版。
直觉上,Ctx2Skill 把“读上下文写技能”拆成两个互相施压的角色。Reasoner 的失败告诉系统“哪些规则还没学会”;Reasoner 的成功又告诉 Challenger“当前题太容易,应该挖更深的约束”。这种信号不是外部 reward,而是由上下文本身派生的任务和 rubrics 形成的内部监督。Cross-Time Replay 则负责防止这个闭环跑偏:如果后期 Challenger 只制造边角极端题,最后一轮 skill 可能非常长、非常专门化,但对一般任务更差;回放 hard/easy probe 可以把“攻克困难点”和“不忘基础规则”同时纳入选择标准。
3.2 Skill-optimized self-play:五个冻结 LM 角色
每个 context 独立运行 轮 self-play。第 轮使用上一轮的 和 ,并且双方 prompt 不互相读取对方 skill,保持对抗性。
Challenger
输入:上下文 和当前 Challenger skill 。输出: 个任务 及对应 rubrics 。rubrics 的设计目标不是问表面事实,而是迫使回答者真正归纳 中的规则与流程。
如果没有 Challenger,系统就缺少“发现盲点”的机制;一次性生成的技能很容易只覆盖上下文的显眼信息。released code 中 challenger.py::build_challenger_prompt 明确要求生成 exactly num_tasks 个 evaluation tasks,每个测试上下文的不同方面,并带自己的 rubrics。
Reasoner
输入:上下文 、任务 、当前 Reasoner skill 。输出:回答 。Reasoner 不是训练一个新模型,而是在 API 调用中把 skills 注入 system prompt;released code 的 infer.py::inject_skills_into_messages 把每条 skill 的 name、description 和 body prepend 到第一条 system message。
如果没有 Reasoner skill,模型需要每次从长上下文中重新抽取规则;如果 skill 不完整,失败样例会通过 Judge 暴露出来。
Judge
输入:任务、rubrics、Reasoner answer。输出:每条 rubric 的 pass/fail 和整体 。公式为:
released code 的 eval.py::call_judge_api 使用严格 all-or-nothing grading prompt:只要一个要求不完全满足,最终 score 就是 0。这和 CL-bench 的任务级 solving rate 对齐,但也让任务很难:平均每个任务有 16.6 条 rubrics,总共 31,607 条 rubrics。
Proposer
Judge 只告诉系统哪些任务过/不过,不直接解释技能该怎么改。Proposer 的职责是把一组 routed cases 合成高层诊断:操作类型(add / merge)、目标 skill 名称、描述和理由。
- Reasoner Proposer 接收失败集合 ,分析错因和 violated rubrics,判断 缺少或误写了哪些 contextual knowledge。
- Challenger Proposer 接收成功集合 ,分析为什么 Reasoner 能解,进而找出当前出题策略中还不够刁钻的地方。
Generator
Generator 把 Proposer 的高层诊断 materialize 成完整 skill set。论文强调 Generator 返回的是 replacement skill set:新增或合并条目,同时保留 unrelated entries。Reasoner Generator 产出 ,Challenger Generator 产出 。
released code 的 selfplay_loop.py::generate_and_save_skill 将每轮结果保存为 skill-iter-i.md;如果第一轮 Reasoner 全部答对且没有失败样例,代码会创建 placeholder skill,避免后续选择阶段缺少候选文件。
3.3 Cross-Time Replay:选择最能泛化的历史 skill
self-play 的风险是 adversarial collapse:随着 Challenger skill 变强,它可能生成越来越极端的任务;Reasoner 的 skill 更新又是 failure-driven 的,容易逐渐过拟合这些病态样例,导致 skill 冗长、重复,对代表性任务反而更差。因此最后一轮 并不一定最好。
Ctx2Skill 在每轮收集两个 probe set:
- Hard probe :从失败任务中选 rubric pass rate 最低的任务,即“最难失败”。released code 的
save_hard_and_easy_tasks对judge_score == 0的任务计算 passed rubrics / total rubrics,并取最小值。 - Easy probe :从成功任务中选 rubrics 最少的任务,即“最容易成功”。released code 会在 rubrics 数最少的成功任务之间
random.choice打破并列。
self-play 完成后,系统对每个历史候选 在 hard/easy probes 上重跑 Reasoner 与 Judge,并计算带 Laplace smoothing 的通过率: 最终选择: 乘法而不是加法是一个关键设计:如果某版 skill 解决 hard probes 但牺牲 easy probes, 会把乘积拉低;如果只会简单题而不会困难题, 会拉低乘积。ablation 中 additive scoring 的 overall 从 16.5 降到 15.9,说明这个平衡项确实有用。
Figure 3 解读:这张图统计 Cross-Time Replay 最终选择了第几轮 skill。它说明“最后一轮不总是最好”:较弱 backbone 往往更容易在后期被 Challenger 带偏,所以 replay 会选择更早、更泛化的 skill;GPT-5.1 这类强 Reasoner 的可用后期 skill 更多,因为它能承受更强的 adversarial pressure。
3.4 实现级伪代码(基于 released code)
def self_play_for_context(context_item, api_client, cfg):
messages = context_item["messages"]
context_id = context_item["metadata"]["context_id"]
rounds = []
for iteration in range(1, cfg.num_iterations + 1):
challenger_skills = load_skill_for_context(cfg.skills_dir, "challenger", context_id, iteration - 1)
reasoner_skills = load_skill_for_context(cfg.skills_dir, "reasoner", context_id, iteration - 1)
tasks = challenger_generate(
api_client,
model=cfg.challenger_model,
context_messages=messages,
challenger_skills=challenger_skills,
num_tasks=cfg.num_tasks,
)
task_results = []
for task in tasks:
answer = reasoner_solve(
api_client,
model=cfg.reasoner_model,
context_messages=messages,
task=task["task"],
reasoner_skills=reasoner_skills,
)
score, rationale, requirement_status = judge_evaluate(
api_client,
model=cfg.judge_model,
rubrics=task["rubrics"],
output=answer,
)
task_results.append({
"task": task["task"],
"rubrics": task["rubrics"],
"reasoner_output": answer,
"judge_score": score,
"requirement_status": requirement_status,
})
failed = [x for x in task_results if x["judge_score"] == 0]
passed = [x for x in task_results if x["judge_score"] == 1]
if failed:
propose_and_generate_skill(
api_client, cfg.proposer_model, cfg.generator_model,
context_id, messages, task_results, failed,
role="reasoner", existing_skills=reasoner_skills,
iteration=iteration, skills_base_dir=cfg.skills_dir,
)
if passed:
propose_and_generate_skill(
api_client, cfg.proposer_model, cfg.generator_model,
context_id, messages, task_results, passed,
role="challenger", existing_skills=challenger_skills,
iteration=iteration, skills_base_dir=cfg.skills_dir,
)
save_hard_and_easy_tasks(context_id, task_results, iteration, cfg.skills_dir)
rounds.append({"iteration": iteration, "num_passed": len(passed), "num_failed": len(failed)})
best = select_best_skill_for_context(
context_id, cfg.num_iterations, cfg.skills_dir,
api_client, cfg.reasoner_model, cfg.judge_model, messages,
)
copy_skill_iter_to_final_skill_md(context_id, best["best_iteration"], cfg.skills_dir)
return rounds, bestdef propose_and_generate_skill(api_client, proposer_model, generator_model, role, cases, existing_skills):
proposer_prompt = build_proposer_prompt(
role=role,
cases=cases,
existing_skills=existing_skills,
)
proposal = parse_json_response(call_openai_api(api_client, proposer_prompt, proposer_model))
# proposal contains action, target skill name, description, and justification
generator_prompt = build_generator_prompt(
role=role,
proposal=proposal,
existing_skills=existing_skills,
)
generated = parse_json_response(call_openai_api(api_client, generator_prompt, generator_model))
save_as_skill_iter(role=role, content=generated["skill_content"])
return generateddef save_hard_and_easy_tasks(context_id, task_results, iteration, skills_dir):
failed = [t for t in task_results if t["judge_score"] == 0]
if failed:
def rubric_pass_rate(t):
status = t.get("requirement_status", [])
return sum(str(x).lower() == "yes" for x in status) / max(1, len(status))
hardest = min(failed, key=rubric_pass_rate)
append_jsonl({**hardest, "pass_rate": rubric_pass_rate(hardest)},
f"{skills_dir}/reasoner/{context_id}/hard_set.jsonl")
passed = [t for t in task_results if t["judge_score"] == 1]
if passed:
min_rubrics = min(len(t["rubrics"]) for t in passed)
tied = [t for t in passed if len(t["rubrics"]) == min_rubrics]
easiest = random.choice(tied)
append_jsonl({**easiest, "num_rubrics": len(easiest["rubrics"])},
f"{skills_dir}/reasoner/{context_id}/easy_set.jsonl")def select_best_skill_for_context(context_id, num_iterations, skills_dir, api_client, reasoner_model, judge_model, messages):
hard_set = load_jsonl(f"{skills_dir}/reasoner/{context_id}/hard_set.jsonl")
easy_set = load_jsonl(f"{skills_dir}/reasoner/{context_id}/easy_set.jsonl")
results = []
for iteration in range(1, num_iterations + 1):
skills = load_skill_for_context(skills_dir, "reasoner", context_id, iteration)
hard_correct, hard_valid = replay_and_grade(hard_set, skills, messages, api_client, reasoner_model, judge_model)
easy_correct, easy_valid = replay_and_grade(easy_set, skills, messages, api_client, reasoner_model, judge_model)
hard_acc = (hard_correct + 1) / (hard_valid + 1)
easy_acc = (easy_correct + 1) / (easy_valid + 1)
results.append({
"iteration": iteration,
"hard_accuracy": hard_acc,
"easy_accuracy": easy_acc,
"combined_score": hard_acc * easy_acc,
})
return max(results, key=lambda x: x["combined_score"])def inject_skills_into_messages(messages, skills):
if not skills:
return messages
skill_catalog = []
for skill in skills:
skill_catalog.append(
f"### Skill: {skill['name']}\n"
f"**When to use**: {skill['description']}\n\n"
f"{skill['body']}"
)
injected = copy.deepcopy(messages)
injected[0]["content"] = "\n\n".join(skill_catalog) + "\n\n" + injected[0]["content"]
return injected论文公式与 released code 实现差异:核心 self-play routing、hard/easy probe 选择、Laplace smoothing 和乘法选择公式与论文一致;但 released code 的 selfplay_loop.py CLI 默认 --judge-model gpt-4.1,而论文和实际 launch script/README 使用 gpt-5.1 Judge,因此复现实验不能依赖默认值,必须按 run.sh 或 README 显式传 --judge-model gpt-5.1。此外,commit 9c040a41 的仓库中 selfplay_loop.py、infer.py、eval.py、challenger.py 都 import api_client.create_client,但仓库未包含 api_client.py;这不改变算法描述,但会影响开箱即跑复现,需要补齐 API client wrapper。
3.5 Code-to-paper mapping
Code reference:
main@9c040a41(2026-05-21) — pseudocode and mapping based on this commit
| Paper Concept | Source File | Key Class/Function |
|---|---|---|
| Skill-optimized self-play loop | selfplay_loop.py | run_adversarial_rounds, main |
| Challenger task/rubric generation | challenger.py, prompts/challenger.txt, selfplay_loop.py | build_challenger_prompt, parse_challenger_response, challenger_generate |
| Reasoner answer with skills | infer.py, selfplay_loop.py | inject_skills_into_messages, reasoner_solve, load_skills_by_context |
| Strict Judge / all-or-nothing scoring | eval.py, eval_ignore_none.py, selfplay_loop.py | build_rubrics_text, call_judge_api, judge_evaluate |
| Proposer diagnosis | selfplay_loop.py, prompts/challenger_proposer.txt, prompts/reasoner_proposer.txt | build_proposer_prompt, parse_proposer_response |
Generator writes SKILL.md | selfplay_loop.py, prompts/challenger_generator.txt, prompts/reasoner_generator.txt | build_generator_prompt, generate_and_save_skill, propose_and_generate_skill |
| Hard/easy probe accumulation | selfplay_loop.py | save_hard_and_easy_tasks |
| Cross-Time Replay selection | selfplay_loop.py | select_best_skill_for_context, finalize_best_skills |
| Experiment launch config | run.sh, README.md | --num-iterations 5, --num-tasks 5, --workers 32, --judge-model gpt-5.1 |
4. Experimental Setup (实验设置)
Dataset / benchmark
评测使用 CL-bench,包含 个复杂 contexts、 个 tasks、 条 verification rubrics。所有任务都要求答案所需的新知识来自对应上下文,而不是模型预训练知识。四个类别如下:
| Category | Contexts | Tasks | Rubrics | Tasks/context mean/max | Rubrics/task mean/max | Input length mean/max |
|---|---|---|---|---|---|---|
| Domain Knowledge Reasoning | 190 | 663 | 11,099 | 3.5 / 7 | 16.7 / 74 | 8.3K / 60.0K |
| Rule System Application | 140 | 566 | 8,286 | 4.0 / 12 | 14.6 / 75 | 12.2K / 62.2K |
| Procedural Task Execution | 100 | 471 | 9,486 | 4.7 / 12 | 20.1 / 59 | 8.5K / 58.5K |
| Empirical Discovery & Simulation | 70 | 199 | 2,736 | 2.8 / 9 | 13.7 / 114 | 16.7K / 65.0K |
| Total | 500 | 1,899 | 31,607 | 3.8 / 12 | 16.6 / 114 | 10.4K / 65.0K |
Baselines
- Frontier LMs without skills:GPT-4.1, GPT-5.1, GPT-5.2, Claude Opus 4.5, Gemini 3 Pro, Kimi K2.5, DeepSeek V3.2 Thinking。
- Prompting:让 LM 一次性读上下文 并生成 skill set,再把 skills prepend 到推理 prompt。
- AutoSkill4Doc:AutoSkill 的 document-level 变体;把 切成不同窗口,在窗口内识别独立 skills,再跨窗口 recombine。
- Ctx2Skill:与对应 baseline 使用相同 backbone 做 skill construction 和 inference,确保对比公平。
Metrics
主指标是 task-solving rate:任务所有 rubrics 都通过才算解出。rubric-level grading 继承 CL-bench 协议,使用 GPT-5.1 作为 LLM-as-a-judge verifier;论文引用 CL-bench 的 cross-verifier 与 human agreement 均超过 。技能质量另用 GPT-4.1 judge 从 conciseness、faithfulness、clarity、effectiveness、reusability 五个维度评分。
Training / generation config
这里没有参数训练或 GPU 训练;所有 agent 都是冻结 LM,通过 API 调用做 skill generation、inference 和 judging。论文与 released launch 配置给出的关键数字如下:
- Self-play budget: iterations per context, tasks per iteration;
run.sh与 README command 均显式设置--num-iterations 5 --num-tasks 5。 - Agent models:GPT-4.1 setting 使用
gpt-4.1-2025-04-14;GPT-5.1 setting 使用gpt-5.1-2025-11-13;GPT-5.2 setting 使用gpt-5.2-2025-12-11。Challenger、Reasoner、Proposer、Generator 与 skill baselines 使用对应 backbone。 - Judge / skill-quality evaluator:Judge 在三个 backbone setting 中都使用
gpt-5.1-2025-11-13;Skill Quality Evaluator 使用gpt-4.1-2025-04-14。 - Other APIs:Claude Opus 4.5 用
claude-opus-4-5-20251101,Kimi K2.5 用kimi-k2.5,Gemini 3 Pro 用gemini-3-pro-preview,DeepSeek V3.2 用deepseek-reasoner。 - Reproduction config in code:
run.sh的 GPT-4.1 launch 使用 Challenger/Reasoner/Proposer/Generator=gpt-4.1,Judge=gpt-5.1,--workers 32,输出到outputs/loop_data/loop_gpt-4.1-judge5-1.jsonl,skills 存在skills-from-4.1-judge5-1;README 给 GPT-5.2 reproduction command,也使用--workers 32。 - Cost / limitation:包括 exploratory runs,总 API 成本约 ;论文未做多次独立 runs,也未探索更大的 或 。
5. Experimental Results (实验结果)
5.1 Main results on CL-bench
主表结论是 Ctx2Skill 在三个 backbone 上都优于无技能、Prompting 和 AutoSkill4Doc。下表列出 overall 与四个类别的 solving rate(%):
| Model / Method | Overall | Domain | Rule System | Procedural | Empirical |
|---|---|---|---|---|---|
| GPT-5.1 no-skill | 21.1 | 22.4 | 21.0 | 22.8 | 13.6 |
| Claude Opus 4.5 no-skill | 21.0 | 23.7 | 19.0 | 22.6 | 15.1 |
| Kimi K2.5 no-skill | 19.2 | 19.1 | 19.4 | 21.3 | 14.4 |
| GPT-5.2 no-skill | 18.2 | 19.5 | 18.0 | 19.1 | 12.1 |
| Gemini 3 Pro no-skill | 15.8 | 15.5 | 17.7 | 16.4 | 10.1 |
| DeepSeek V3.2 Thinking no-skill | 13.2 | 13.6 | 13.8 | 14.2 | 8.0 |
| GPT-4.1 no-skill | 11.1 | 10.6 | 14.8 | 10.4 | 4.6 |
| GPT-4.1 + Prompting | 12.3 | 12.4 | 12.3 | 13.9 | 8.2 |
| GPT-4.1 + AutoSkill4Doc | 13.2 | 13.3 | 13.1 | 15.0 | 8.7 |
| GPT-4.1 + Ctx2Skill | 16.5 | 16.8 | 17.6 | 17.6 | 9.7 |
| GPT-5.1 + Prompting | 22.1 | 24.7 | 21.1 | 22.4 | 15.5 |
| GPT-5.1 + AutoSkill4Doc | 22.7 | 25.3 | 21.5 | 23.1 | 16.0 |
| GPT-5.1 + Ctx2Skill | 25.8 | 27.9 | 24.9 | 26.9 | 19.1 |
| GPT-5.2 + Prompting | 19.1 | 19.6 | 18.3 | 22.6 | 11.1 |
| GPT-5.2 + AutoSkill4Doc | 19.7 | 20.5 | 18.8 | 23.0 | 11.6 |
| GPT-5.2 + Ctx2Skill | 21.4 | 22.2 | 20.4 | 25.4 | 12.6 |
论文正文/README 对 GPT-5.1 no-skill 的 rounded baseline 有轻微不一致(intro/README 写 21.2,主表写 21.1),这里以主表精确数字为准。整体提升为:GPT-4.1 从 11.1 到 16.5(+5.4),GPT-5.1 从 21.1 到 25.8(+4.7),GPT-5.2 从 18.2 到 21.4(+3.2)。这说明 Ctx2Skill 的收益不是只来自强模型本身,而来自自演化 skill 构造机制。
Figure 4 解读:这张图按 CL-bench 子类别展示 solving rate。整体趋势是 Ctx2Skill 在绝大多数子类别上相对 no-skill base model 有提升,说明改进不是由某一个类别拉动;但 Empirical Discovery & Simulation 仍是最难类别,GPT-4.1 + Ctx2Skill 也只有 9.7%,提示复杂实验/仿真类上下文仍难以通过自然语言 skills 完全覆盖。
5.2 Skill quality evaluation
GPT-4.1 judge 对生成 skills 的五维质量评分显示,Ctx2Skill 在每个 backbone setting 中都有最高平均分:
| Backbone | Method | Conc. | Faith. | Clar. | Eff. | Reus. | Avg. |
|---|---|---|---|---|---|---|---|
| GPT-4.1 | Prompting | 81.2 | 79.7 | 80.0 | 83.3 | 84.7 | 81.8 |
| GPT-4.1 | AutoSkill4Doc | 81.3 | 81.4 | 92.4 | 88.7 | 87.2 | 86.2 |
| GPT-4.1 | Ctx2Skill | 85.2 | 84.8 | 96.2 | 90.5 | 92.5 | 89.8 |
| GPT-5.1 | Prompting | 80.7 | 88.5 | 94.1 | 94.6 | 95.3 | 90.7 |
| GPT-5.1 | AutoSkill4Doc | 82.0 | 89.1 | 94.2 | 96.0 | 96.0 | 91.5 |
| GPT-5.1 | Ctx2Skill | 82.6 | 93.9 | 98.1 | 96.7 | 96.9 | 93.6 |
| GPT-5.2 | Prompting | 80.5 | 84.4 | 92.0 | 90.4 | 92.0 | 87.9 |
| GPT-5.2 | AutoSkill4Doc | 82.2 | 87.0 | 94.0 | 92.2 | 93.0 | 89.7 |
| GPT-5.2 | Ctx2Skill | 85.1 | 89.6 | 96.5 | 94.7 | 94.4 | 92.0 |
可解释的现象是:Ctx2Skill 的 skills 不是一次性 summary,而是经过 Judge 反馈驱动的 failure/success pattern consolidation,因此在 clarity、effectiveness 和 reusability 上尤其高。
5.3 Ablation studies
GPT-4.1 ablation 说明各组件都重要:
| Variant | Overall | Domain | Rule | Procedural | Empirical |
|---|---|---|---|---|---|
| Base GPT-4.1 | 11.1 | 10.6 | 14.8 | 10.4 | 4.6 |
| Ctx2Skill | 16.5 | 16.8 | 17.6 | 17.6 | 9.7 |
| w/o Cross-Time Replay | 14.7 | 15.1 | 14.9 | 16.1 | 9.2 |
| w/o Decoupling Proposer and Generator | 15.9 | 15.9 | 16.7 | 17.4 | 9.7 |
| w/o Challenger Skills Evolving | 13.8 | 13.9 | 13.9 | 15.7 | 8.7 |
| w/o Easy Probe Set | 15.7 | 15.7 | 16.3 | 17.4 | 9.7 |
| w/o Hard Probe Set | 15.2 | 15.6 | 15.6 | 16.5 | 9.2 |
| w/o Laplace Smoothing | 15.5 | 15.7 | 16.0 | 17.2 | 9.2 |
最大掉点来自 w/o Challenger Skills Evolving(16.5 → 13.8):如果 Challenger 不演化,系统缺少持续挖掘 Reasoner 弱点的压力,Reasoner skill 增长会变成围绕初始任务的被动修补。去掉 Cross-Time Replay 也明显下降(16.5 → 14.7),说明最后一轮技能确实可能过拟合 late-stage adversarial tasks。
GPT-5.1 ablation 结论相同但绝对分更高:完整 Ctx2Skill overall 25.8;w/o Cross-Time Replay 为 23.0,w/o Challenger Skills Evolving 为 22.5,w/o Decoupling Proposer and Generator 为 25.1。较强 backbone 仍需要 replay 与 Challenger 演化,只是对部分组件缺失更稳健。
5.4 Variant designs and replay behavior
GPT-4.1 variant testing:Loser-Only Skill Update 得 16.0,Joint Outcome Skill Update 得 15.5,Additive Scoring 得 15.9,均低于完整 16.5。解释是:
- Loser-only 只更新输的一方,不能让 Challenger 从“过易成功样例”里学习如何继续施压。
- Joint outcome 把成功和失败同时喂给两侧,会稀释诊断信号;Reasoner 和 Challenger 应该分别从不同 outcome 学不同东西。
- Additive scoring 会允许某一侧 probe 表现很高来弥补另一侧很低;乘法更严格,能惩罚不平衡 skill。
Cross-Time Replay 的固定迭代对比也支持这一点:用 Iter-1 skills overall 为 15.9,Iter-2/Iter-3 为 15.6,Iter-4 为 15.2,Iter-5 为 14.7,而 Cross-Time Replay 选择后的完整结果是 16.5。也就是说,在 GPT-4.1 上越往后不一定越好,后期 skill 可能更长、更专门化但更不泛化。
5.5 Self-play dynamics
Task-level dynamics 显示自演化过程不是静止的。以每轮 任务计,GPT-4.1 的 solved rate 从 Iter-1 的 18.2% 增到 Iter-5 的 23.3%;GPT-5.1 从 41.7% 增到最高 48.8% 后略回落到 48.2%;GPT-5.2 则从 36.1% 下降到 23.7%,提示不同 backbone 在对抗压力下的稳定性不同。
Rubric-level pass rate 更细:GPT-4.1 从 79.2% 到 81.5%,平均 rubrics 从 11.7 增到 12.3;GPT-5.1 维持在约 90%–91%;GPT-5.2 从 87.5% 降到 83.8%。这与 Figure 3 的 replay 分布一起说明:self-play 后期任务更难、更细,Cross-Time Replay 必须决定哪些增长是有用泛化,哪些是 adversarial collapse。
Skill 长度也快速增长:GPT-4.1 的 mean skill word count 从 Iter-1 的 313.9 增到 Iter-5 的 1704.1;GPT-5.1 从 1216.4 增到 6289.9;GPT-5.2 从 626.1 增到 3584.8。被 replay 选中的 skill 通常更短或更居中:GPT-4.1 selected mean 840.6,GPT-5.1 selected mean 3632.3,GPT-5.2 selected mean 1749.8。这支持作者关于“最后一轮不一定泛化最好”的判断。
5.6 Transferability and limitations
Skill transferability 结果显示,同 backbone 生成的 skills 最好,但跨 backbone 仍有收益:GPT-4.1 no-skill 11.1,用 GPT-5.1 生成的 skills 可到 16.1,用 GPT-4.1 自己生成的 skills 到 16.5;GPT-5.1 no-skill 21.1,用 GPT-4.1 skills 到 23.1,用 GPT-5.1 skills 到 25.8。这说明 skills 不是纯模型内部技巧,而包含可迁移的上下文程序性知识;但生成者和使用者能力匹配时效果更强。
作者明确限制包括:由于 API budget,只设 、,未探索更大 self-play budget;没有多次 independent runs 来报告 error bars / confidence intervals;尽管覆盖了 CL-bench 全部 500 contexts,统计稳定性仍不等于随机重复实验。未来方向是把 Ctx2Skill 扩展到可验证域(如数学),用 execution feedback 或 formal verification 替代/补充 Judge,形成更紧的 co-evolution loop。