File size: 7,065 Bytes
6223cb4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
845e794
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6223cb4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
845e794
 
6223cb4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# Soft-Elo reproduction code

Companion dataset: [kbora/SoftElo](https://huggingface.co/datasets/kbora/SoftElo).
Project repository: [kargibora/SoftElo](https://github.com/kargibora/SoftElo).

This package loads the released judge annotations and reproduces the paper's
Hard-Elo, Soft-Elo, constant-smoothing and historical conformal calculations.
It also rebuilds tables from archived model-level measurements without rerunning
fits. These are separate commands so cached reconstruction is not mistaken for
an independent numerical reproduction.

## Install

From this directory, using Python 3.12:

```bash
uv sync --locked --python 3.12
uv run python -m unittest discover -s tests
```

The lock file pins the numerical libraries. NumPy, pandas, SciPy and scikit-learn
versions match the versions found in the original research environment. That
installed environment is evidence of compatibility, not a record of every
historical experiment's environment.

Without uv, create a Python 3.12 virtual environment and run `pip install .`.
This installs the declared dependencies, but does not reproduce `uv.lock`.

In the published dataset, this directory is `code/`; the examples below assume
the dataset files are one directory above it.

## Load annotations

```python
from softelo_release.data import load_annotations

frame = load_annotations(
    "..", corpus="lmarena100k", judge="GPT-OSS-120B", subset="paper_valid"
)
shared = load_annotations("..", corpus="lmarena100k", subset="shared_valid")
```

Use `subset="all", collapse_preferences=False` to retain all exported rows and
raw weak preferences. The default applies the original score-validity filter
and maps preferences within 0.26 of 0.5 to ties. Scores are returned as Python
dictionaries. Rows remain in their original order within each judge.

For a remote release, replace `".."` with its Hugging Face dataset ID and pass
`revision=` with the published commit hash. No remote repository name is assumed.

To retrieve original conversation records, request them from the upstream
repository at the revision in each annotation row:

```python
from softelo_release.data import load_source_rows

row = frame.iloc[0]
source = load_source_rows(
    row.source_dataset, [row.source_id], revision=row.source_revision
)
```

## Validate and reconstruct the archived tables

```bash
uv run softelo-validate .. --report outputs/dataset-validation.json
uv run softelo-reproduce --cached-results ../results --out outputs/cached-tables
```

The second command checks 176 values against the archived summaries: main MAE,
rank correlations, model counts and fitted temperatures; conformal coverage and
width statistics. It also rebuilds the label-smoothing table and computes its
means before rounding. A mismatch raises an error.

The output includes `main_results.csv`, `conformal_results.csv`,
`label_smoothing_results.csv`, `tables.md` and `validation.json` with source hashes.

## Run the verified suites

From the dataset's `code/` directory:

```bash
uv run python -m softelo_release.suite --data .. --suite main --judge GPT-OSS-120B
uv run python -m softelo_release.suite --data .. --suite all --jobs 2
```

The full command runs 31 judge/protocol combinations across LMArena100K and
LMArena140K, compares fresh fits with archived references, and exits with an
error if a comparison fails. Individual suites are `main`, `smoothing`,
`conformal-historical` and `lmarena140k`. See [VERIFICATION.md](VERIFICATION.md)
for the completed audit and comparison scope.

## Recompute from annotations

```bash
uv run softelo-reproduce --data .. --corpus lmarena100k \
  --judge GPT-OSS-120B --protocol main --out outputs/main-gpt120

uv run softelo-reproduce --data .. --corpus lmarena100k \
  --judge GPT-OSS-120B --protocol smoothing --out outputs/smoothing-gpt120

uv run softelo-reproduce --data .. --corpus lmarena100k \
  --judge GPT-OSS-120B --protocol conformal-historical --out outputs/conformal-gpt120
```

Repeat with the judge names in `manifest.json`. This release also includes
`--corpus lmarena140k`. These computations use CPU; they make no judge API
calls and need no GPU. Each command writes the effective settings and core-code
hash to `run_config.json` alongside model-level predictions and summaries.

| Protocol | Temperature fitting | Purpose |
| --- | --- | --- |
| `main` | Refit on anchor-only battles for each held-out model | Main Table 2; source experiment 91 |
| `pooled` | Fit once on the judge's full valid battle pool | Historical pooled-temperature point-estimate baseline |
| `smoothing` | Pooled Soft-Elo baseline; fixed constants 0.55–0.95 | Appendix E.1; constants compared retrospectively |
| `conformal-historical` | Pooled temperature, original bootstrap and split settings | Historical Table 3 |

The historical conformal mode preserves the original quantile interpolation,
tie policy and seeds. Hard-Elo resamples anchor battles during the bootstrap;
Soft-Elo keeps its anchors fixed, matching the original implementation. Its bracketed width statistics are the 2.5th and 97.5th
percentiles across five splits. The original quantile routine differs from the
usual direct conformal order statistic; it is retained here to reproduce saved
results. Do not describe it as a new implementation of the exact order-statistic
rule. The extraction manifest records the source of each numerical function.

## Export from the original research checkout

```bash
uv run softelo-export --repo-root /path/to/LLM-vs-Human-Judge \
  --source-revisions source_snapshots.json --out /path/to/new-dataset
```

The exporter selects the corpora listed in `source_snapshots.json` from the
original 22-input manifest. The supplied configuration exports 15 LMArena files. It
preserves the aggregated and available per-order scores, checks upstream IDs,
models and human preferences, and exports an explicit field allowlist. Raw
prompts, model responses, user/session identifiers, provider credentials and
free-text judge explanations are not exported.

A completed export is immutable: choose a new output directory to produce
another version. Compatible upstream snapshots are pinned in
`source_snapshots.json`; they are verified joins, not a claim that the original
annotation jobs recorded those exact commit IDs.

See [VERIFICATION.md](VERIFICATION.md) for executed checks and their limits.

## Scope and provenance

The package includes LMArena100K and LMArena140K, with eight paper judges where
available. Auxiliary prompt-variation experiments and the author re-annotation
study are outside this release. Reproduction commands cover the core rating,
conformal and smoothing analyses; they do not regenerate every appendix figure.

`historical_core.py` preserves the numerical operations extracted from the
research repository. `core_provenance.json` records paths, source hashes and a
docstring correction that leaves the executable code unchanged.
`NOTICE` identifies the extracted OpenJury code; its Apache-2.0 license is
included. Dataset terms are separate in `../DATA_LICENSES.md`.