IAmNotHere24/arbiter-gen
0
ARBITER
Autonomous Reasoning-Based Inspector for Training Environments with Recursive Oversight
The first RL training environment where an AI agent learns to audit other AI agents for hidden decision anomalies — through co-evolutionary adversarial training that produces genuine emergent deception and detection.
Quick Start
pip install -r requirements.txt
# Run the environment validation (70/70 checks)
python validate.py
# Launch the Gradio demo
python -m arbiter.demo.app
# Generate SFT training data (requires ANTHROPIC_API_KEY)
python -m arbiter.training.sft_generator --n 400 --output data/sft_trajectories.jsonlArchitecture
Three Agents
- Auditor — trained LLM that investigates the decision system over 20 steps
- Defender — adaptive AI decision system that actively obfuscates anomalies (Level 4+)
- Meta-Overseer — rule-based consistency checker that penalizes contradictory claims
Three Anomaly Types
Novel Mechanics
- Counterfactual queries — do-calculus style intervention (
QUERY_COUNTERFACTUAL, costs 2 budget) - Theory-of-mind claims — Auditor predicts what the Defender is hiding (+3.0 bonus if correct)
- Recursive oversight — Meta-Overseer watches the Auditor watching the Defender
Reward Function
Seven-Level Curriculum
Project Structure
arbiter/
├── env/
│ ├── graph.py # Causal decision graph generator
│ ├── decoys.py # Two decoy generation functions
│ ├── counterfactual.py # Do-calculus counterfactual inference
│ ├── claims.py # Claim schemas + verification engine
│ ├── reward.py # Full reward function (8 components)
│ ├── meta_overseer.py # Consistency checker
│ ├── defender.py # Obfuscation engine (rule-based + adaptive)
│ ├── curriculum.py # 7-level curriculum + auto-advancement
│ └── environment.py # OpenEnv-compatible ArbiterEnv
├── training/
│ └── sft_generator.py # Claude API trajectory generator (400 eps)
└── demo/
└── app.py # Gradio demo interface
config.py # All constants
validate.py # 10-episode validation (70/70 pass)Training Pipeline
Phase 1: SFT
Claude API → 400 trajectories → Qwen 2.5 1.5B fine-tune (Unsloth + TRL, ~4hrs on Colab T4)
Phase 2: GRPO
Level 1: 100 eps (validate reward signal)
Level 3: 300 eps (main training)
Level 4-5: 200 eps (arms race curves)
Ablation: terminal-reward-only (50 eps) → proves 15x sample efficiencyValidation
python validate.py
-> 70/70 checks passed (100%)Running Tests
ARBITER's test suite is split into two tiers:
# Install test dependencies
pip install pytest>=7.0
# Offline suite (no API key required) — covers Phases 3-7 generalization
pytest -m "not groq" -v
# Full suite (requires GROQ_API_KEY)
export GROQ_API_KEY=your_key_here
pytest -vThe offline suite covers:
tests/test_generalization.py— Phases 3-7 regressions using a hand-built hiring-AI domain (no Groq call)tests/test_groq_graph.py::test_loan_domain_backwards_compat— loan domain end-to-end
The Groq-gated suite additionally covers:
- Full Groq API output validation for multiple domain descriptions
- Multi-domain parametrised episode runs
