Paper: 2606.26094 Authors: Babak Rahmani, Sebastian Dziadzio, Joschka Strüber, Sergio Hernández-Gutiérrez, Matthias Bethge Categories: cs.LG
The Gap
Existing work in inverse reinforcement learning, behavior cloning, and imitation learning assumes either full access to expert trajectories or a known reward function. When the underlying policy is a hidden program (e.g., an LLM-generated decision rule), these methods collapse because the mapping from observations to internal logic is not smooth or parametric. Moreover, prior benchmarks for policy reconstruction do not allow the learner to intervene — they treat observation as passive. This paper fills that gap by formalizing the inverse problem in code-space with a benchmark that explicitly rewards active experiment design: the learner can craft custom opponents to probe the hidden policy.
[Problem: Hidden programmatic policy unknown]
|
v
[Assumption: Only behavioral traces vs. sampled opponents are visible]
|
v
[Method: Learner designs custom opponents as experiments, observes traces, then submits executable hypothesis]
|
v
[Evidence: Continuous action-distance metrics + downstream tournament win-rate]
|
v
[Conclusion: Reverse-engineering code-space policies is tractable and benefits from intervention]
The Increment
One sentence: Before this paper, inferring hidden mechanisms from behavior was limited to passive observation or parametric models; after, we can actively design experiments to reconstruct exact executable code policies.
Core Mechanism
The method is structured as a three-phase benchmark. First, an observation phase: the hidden target policy plays against a fixed set of stock opponents, generating behavioral traces (state-action sequences). Second, an experiment design phase: the learner (e.g., an LLM) is allowed to propose custom opponent policies that the target will play against. These opponents are not arbitrary — they must be submitted as executable code, so the learner can carefully design probing strategies (e.g., always move left, or use a specific opening). Third, a reconstruction phase: the learner submits a hypothesis — a piece of code that claims to reproduce the target’s behavior. The quality is measured by continuous action-distance between the hypothesis and the true target over a held-out set of test games.
[Observation Phase]
Target policy ---> vs. stock opponents ---> traces
|
[Experiment Design Phase]
Learner --> custom opponents --> vs. target --> new traces
|
[Reconstruction Phase]
Learner --> hypothesis code --> compare with target via distance metric
|
[Validation] Downstream tournaments: hypothesis vs. other policies
Structural metaphor: Think of the target policy as a secret chess opening book — a sequence of rules dictating which move to play in each position. You, the learner, are a grandmaster who wants to reconstruct that book. You cannot peek inside; you can only play games against it. First, you play a few random openings (stock opponents) and record the secret book’s replies. Then, you deliberately choose unusual moves (custom opponents) to see how the book reacts in rare positions. After collecting enough “behavioral probes,” you write down what you think the rules are (hypothesis code). Finally, you submit that book and see how accurately it predicts the secret book’s moves in new, unseen positions. If your reconstructed book wins against other books in a tournament, that’s extra validation. The mapping: target policy → secret book, stock opponents → random opening games, custom opponents → probing moves, hypothesis code → your reconstructed book, distance metric → prediction error, tournament → your book vs. others.
Key Concepts
-
Behavioral Experiments: Unlike passive observation, here the learner can *design the conditions under which they observe the target. This is the reverse-engineering analogue of perturbation experiments in biology. For example, you can force the target to face an opponent that always moves left, and see how the target responds — this disambiguates whether the target has a “dodge left” rule or a “dodge right” rule. Without such an intervention, both rules might produce similar behavior against random opponents.
-
Code-Space Policy: The target’s decision rule is represented as *executable code (e.g., a Python function), not as a neural network or a set of parameters. This means the reconstruction problem is discrete (syntax) and compositional. A small change in code can produce a large change in behavior. This differs from standard imitation learning where the policy is a continuous function approximator.
-
Elo-Calibrated Policies: The benchmark generates policies using LLMs and then adjusts their strength via Elo ratings so that they are all competitive but not trivial to beat. This ensures that the reconstruction task is neither too easy (because the policy is too predictable) nor too hard (because it’s superhuman). It also prevents learners from just copying a winning strategy — they have to recover the *specific policy.
Framework Shift
Before (mainstream inverse RL):
[Observed trajectories] ---> [Parametric model (e.g., neural policy)] ---> [Behavior prediction]
(No ability to intervene; model is a black-box function)
After (this paper):
[Observed trajectories] + [Designed experiments] ---> [Executable code hypothesis] ---> [Behavior prediction + interpretable rules]
(Intervention actively disambiguates; output is transparent code)
From passive observation plus parametric inference to active intervention plus programmatic reconstruction — the core shift is that the learner is no longer a passive statistician but an experimentalist who can design probes to isolate underlying rules.
Expert Assessment
Problem choice: Real and well-motivated gap. The inverse problem of recovering programmatic policies from behavior is relevant to interpretability, opponent modeling, and AI safety. The paper sits at a natural intersection of program synthesis and behavioral cloning, and the community needs benchmarks like this.
Method maturity: Clever benchmark design, but the paper does not propose a new reconstruction algorithm — it evaluates existing LLMs. The benchmark itself is the contribution. That’s fine for a benchmark paper, but the lack of a dedicated reconstruction baseline (e.g., program synthesis with search) is a missed opportunity. The brute-force approach of asking LLMs is interesting but not optimized.
Experimental integrity: Baselines are fair — they compare numerous LLMs on the same task. The use of continuous action-distance and tournament validation is solid. One red flag: the benchmark only includes 75 policies across 5 environments. Generalizability to real-world game AIs or other domains is unknown. Also, the evaluation code is not yet public (as of the preprint).
Writing quality: Clear structure, but the “Core Mechanism” section could be more explicit about the exact prompt format used for LLMs. The metaphor is helpful, but the paper itself doesn’t include it — you’d have to derive it. Rewriting the experimental design section with a concrete example would elevate it.
Verdict: weak accept — a useful benchmark that opens a new direction, but limited in scope and without a novel algorithmic contribution.
Takeaways
- Practitioners can borrow the idea of experiment design as prompt engineering: if you want to reverse-engineer a black-box agent, craft queries (opponents) that force it to reveal its decision boundaries. This transfers to any domain where you can interact with the target.
- The continuous action-distance metric is a good template for evaluating programmatic reconstructions: instead of exact match, measure how close two policies behave over a test set. This is more robust to trivial differences.
- The Elo-calibration preprocessing ensures that the benchmarking task is discriminative — a technique worth adopting when building any policy-recovery benchmark to avoid ceiling/floor effects.
- If you’re building an AI assistant that needs to infer user preferences from interaction, the active probing loop here is directly applicable: the assistant should ask targeted questions, not just passively observe.
论文: 2606.26094 作者: Babak Rahmani, Sebastian Dziadzio, Joschka Strüber, Sergio Hernández-Gutiérrez, Matthias Bethge 分类: cs.LG
缺口
现有逆向强化学习、行为克隆等方法假设可以完全观测状态-动作对或奖励函数。当隐藏策略是一个程序(如LLM生成的决策规则)时,这些方法失效了,因为观测到行为到内部逻辑的映射不是平滑或参数化的。此外,之前的策略重建基准不允许学习者主动干预——学习者只能被动观察。这篇论文填补了这个空白:它形式化了代码空间的逆向问题,并构建了一个明确奖励主动实验设计的基准——学习者可以定制对手来探针隐藏策略。
[问题:隐藏程序策略未知]
|
v
[假设:仅能观测到目标与采样对手的行为轨迹]
|
v
[方法:学习者设计定制对手作为实验,观测新轨迹,提交可执行假设]
|
v
[证据:连续动作距离指标 + 下游锦标赛胜率]
|
v
[结论:代码空间策略的逆向工程是可行的,且主动干预有助于恢复]
增量
一句话:这篇论文之前,从行为推断隐藏机制仅限于被动观察或参数模型;之后,我们可以主动设计实验来重建精确的可执行代码策略。
核心机制
基准测试分为三个阶段。第一阶段是观测阶段:隐藏目标策略与一组固定对手博弈,生成行为轨迹(状态-动作序列)。第二阶段是实验设计阶段:学习者(例如一个LLM)可以提交定制对手策略(可执行代码),目标策略会与这些对手对弈。学习者可以精心设计探索性对手来诱发特殊行为(例如让对手只向左移动)。第三阶段是重建阶段:学习者提交一个假设——即声称能复现目标策略行为的代码。重建质量通过连续动作距离指标来衡量:在未参与过训练的保留测试对局中,计算假设策略与真实目标策略的动作差异。此外,基准还通过下游锦标赛验证——假设策略与其他策略对战时的胜率。
[观测阶段]
目标策略 ---> vs. 固定对手 --> 行为轨迹
|
[实验设计阶段]
学习者 --> 定制对手 --> vs. 目标 --> 新轨迹
|
[重建阶段]
学习者 --> 假设代码 --> 通过距离指标与真实目标对比
|
[下游验证] 锦标赛:假设 vs. 其他策略
结构比喻:把目标策略想象成一本秘密棋谱——定义了每步棋走法的规则。你是一位棋手,想要重建这本棋谱。你无法直接看棋谱,只能通过下棋来试探。首先,你随便走几步(固定对手),记录秘密棋谱的应对。然后,你故意走一些偏门招法(定制对手),看棋谱如何回应不常见的局面。收集足够多的行为探针后,你写下你认为的规则(假设代码)。最后,提交棋谱,看它在全新局面下能否准确预测原棋谱的走法。如果重建的棋谱在锦标赛中能赢其他棋谱,那就是额外验证。映射关系:目标策略→秘密棋谱,固定对手→随便走几步,定制对手→偏门招法,假设代码→重建棋谱,距离指标→预测误差,锦标赛→重建棋谱对其他棋谱。
关键概念
-
行为实验:与被动观察不同,学习者可以**设计*观测条件。这是生物学中扰动实验的模拟。例如,你可以让目标面对一个总是向左走的对手,观察目标如何反应——这可以区分目标规则是“向左躲”还是“向右躲”。没有这种干预,两种规则面对随机对手时可能难以区分。
-
代码空间策略:目标的决策规则表示为**可执行代码*(如Python函数),而不是神经网络参数。这意味着重建问题是离散的(语法)和组合式的。代码的一小改动可能导致行为大变化。这与标准模仿学习不同,后者假设策略是连续函数。
-
Elo校淮策略:基准使用LLM生成策略,然后通过Elo评分调整其强度,使所有策略都有竞争力但不过强。这确保重建任务既不太容易(策略太简单)也不太难(策略太强)。同时也防止学习者直接复制获胜策略——他们必须恢复**特定*的策略。
框架转变
之前(主流逆向RL):
[观测轨迹] ---> [参数模型(如神经网络)] ---> [行为预测]
(无干预能力;模型是黑箱函数)
之后(本文):
[观测轨迹] + [设计实验] ---> [可执行代码假设] ---> [行为预测 + 可解释规则]
(干预主动消歧;输出是透明代码)
从被动观测加参数推断,到主动实验加程序重建——核心转变是:学习者不再是被动统计员,而是实验者,可以设计探针来分离底层规则。
专家评审
选题眼光: 真实且有意义的缺口。从行为恢复程序化策略对可解释性、对手建模和AI安全都很重要。该基准位于程序合成与行为克隆的交汇点,社区正需要这样的基准。
方法成熟度: 基准设计巧妙,但论文没有提出新的重建算法——它只评估了现有LLM。作为基准论文这是可以的,但没有引入专用的重建基线(比如基于搜索的程序合成)是一个遗憾。用LLM来做是巧劲但不是最优。
实验诚意: 基线公平——对比了多个LLM在同一任务上的表现。使用连续动作距离和锦标赛验证是合理的。一个警示:基准只包含5个环境下的75个策略,对现实游戏AI或其他领域的通用性未知。此外,截至预印本,评估代码尚未公开。
写作功力: 结构清晰,但“核心机制”部分可以更明确地说明LLM使用的提示格式。比喻很有帮助,但论文本身没有包含它——需要读者自己推导。若能用具体例子重写实验设计部分,整篇论文会提升一个档次。
判决: 弱接收 —— 一个有用的基准,开辟了新方向,但范围有限,且没有新颖的算法贡献。
要点总结
- 实践者可以借鉴实验设计作为提示工程的思路:如果想要逆向工程一个黑箱智能体,可以构造查询(对手)来迫使它暴露决策边界。这适用于任何能与目标交互的领域。
- 连续动作距离指标是评估程序化重建的好模板:不要求精确匹配,而是衡量两个策略在测试集上的行为接近程度。这更鲁棒。
- Elo校淮预处理确保基准任务有区分度——这是构建任何策略恢复基准时值得采用的技术,用来避免天花板或地板效应。
- 如果你在构建一个需要从交互中推断用户偏好的AI助手,本文的主动探针循环直接适用:助手应该提出有针对性的问题,而不是被动观察。