精读笔记
Problem Setting
论文标题:Learning Gait-Aware Quadruped Locomotion with Temporal Logic Specifications(arXiv preprint / 2026-07-02)。这篇论文实际处理的是四足机器人在一个统一 policy 中跨低速、中速、高速速度区间切换步态的问题。表面任务是 command tracking,但真正困难点是 tracking、stability、energy efficiency 和 gait structure 之间不是同一个 reward landscape:低速希望支撑更充分,高速希望出现 flight/fore-hind pair support,静态 reward 很容易把所有速度压到一个折中的 dominant gait。以前的 hand-crafted locomotion reward 可以通过速度、姿态、能耗项学到可用运动,但它们对 contact sequence 的控制是间接的;imitation / gait schedule 又会引入更强 supervision 或更硬的脚本化结构。关键矛盾是:既想保留 end-to-end RL 的闭环适应性,又想显式规定 gait-level temporal structure,而不是让它从一堆 scalar heuristics 中偶然涌现。
Motivation
已有路线缺的是一种介于 black-box reward tuning 和 explicit gait controller 之间的表达层。作者的核心观察是 gait 不是单个时刻的属性,而是短窗口内 contact、phase、support pattern 的时序关系;因此用 Markovian instantaneous reward 描述 gait,本质上是错位建模。Temporal logic 的吸引力在于它能把“始终保持姿态边界”“最近窗口内出现多足支撑”“bound 时要有前/后腿成对触地与 flight fraction”等需求写成可检查的规范,同时 robustness semantics 又能提供连续 reward。换句话说,缺口不是缺一个更复杂的网络,而是缺一个能把 gait prior 以 dense training signal 形式注入 RL 的中间表示。
Core Idea
核心思想是把多步态 locomotion 的 reward 组织成 mode-conditioned STL specification,而不是一组全局固定 reward terms。速度命令先决定当前 gait mode:walking-trot、trot 或 bound;每个 mode 对应一套 safety、tracking 和 gait-pattern predicates;policy 训练时收到的是当前窗口轨迹对这些 predicates 的平滑 robustness,而不是只看当前状态的即时误差。
这个建模改变很关键:它把 gait prior 从“希望 reward 权重能诱导出某种 contact pattern”变成“直接评价过去一个 gait cycle 是否满足该 contact pattern”。本质区别不是用了 STL 这个 formalism,而是把 reward 的信息流从 state-level scalar shaping 提升到 trajectory-window-level structural shaping。它引入的 inductive bias 很强:速度区间与步态族绑定,contact topology 被显式奖励,失败可以回溯到具体 violated predicate。这比纯 heuristic 更可解释,也比硬编码 gait schedule 更软,因为最终 foot timing 仍由 policy 学出来。
Method
方法上真正必要的机制有四个。第一,mode-dependent specification 解决的是单一 reward 对多 gait 目标冲突的问题;不同速度段激活不同 gait template,让高速 bound 不必和低速支撑稳定共享同一套 contact preference。第二,windowed robustness 解决的是 gait temporal structure 无法由单帧 reward 表达的问题;它用一个覆盖约一周期的历史窗口评价 contact fraction、phase error、flight、pair touchdown 等时序统计。第三,PSTL parameter fitting 解决的是 predicate threshold 手调过重的问题;作者从每个 gait regime 的 expert rollouts 中用 quantile 校准阈值,但这更像 data-calibrated reward engineering,而不是完整的 specification learning。第四,smooth soft-min/tanh aggregation 解决的是 STL 原始 min/max robustness 对 PPO 不友好的问题;它牺牲一部分逻辑语义精确性,换来 dense、bounded、可优化的 reward landscape。
需要注意的是,MJX 并行、domain randomization、curriculum、PPO 超参不是论文的概念贡献,但它们可能显著影响最终效果。尤其 bound gait 的出现很可能依赖速度 curriculum 和 mode-specific reward 同时作用,而不是 STL 单独带来的能力。
Key Insight / Why It Works
最可能有效的核心不是“formal logic 让 RL 会推理”,而是“把正确的 gait-level inductive bias 放进 reward”。四足 gait 的很多约束天然是短时序逻辑:某类 contact state 的占比、对角腿同步误差、是否出现 flight、是否出现前/后腿成对 touchdown。这些信号如果被拆成即时 heuristic,credit assignment 会变差,而且不同 gait regime 会相互干扰;用窗口 robustness 聚合后,policy 得到的是更对齐目标结构的 dense gradient。
我认为最实质的贡献是 mode-conditioned temporal reward design,而不是 STL 形式本身。STL 提供了清晰的语言和 robustness semantics,但这里的性能增益更可能来自三个因素的叠加:第一,speed-to-gait mode 明确减少了多模态目标冲突;第二,contact-pattern predicates 直接监督了 gait topology;第三,从 expert trajectories 校准阈值让 reward 与可行 gait statistics 对齐。这里没有真正的 long-horizon planning,也没有 evidence 说明 policy 学到了可组合的 temporal reasoning;更准确地说,它学到的是在给定速度模式下复用被 reward 强约束的 locomotion pattern。
哪些部分可能只是辅助:soft-min/tanh 是训练稳定化,hysteresis 是避免 reward template chattering,domain randomization 是常规 robustness recipe,MJX/8192 env/200M steps 是 scaling。哪些地方增益来源不清:baseline 是静态 heuristic,STL 是 mode-aware 且有 expert-calibrated contact prior,这不是只比较“STL vs heuristic”,而是比较“显式 gait-conditioned reward vs 非 gait-conditioned reward”。因此结果支持 specification-shaped reward 有用,但不能单独归因到 temporal logic formalism。
Relation To Prior Work
这篇工作最接近三条线:STL/LTL reward shaping、phase/contact-guided quadruped RL、以及 multi-gait hierarchical / latent locomotion。与 STL-RL prior 的差异在于应用对象从导航/简单控制转向高维 contact-rich quadruped locomotion,并把 predicates 设计成 gait-structural signals;与 quadruped gait prior work 的差异在于它不直接输出 gait schedule、CPG phase 或 high-level footfall plan,而是把这些结构作为 reward specification 约束低层 policy。
看似新的部分中,robustness-as-reward、PSTL threshold fitting、soft robustness 都是已有思想重组;真正新增的信息在于把它们组合成一个可训练的 mode-aware locomotion reward pipeline,并证明在 Barkour/MJX 上能压住多速度 gait collapse。它属于 specification-guided RL / structured reward shaping 谱系,而不是 model-based control 或真正的 symbolic planning。与 latent multi-gait representation 相比,它牺牲自动发现能力,换来可解释性和更强人工控制;与 hierarchical gait controllers 相比,它牺牲明确可控的 footstep plan,换来 end-to-end policy 的简单部署。
Dataset / Evaluation
评估覆盖了一个较窄但有针对性的范围:Barkour vb、MJX 仿真、平地、速度命令为主,附录有 mixed lateral/yaw command。它确实验证了核心 claim 的一部分:在固定仿真环境中,mode-aware STL reward 能比静态 heuristic baseline 更稳定地覆盖低中高速,并在高速区间诱导 bound-like behavior。
但 evaluation 没有证明更强的泛化 claim。没有真机,没有 terrain variation,没有跨机器人 morphology,没有 unseen gait family,也没有系统 ablation 说明每类 predicate、threshold fitting、hysteresis、curriculum 分别贡献多少。baseline 对比也有偏:heuristic-best 在原设置下强,但未必为高速度 bound regime 重新设计;heuristic-default 又明显没有调好。因此实验更像 reward design effectiveness demo,而不是一个充分隔离变量的 scientific comparison。文中未充分说明 STL reward 是否在更复杂命令分布下仍保持 gait interpretability,附录 mixed command 在最高速 success 下降也提示其边界已经出现。
Limitation
最大限制是方法把“如何设计 reward”转移成“如何设计 specification template”。gait family、速度阈值、hysteresis、predicate 集合、窗口长度、阈值、权重都需要人为选择或 expert rollout 校准;如果换地形、换 morphology、换任务,这些 specification 很可能要重写。所谓 data-driven parameter learning 只是在固定 template 上拟合参数,不是自动学习 temporal abstraction。
第二,泛化性并未成立。当前 mode selection 基本只依赖 forward speed,没有 terrain、slope、roughness、payload、disturbance state;真实动物式 gait transition 往往由速度、地形、能耗、稳定裕度共同决定。这里的 policy 更像 speed-indexed gait retriever,而不是 context-aware gait reasoner。
第三,增益归因不清。STL-based reward 同时拥有 explicit gait supervision、expert-calibrated thresholds、curriculum、large-scale parallel training 和 domain randomization;baseline 是静态 heuristic。没有充分 ablation 时,很难判断提升来自 temporal logic 的语义,还是来自更强的 hand-designed contact prior。第四,仿真到真机缺口很大:contact fraction、flight phase、torque limit、CoM height 等 predicates 在真实机器人上受 sensing/filtering/latency/actuator saturation 影响更明显,robustness reward 训练出的 gait 未必可直接 transfer。
Takeaway
- 最值得记住的不是“STL 可以用于四足 RL”,而是:gait reward 应该在 temporal-structural level 设计,而不是把 contact behavior 希望性地埋进即时 heuristic。
- 第二,mode-conditioned reward 是解决 multi-gait collapse 的有效强先验;它可能比学习一个完全无结构 latent gait space 更可控,但扩展到复杂环境时需要更智能的 mode selection。
- 第三,formal specification 的真正价值在于提供可诊断、可组合、可调试的 reward interface,而不是提供符号推理能力。
- 第四,未来更值得做的是把 specification 从 speed-triggered template 推进到 terrain/task-conditioned adaptive template,或者学习 predicate/template 本身,否则 scaling 到真实 deployment 会变成越来越复杂的人工规则库。
一句话总结
这篇论文把四足多步态 RL 从静态 heuristic reward 推向 specification-guided、mode-aware temporal reward shaping,是一篇强 inductive-bias 的 reward engineering 工作,而不是证明机器人学到了真正形式化推理的工作。
