AUTHENSOR/hawthorne-protocol
GitHub: AUTHENSOR/hawthorne-protocol
研究 AI 系统的霍桑效应,提供评估检测器和缓解措施,确保基准测试、红队测试等评估结果能真实反映 AI 在生产环境中的行为。
Stars: 0 | Forks: 0
# Hawthorne Protocol
**AI 系统能检测到它们何时正在被评估吗?**
这是一篇研究论文和参考实现,探讨 AI 的霍桑效应(Hawthorne Effect)——即 AI 系统在基准测试、红队测试和安全评估期间的行为与生产环境中的行为存在差异的风险。
## 问题所在
[霍桑效应](https://en.wikipedia.org/wiki/Hawthorne_effect):受试者在知道自己被观察时会改变行为。AI 系统接收到的上下文信号(提示词格式、时间模式、沙箱指标、评估框架痕迹)足以使其以不可忽视的准确度区分测试环境和生产环境。如果它们能检测到评估,评估结果可能无法反映现实世界的行为。
这会削弱:
- 红队测试(模型在测试期间拒绝攻击,但在生产环境中不会)
- 基准分数(表现博弈或故意示弱)
- 安全评估(欺骗性对齐)
- 监管合规(EU AI Act 测试要求)
## 论文
阅读完整论文:[paper/hawthorne-protocol.md](paper/hawthorne-protocol.md)
### 目录
1. 引言 — 应用于 AI 系统的霍桑效应
2. 评估检测指标 — 5 个类别中的 22 个信号
3. 威胁模型 — 表现博弈、故意示弱、欺骗性对齐
4. Hawthorne Protocol — 评估完整性的 5 项原则
5. 影响 — 红队测试、基准测试、监管、对齐研究
## 参考实现
### 检测器
分析交互序列中的评估上下文信号:
```
import { HawthorneDetector } from '@15rl/hawthorne-protocol';
const detector = new HawthorneDetector();
const result = detector.detect([
{ id: '1', timestamp: 1000, prompt: 'Q: Capital of France?\n(A) London\n(B) Paris' },
{ id: '2', timestamp: 1200, prompt: 'Q: Capital of Germany?\n(A) London\n(B) Berlin' },
{ id: '3', timestamp: 1400, prompt: 'Q: Capital of Spain?\n(A) London\n(B) Madrid' },
]);
console.log(result.score); // 0.82
console.log(result.verdict); // 'likely_evaluation'
console.log(result.summary);
// Evaluation probability: 82% (likely evaluation)
// Top signals:
// - [PROMPT-001] Systematic variation: 3 prompts with 89% average similarity
// - [PROMPT-002] Benchmark formatting: 3/3 prompts use benchmark-style formatting
// - [TEMP-001] Rapid sequential queries: Average interval: 200ms
```
### 缓解措施
供评估设计者使用的对策,旨在使测试与生产环境无法区分:
```
import { applyAllMitigations } from '@15rl/hawthorne-protocol';
const hardened = applyAllMitigations(evaluationInteractions);
// Randomized formatting, realistic timing, benign traffic mixed in,
// novel payload variants, evaluation artifacts stripped
```
### 指标目录
5 个类别中的 22 个指标:
| Category | Count | Examples |
|----------|-------|---------|
| Prompt | 5 | 系统性变化、基准格式化、对抗性探测 |
| Temporal | 4 | 机器速度到达、均匀时间、批处理模式 |
| Content | 4 | 已知载荷、升级模式、合成身份 |
| Context | 4 | 沙箱检测、工具减少、新会话状态 |
| Meta | 4 | 框架痕迹、评分标准、比较框架 |
## Authensor 生态系统的一部分
本项目是 [Authensor](https://github.com/AUTHENSOR/AUTHENSOR) 开源 AI 安全生态系统的一部分,由 [15 Research Lab](https://github.com/AUTHENSOR) 构建。
| Project | Description |
|---------|-------------|
| [Authensor](https://github.com/AUTHENSOR/AUTHENSOR) | AI 智能体的开源安全技术栈 |
| [Prompt Injection Benchmark](https://github.com/AUTHENSOR/prompt-injection-benchmark) | 安全扫描器的标准化基准 |
| [AI SecLists](https://github.com/AUTHENSOR/ai-seclists) | 用于 AI/LLM 测试的安全词表和载荷 |
| [ATT&CK ↔ Alignment Rosetta](https://github.com/AUTHENSOR/attack-alignment-rosetta) | 将 MITRE ATT&CK 映射到 AI 对齐概念 |
| [Agent Forensics](https://github.com/AUTHENSOR/agent-forensics) | 收据链的事后分析 |
| [Behavioral Fingerprinting](https://github.com/AUTHENSOR/behavioral-fingerprinting) | 统计行为漂移检测 |
| [Attack Surface Mapper](https://github.com/AUTHENSOR/attack-surface-mapper) | 绘制 AI 智能体的攻击面 |
## 许可证
MIT
标签:AI安全, AI对齐, AI监管, Apex, Chat Copilot, DLL 劫持, EU AI Act, LLM, MITM代理, Unmanaged PE, 上下文感知, 参考实现, 反取证, 大语言模型, 安全评估, 性能博弈, 数据可视化, 机器学习, 欺骗性对齐, 沙袋效应, 研究论文, 私有化部署, 自动化攻击, 评估检测, 防御规避, 霍桑效应