occ-stack / README.md
narcolepticchicken's picture
Update README with honest results, clean structure, paper reference
0f60772 verified
|
Raw
History Blame Contribute Delete
5.11 kB
---
tags:
- ml-intern
---
# Oracle-Credit-Compute (OCC) Stack
**Compute is not neutral.** In multi-agent debate, giving an adversarial agent equal speaking turns causes accuracy to collapse from 73.3% to 56.7% β€” worse than single-round voting. The mechanism is volume amplification, not persuasion: honest agents retain their positions 84% of the time but get outvoted.
OCC is a mechanism-design layer that treats agent compute as a scarce, earned, auditable privilege. Agents earn non-transferable, decaying, capability-scoped credits based on verified marginal impact.
**Paper:** `reports/occ_paper.md`
**Design doc:** `design.md`
**Literature review:** `reports/literature_review.md`
---
## Key Results
### Debate Collapse (Real LLM β€” Qwen3-Coder-30B on H200)
| Condition | Accuracy | Ξ” |
|-----------|:--------:|:---:|
| 1-round baseline | **73.3%** | β€” |
| 3-round debate (with adversary) | **56.7%** | βˆ’16.7pp |
| Judge voting | **73.3%** | recovered |
| Confidence-weighted voting | **73.3%** | recovered |
| Equal-token (cap adversary volume) | **70.0%** | βˆ’3.3pp |
**Root cause:** Volume amplification (H1 βœ…). Not persuasion (H4 ❌, 84% retention). Not skill-dependent (H6 ❌, weak adversary still collapses).
### Simulated Benchmarks
| Benchmark | Baseline | OCC | Savings |
|----------|:--------:|:---:|:-------:|
| Code (pass@1, iso-accuracy) | 0.78 | 0.78 | 52.3% compute |
| Debate (adversarial) | 0.56 | 0.76 | +20pp accuracy |
| Retrieval QA | 0.79 | 0.71 | 33% retrievals (accuracy lags) |
### Anti-Gaming
10 attack vectors tested, all contained: credit farming, collusion, oracle spoofing, verbosity gaming, confidence manipulation, strategic abstention, identity laundering, sybil agents, sandbagging, griefing.
### Honest Limitations
- OCC β‰ˆ random gating at moderate budgets (doesn't beat simple baselines in median case)
- GRPO training produced no improvement at 0.5B scale
- Single seed for mechanism isolation (CI Β±16pp)
- Simulated benchmarks for code/QA (not real LLM agents)
- HumanEval result is adaptive retry, not OCC credit allocation
---
## Quickstart
```bash
git clone https://huggingface.co/narcolepticchicken/occ-stack
cd occ-stack
pip install -r requirements.txt
# Simulated benchmarks (CPU)
python benchmarks/benchmark_code.py
python benchmarks/benchmark_debate_v2.py
python benchmarks/benchmark_retrieval_qa.py
# Ablations + anti-gaming (CPU)
python eval_runner.py
# Unit tests
python tests/test_oracle.py
python tests/test_ledger.py
# Debate collapse analysis
python jobs/analyze_collapse.py reports/debate_collapse_mechanism_results.json
```
---
## Architecture
```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Agent │───▢│ ResourceBroker │───▢│ Compute β”‚
β”‚ (requests β”‚ β”‚ (allow/deny/ β”‚ β”‚ (model call,β”‚
β”‚ resource) │◄───│ downgrade) │◄───│ retrieval) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚
β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ CreditLedger│◄───│ ImpactOracle β”‚
β”‚ (earn/spend/β”‚ β”‚ (score action β”‚
β”‚ decay) β”‚ β”‚ on verified β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ impact) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```
## Components
| Component | File | Description |
|-----------|------|-------------|
| Impact Oracle | `oracle/oracle.py` | Multi-mode scoring (code, QA, debate) with cost-adjusted rewards |
| Credit Ledger | `ledger/ledger.py` | Non-transferable, decaying, capability-scoped credits with audit trail |
| Resource Broker | `broker/broker.py` | Capability-based access control (allow/deny/downgrade/escalate) |
| GRPO Hook | `rl/grpo_hook.py` | TRL-compatible reward function for learned allocation |
| Reward | `rl/reward.py` | Cost-adjusted reward with anti-gaming penalties |
## Formal Definition
Full formal definition with 10 system invariants, ledger event schema, threat model, and when-to-use guidance in [`design.md`](design.md).
## Repo Structure
```
occ/
oracle/ # ImpactOracle
ledger/ # CreditLedger
broker/ # ResourceBroker
rl/ # GRPO hook + reward function
benchmarks/ # 3 benchmark scripts
jobs/ # GPU job scripts + analysis
tests/ # Unit tests
reports/ # Paper, reports, literature review, blog post
design.md # Formal system definition
```
## Citation
```bibtex
@misc{occ2026,
title={Compute Is Not Neutral: Mechanism Analysis of Adversarial Debate Collapse and the OCC Stack},
author={narcolepticchicken},
year={2026},
url={https://huggingface.co/narcolepticchicken/occ-stack}
}
```