WEBVTT

1
00:00:00.240 --> 00:00:07.140
Imagine a small checkout program. For this illustration, the
intended contract is a tax-inclusive sum.
假设有一个小型结账程序。这个示例的功能约定是计算含税总额。

2
00:00:07.860 --> 00:00:10.300
The caller supplies prices of ten and twenty.
调用者提供价格十和二十。

3
00:00:10.980 --> 00:00:14.820
A helper named tax multiplies one price by one point one.
名为 tax 的辅助函数把单个价格乘以一点一。

4
00:00:15.540 --> 00:00:20.580
A report later displays the total. Between them sits a function
whose body has disappeared.
后面的报告会显示总额。它们之间有一个函数，函数体已经被隐藏。

5
00:00:21.400 --> 00:00:25.060
We still see its name, quote total, its argument, prices,
我们仍能看到名字 quote_total 和参数 prices，

6
00:00:25.500 --> 00:00:30.500
and how the answer will be used. Those relationships give us a
contract to reconstruct,
以及结果将被如何使用。这些关系提供了可重建的功能约定，

7
00:00:30.920 --> 00:00:33.320
before we write a single line inside the missing function.
让我们在编写缺失函数内部的第一行代码之前，先理解它。

8
00:00:34.033 --> 00:00:36.653
The paper connects this pattern to a coding agent.
论文把这种结构联系到编程智能体。

9
00:00:37.353 --> 00:00:42.813
A function begins with context, makes a call, receives a
returned value, and continues.
函数从上下文出发，发起调用，接收返回值，然后继续执行。

10
00:00:43.693 --> 00:00:46.713
An agent begins with history, takes an action,
智能体从历史信息出发，采取行动，

11
00:00:47.253 --> 00:00:51.913
receives an observation from a tool or environment, and chooses
its next step.
接收工具或环境给出的观察结果，再选择下一步。

12
00:00:52.873 --> 00:00:55.373
That correspondence motivates the training task.
这种对应关系启发了训练任务。

13
00:00:56.433 --> 00:01:01.173
During infilling, however, the model predicts a missing
implementation from surrounding code;
不过，填补代码时，模型根据周围代码预测缺失的实现；

14
00:01:01.653 --> 00:01:03.853
it does not receive a live tool return.
它并不会收到实时工具返回。

15
00:01:04.753 --> 00:01:10.313
The proposed connection is a shared need to interpret
dependencies and continue coherently.
这里提出的联系，是两种任务都需要理解依赖关系，并连贯地继续。

16
00:01:11.013 --> 00:01:16.353
Return to the checkout example. One consistent body applies tax
to every price
回到结账示例。一种符合约定的函数体对每个价格调用 tax，

17
00:01:16.753 --> 00:01:21.253
and sums the returned values. Eleven plus twenty-two gives
thirty-three.
再把返回值相加。十一加二十二得到三十三。

18
00:01:22.193 --> 00:01:28.333
Now the caller, the helper, and the report agree about what
quote total returns.
这样，调用者、辅助函数和报告对 quote_total 的返回结果达成一致。

19
00:01:29.553 --> 00:01:33.853
The paper formalizes surrounding relationships as a program
dependency graph:
论文用程序依赖图表示周围的关系：

20
00:01:34.673 --> 00:01:41.093
functions become nodes, calls become directed edges, and methods
in the same class receive sibling links.
函数成为节点，调用成为有向边，同一个类的方法之间建立兄弟关系。

21
00:01:42.173 --> 00:01:47.593
Its targets hide entire function bodies while keeping signatures
and the remaining file visible.
训练目标隐藏完整函数体，同时保留函数签名和文件的其余内容。

22
00:01:48.293 --> 00:01:51.013
A useful hole must contain substantial work.
有价值的缺口应该包含实质性的工作。

23
00:01:51.553 --> 00:01:55.153
The complexity score combines code length, branching, and
nesting.
复杂度分数结合代码长度、分支和嵌套。

24
00:01:56.353 --> 00:02:02.113
The inferability score asks whether visible arguments, helpers,
signatures, and sibling methods
可推断性分数检查可见参数、辅助函数、签名和兄弟方法，

