Upload VERIFIED_METRICS.md
Browse files- VERIFIED_METRICS.md +42 -59
VERIFIED_METRICS.md
CHANGED
|
@@ -1,79 +1,62 @@
|
|
| 1 |
# Verified Metrics — Agent Cost Optimizer v2 Specialists
|
| 2 |
|
| 3 |
-
**Generated 2026-06-03 by independent verification
|
| 4 |
-
**
|
| 5 |
|
| 6 |
-
##
|
| 7 |
|
| 8 |
-
| Model |
|
| 9 |
-
|---|---|---|---|---|---|---|---|---|
|
| 10 |
-
| tier-router
|
| 11 |
-
| tool-gater
|
| 12 |
-
| verifier-gater
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
##
|
| 17 |
-
|
| 18 |
-
| Split | Source | Train Rows | Test Rows | Classes |
|
| 19 |
|---|---|---|---|---|
|
| 20 |
-
|
|
| 21 |
-
|
|
| 22 |
-
|
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
- Dropout: 0.1 on attention, MLP, embedding, classifier
|
| 34 |
-
- Threshold calibration: grid search on validation set
|
| 35 |
|
| 36 |
-
|
| 37 |
|
| 38 |
-
##
|
| 39 |
-
The R2E-Gym feature extractor captures only ~600 chars of github issue +
|
| 40 |
-
~600 chars of agent action summary + ~400 chars of patch. This is
|
| 41 |
-
insufficient to distinguish successful from failed patches. The
|
| 42 |
-
verifier-gater alpha values [0.95, 1.05] indicate near-zero discriminative
|
| 43 |
-
signal in these feature snippets.
|
| 44 |
|
| 45 |
-
**
|
| 46 |
-
|
| 47 |
-
|
| 48 |
|
| 49 |
-
|
| 50 |
-
and error traces before retraining.
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
| 55 |
|
| 56 |
-
|
| 57 |
-
Most promising model. RouterArena Difficulty labels provide clean signal.
|
| 58 |
-
Previous run showed acc=69.2%, F1=0.677 on 3-class. The config has
|
| 59 |
-
alpha values [0.641, 1.044, 1.315] indicating class imbalance was
|
| 60 |
-
handled.
|
| 61 |
|
| 62 |
## Reproducibility
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
To reproduce training:
|
| 71 |
-
```python
|
| 72 |
-
# 1. Get the data
|
| 73 |
-
from datasets import load_dataset
|
| 74 |
-
ds = load_dataset("narcolepticchicken/aco-traces", "tier_router")
|
| 75 |
-
|
| 76 |
-
# 2. Train with focal loss
|
| 77 |
-
from transformers import AutoModelForSequenceClassification, Trainer, TrainingArguments
|
| 78 |
-
# ... (see training/simple_strategies.py for full recipe)
|
| 79 |
```
|
|
|
|
| 1 |
# Verified Metrics — Agent Cost Optimizer v2 Specialists
|
| 2 |
|
| 3 |
+
**Generated 2026-06-03 by independent verification job `6a207319e6aa50b87b9e8d26` on a10g-large.**
|
| 4 |
+
**Raw results: `v2_verification_results.json` in this repo.**
|
| 5 |
|
| 6 |
+
## v2 vs v1 Comparison
|
| 7 |
|
| 8 |
+
| Model | Arch | Params | v1 F1 | v2 F1 | Delta | v1 Acc | v2 Acc | Collapsed? |
|
| 9 |
+
|---|---|---|---|---|---|---|---|---|
|
| 10 |
+
| tier-router | ModernBERT/DistilBERT | 149M/67M | 0.670 | 0.677 | +0.007 | 70.1% | 69.2% | No |
|
| 11 |
+
| tool-gater | ModernBERT/DistilBERT | 149M/67M | 0.920 | 0.724 | **-0.196** | 98.2% | 91.7% | No |
|
| 12 |
+
| verifier-gater | ModernBERT/DistilBERT | 149M/67M | 0.654 | 0.667 | +0.013 | 65.5% | 66.7% | No |
|
| 13 |
|
| 14 |
+
## Per-Class Breakdown
|
| 15 |
|
| 16 |
+
### tier-router-v2 (3-class, 1,260 test samples)
|
| 17 |
+
| Class | Precision | Recall | F1 | Support |
|
|
|
|
| 18 |
|---|---|---|---|---|
|
| 19 |
+
| easy (0) | 0.738 | 0.799 | 0.768 | 593 |
|
| 20 |
+
| medium (1) | 0.534 | 0.554 | 0.544 | 359 |
|
| 21 |
+
| hard (2) | 0.812 | 0.646 | 0.720 | 308 |
|
| 22 |
|
| 23 |
+
### tool-gater-v2 (binary, 1,695 test, 5.6% pos)
|
| 24 |
+
| Class | Precision | Recall | F1 | Support |
|
| 25 |
+
|---|---|---|---|---|
|
| 26 |
+
| no_tool (0) | 0.977 | 0.934 | 0.955 | 1,592 |
|
| 27 |
+
| call_tool (1) | 0.393 | 0.660 | 0.493 | 103 |
|
| 28 |
|
| 29 |
+
**Note: v1 tool-gater achieves F1=0.920 (pos P=0.884, R=0.816). Use v1.**
|
| 30 |
|
| 31 |
+
### verifier-gater-v2 (binary, 863 test, 44.6% pos)
|
| 32 |
+
| Class | Precision | Recall | F1 | Support |
|
| 33 |
+
|---|---|---|---|---|
|
| 34 |
+
| fail (0) | 0.778 | 0.559 | 0.650 | 478 |
|
| 35 |
+
| pass (1) | 0.594 | 0.803 | 0.683 | 385 |
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
Threshold: 0.52 (calibrated). Not collapsed — predicts both classes.
|
| 38 |
|
| 39 |
+
## Verdict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
- **tier-router-v2**: No improvement. Use v1 or either interchangeably.
|
| 42 |
+
- **tool-gater-v2**: **REGRESSION.** ModernBERT overfits on 5.6% minority class. **Use v1** (`narcolepticchicken/aco-specialists-tool-gater`, F1=0.920).
|
| 43 |
+
- **verifier-gater-v2**: Marginal improvement (+1.3pp). Neither model is production-ready. Features are too sparse.
|
| 44 |
|
| 45 |
+
## Training Data (published)
|
|
|
|
| 46 |
|
| 47 |
+
All preprocessing identical to training:
|
| 48 |
+
- `narcolepticchicken/aco-traces/data/tier_router/{train,test}.parquet`
|
| 49 |
+
- `narcolepticchicken/aco-traces/data/tool_gater/{train,test}.parquet`
|
| 50 |
+
- `narcolepticchicken/aco-traces/data/verifier_gater/{train,test}.parquet`
|
| 51 |
|
| 52 |
+
Source: lockon/ToolACE, RouteWorks/RouterArena, R2E-Gym/R2EGym-Verifier-Trajectories.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
## Reproducibility
|
| 55 |
|
| 56 |
+
```bash
|
| 57 |
+
# Download preprocessed data
|
| 58 |
+
git clone https://huggingface.co/datasets/narcolepticchicken/aco-traces
|
| 59 |
+
|
| 60 |
+
# Run verification (requires GPU for ModernBERT)
|
| 61 |
+
uv run --with transformers,torch,datasets,scikit-learn https://huggingface.co/narcolepticchicken/agent-cost-optimizer/resolve/main/verify_v2.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
```
|