> Interruptr: Game-Theoretic 3+1 Agent Architecture for Code Analysis
3 GPT-3.5-turbo experts + 1 free local verifier achieve better-than-GPT-4 code analysis at 22% lower cost, framed as Nash equilibrium under API budget constraints. Efficiency: 90.43 quality/cost vs 6.25 for single GPT-4.
// TABLE_OF_CONTENTS
Interruptr: 3+1 Heterogeneous Agent Architecture¶
The Architecture¶
| Role | Model | Cost |
|---|---|---|
| Code Analyst | GPT-3.5-turbo | ~$0.0032/sample |
| Security Expert | GPT-3.5-turbo | ~$0.0028/sample |
| Debug Expert | GPT-3.5-turbo | ~$0.0028/sample |
| Verifier | Qwen2.5-0.5b (local) | $0.0000 |
Key insight: asymmetric specialization. Three GPT agents run in parallel; the local verifier is a quality discriminator, not a task executor — small models excel at detecting self-contradiction.
Nash Equilibrium¶
\((d^*_{code}, d^*_{sec}, d^*_{debug}, d^*_{verif}) = (1.0, 1.0, 1.0, 0.7)\)
Efficiency: 90.43 quality/cost vs 6.25 for single GPT-4 call.
Pilot Results¶
| Configuration | Time | Cost/Sample |
|---|---|---|
| 3+1 parallel + verifier | 8.82s | $0.0064 |
| 3+1 parallel, no verifier | 11.10s | $0.0059 |
| 3+1 serial + verifier | 13.03s | $0.0057 |
Parallel: 47.7% faster. All three CWE vulnerabilities (buffer overflow, NULL deref, integer overflow) correctly identified.
Practical Pattern¶
The 3+1 pattern generalizes: any task decomposable into (a) parallel quality sub-tasks + (b) lightweight consistency check can use this template at ~$0.006/sample instead of $0.12+ for GPT-4.