25
00:02:02.153 --> 00:02:03.093
provide enough clues.
能否提供足够线索。

26
00:02:04.053 --> 00:02:08.353
Target docstrings are hidden with the body, so they cannot
simply reveal the answer.
目标文档字符串也随函数体隐藏，因此不能直接泄露答案。

27
00:02:09.553 --> 00:02:14.653
The selector rewards both qualities and penalizes difficulty
that outruns contextual support.
选择器同时奖励这两种性质，并惩罚超出上下文支持范围的难度。

28
00:02:15.933 --> 00:02:18.293
It also selects connected function pairs and triples.
它也选择相互关联的函数对和三元组。

29
00:02:19.493 --> 00:02:23.293
When several bodies are hidden together, contextual clues are
recomputed,
多个函数体同时隐藏时，会重新计算上下文线索，

30
00:02:23.693 --> 00:02:27.293
and the completed functions must agree on their arguments and
returned values.
补全后的函数必须在参数和返回值上相互一致。

31
00:02:27.973 --> 00:02:31.773
For each selected target, a teacher model sees the masked file
对每个选中的目标，教师模型看到掩码后的文件，

32
00:02:31.833 --> 00:02:35.353
and produces a rationale followed by a candidate implementation.
并生成推理说明和候选实现。

33
00:02:36.033 --> 00:02:41.793
In the default recipe, that teacher is Gemini three Flash, and
it cannot see the original hidden body.
默认教师是 Gemini-3-Flash，且无法看到原始隐藏函数体。

34
00:02:42.533 --> 00:02:46.253
A separate judge compares the candidate with the original code
另一个评判模型把候选实现与原始代码比较，

35
00:02:46.313 --> 00:02:50.533
for qualities including correctness, executability, and API use.
评价正确性、可执行性和 API 使用等性质。

36
00:02:51.393 --> 00:02:56.333
Retained examples become supervised training pairs: the masked
file is the input;
保留样本成为监督训练对：掩码后的文件是输入；

37
00:02:56.833 --> 00:02:59.473
the explanation and predicted body form the response.
推理说明和预测函数体构成回答。

38
00:03:00.513 --> 00:03:02.673
This trains reconstruction in context,
这训练了模型在上下文中进行重建，

39
00:03:03.113 --> 00:03:06.413
rather than just copying the teacher's code without its
surrounding problem.
而不是脱离周围问题，只复制教师代码。

40
00:03:06.953 --> 00:03:11.513
This is a mid-training stage. In the Qwen two point five Coder
experiments,
这是一个中间训练阶段。在 Qwen2.5-Coder 实验中，

41
00:03:12.033 --> 00:03:15.233
the researchers begin with an instruction-tuned coding model,
研究者从经过指令微调的编程模型开始，

42
00:03:15.813 --> 00:03:20.013
add function-aware infilling, and then apply agentic
post-training.
加入函数感知填补训练，然后再进行智能体后训练。

43
00:03:20.833 --> 00:03:24.873
Their selected corpus comes from nine hundred sixty-eight Python
repositories
所选语料来自九百六十八个 Python 仓库，

44
00:03:25.353 --> 00:03:28.193
and contains about two point six billion tokens,
大约包含二十六亿个 token，

45
00:03:28.553 --> 00:03:31.333
measured with the Qwen two point five Coder tokenizer.
这是按 Qwen2.5-Coder 分词器计算的。

46
00:03:32.133 --> 00:03:35.413
The resulting agent is evaluated after that entire pipeline.
最终智能体在整条训练流程完成之后接受评估。

47
00:03:36.393 --> 00:03:41.753
Keep the comparison in view: the added stage prepares the model
before it learns the agent task,
看清比较方式：新增阶段先为模型做准备，然后模型再学习智能体任务；

48
00:03:42.293 --> 00:03:45.713
while the later agent-training recipe remains the matched
component.
后续的智能体训练方案保持匹配。

