---
title: "通过约束实现可控性：代码智能体可扩展监督的基础"
source: "arXiv AI/CL/LG（论文）"
source_tier: "t2"
url: "https://arxiv.org/abs/2607.02389v1"
permalink: "https://feed.astralor.com/items/itm_0c7d02a286334a5c6e43bdf3"
published: "2026-07-02T16:24:47.000Z"
score: 55
channel: "ai"
tags: ["AI安全","代码智能体","后门检测","约束监督"]
---

# 通过约束实现可控性：代码智能体可扩展监督的基础

## 速览

本文提出通过约束（如访问控制、网络策略、编码规范）来监督代码生成智能体，取代昂贵且不安全的无约束方案。实验表明，在Python代码库中检测后门时，使用约束基底可将召回率从54.5%提升至90.9%，且约束与工具贡献相互独立。该方法适用于语言保障较弱的场景（如Python），并可扩展到Rust等语言。

## 关键点

- 无约束代码智能体带来安全风险与代码库退化，人类审查成本剧增
- 传统工程管理约束（ACL、网络策略、编码规范）可直接迁移至智能体，且token成本更低
- 实验采用Gemma 4 e4b小型审查器，约束基底+200行脚本提升召回率至90.9%
- Python语言默认保证少，约束收益最大；原理可推广至Rust等强类型语言

## 全文

Coding agents are capable; human oversight is the bottleneck. Unconstrained agents introduce security risks, erode codebase scalability, and make human review increasingly costly. We argue that the same methods used for decades to manage large human engineering teams: access control, network policies, strict coding conventions enforced by tooling; transfer directly to coding agents, and are cheaper (in token) than recent agentic scaffolding. We sketch a start-to-end system on this principle, and report a controlled experiment in scalable oversight: a small reviewer (Gemma 4 e4b) inspects a Python codebase containing 11 inserted backdoors. Recall rises from 54.5% (unconstrained, no tools) to 90.9% (constrained substrate plus a ~200-LoC `docs` CLI), with substrate and tools contributing independently. We choose Python deliberately: substrate-level oversight gains are largest where the language gives the fewest guarantees by default; the principles extend to languages like Rust.

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_0c7d02a286334a5c6e43bdf3