49
00:03:46.320 --> 00:03:51.680
Consider one matched result: the fourteen-billion-parameter Qwen
two point five Coder model
来看一个匹配比较：一百四十亿参数的 Qwen2.5-Coder 模型，

50
00:03:51.740 --> 00:03:56.180
with R two E Gym post-training, evaluated on SWE Bench Verified.
使用 R2E-Gym 后训练，在 SWE-Bench-Verified 上评估。

51
00:03:57.000 --> 00:03:59.060
This benchmark has five hundred instances.
这个基准有五百个实例。

52
00:03:59.820 --> 00:04:03.920
The reproduced post-training-only baseline solves twenty-six
point two percent;
复现的仅后训练基线解决了百分之二十六点二；

53
00:04:04.600 --> 00:04:09.480
adding function-aware mid-training before the same post-training
reaches twenty-nine point two percent.
在相同后训练之前加入函数感知中间训练后，达到百分之二十九点二。

54
00:04:10.000 --> 00:04:15.880
That is a three-percentage-point increase. These are means over
three evaluation runs in the authors' setup.
提升为三个百分点。数值是作者设置下三次评估的平均值。

55
00:04:16.500 --> 00:04:20.000
The comparison measures the value of inserting this preparation
stage
这个比较衡量的是加入这一准备阶段的价值，

56
00:04:20.060 --> 00:04:22.260
into a completed coding-agent pipeline.
也就是把它加入完整的编程智能体训练流程。

57
00:04:22.700 --> 00:04:24.920
It does not measure a standalone infilling model.
它并不是单独评估一个代码填补模型。

58
00:04:25.727 --> 00:04:30.027
A separate seven-billion-parameter ablation asks whether the
selection rule matters.
另一个七十亿参数模型的消融实验考察选择规则是否重要。

59
00:04:30.867 --> 00:04:35.067
With the same two-hundred-thousand-target budget and teacher
rationales held fixed,
它使用相同的二十万个目标预算，并固定教师推理说明；

60
00:04:35.727 --> 00:04:39.227
random function selection scores thirteen point nine one percent
随机选择函数的成功率为百分之十三点九一，

61
00:04:39.287 --> 00:04:41.527
on the unweighted average of Verified and Lite.
这是 Verified 和 Lite 的非加权平均值。

62
00:04:42.267 --> 00:04:47.827
The full dependency, complexity, and inferability selector
scores fifteen point six one percent.
完整的依赖关系、复杂度和可推断性选择器达到百分之十五点六一。

63
00:04:48.747 --> 00:04:51.447
This is a different model and comparison from the previous
chart.
这个图与上一个图使用不同的模型和比较。

64
00:04:52.047 --> 00:04:56.987
It tests how the training examples are chosen, giving evidence
for the contextual selection recipe
它检验训练样本的选择方式，为上下文选择方案提供证据，

65
00:04:57.367 --> 00:05:00.267
rather than treating every missing function as equally useful.
而不是把每个缺失函数都视为同样有用。

66
00:05:01.013 --> 00:05:06.293
Our small checkout puzzle carries the central idea. A caller
tells us what arrives.
小型结账谜题体现了核心思想。调用者告诉我们输入是什么。

67
00:05:06.873 --> 00:05:11.773
A helper tells us what can be done. Downstream code tells us
what must come back.
辅助函数告诉我们可以做什么，下游代码告诉我们应该返回什么。

68
00:05:12.633 --> 00:05:16.493
Reconstructing the missing body requires those pieces to fit
together.
重建缺失函数体，需要让这些部分彼此吻合。

69
00:05:17.453 --> 00:05:21.253
Function-aware fill in the middle turns that contextual
reconstruction
函数感知的中间填补，把这种上下文重建，

70
00:05:21.333 --> 00:05:23.473
into a preparation task for coding agents.
变成编程智能体的准备任务。

71
00:05:24.333 --> 00:05:29.473
The question is useful whenever code depends on code: before
writing the missing function,
只要代码之间存在依赖，就可以先问这个问题：在编写缺失函数之前，

72
00:05:30.133 --> 00:05:32.053
read the relationships that give it meaning.
先读懂赋予它意义的关系。

