Commit a6a0cd0
authored
Eight steps that are worth drawing, and arithmetic that is settled rather than hoped (#11)
* Check the model's sums with mpeqs: correct, and nearly inert
mpeqs evaluates a sum exactly and refuses rather than guessing, so a step
claiming 14 * 24 * 60 = 10080 can be contradicted without asking the model to
check its own work. Wired into the loop, tested, and it does work when it
fires: the wrong figure is handed back and the step is redone around it.
IT HARDLY EVER FIRES. One correction across 50 runs. A scan of 153 saved
reasoning steps found 11 checkable sums and none of them wrong.
The reason points at what would work. This model writes arithmetic as prose --
"a fortnight is 14 days, and each day has 1440 minutes, so 20160" -- not as
14 * 1440 = 20160. An extractor keyed on an explicit expression sees almost
nothing, and the errors that did occur were stated in the ANSWER as a bare
number with no working to check. Getting real value from an exact solver means
asking the model for a SPEC it can evaluate, not scraping prose for something
shaped like a sum. That is a different experiment.
AND A MORE IMPORTANT FINDING, BY ACCIDENT. Two arms here are the same
configuration measured twice: decompose8 predates the gate, and arith_off runs
those settings with the gate explicitly off. They scored 84 % and 74 %.
That is the noise floor -- about ten points at two runs per question, on 25
gradeable questions against a 3B model. It was not designed as a replication
and is more useful for having been one.
Every comparison in docs/development.md is now written against it. The large
results survive: 55 % to 91 % is five times the noise. But the four-point gap
between the gate on and off is not a result, and neither was "decomposition
beats a floor by four points" -- that claim is now stated with the uncertainty
it actually has.
The gate is conservative by construction, because a wrong correction is worse
than none: the left side must be arithmetic and nothing else, so "x = 5" is
left alone, and the tolerance comes from how many decimals the model chose to
write, so 28.27 for 28.2743 is correct rounding rather than an error. Seven
tests pin those, including the two real failures this was built for.
* Ask the model for the expression, and make sure the answer gets the result
The prose-scraping gate was nearly inert: 11 checkable sums in 153 steps, none
wrong, because a model writes "14 days at 1440 minutes each, so 20160" rather
than an expression an evaluator can settle.
So ask for it. The step schema gains a `calc` field, and mpeqs evaluates it in
exact fractions. Three things had to be true for that to work, and each was
measured rather than assumed:
* The field must be REQUIRED. Optional, the model filled it in zero times across
three questions -- structured output omits what it is not obliged to produce.
Required, with "" as the legal way to say "no sum here", it is filled in every
time: 13 expressions on a single question.
* Exactness is not enough on its own. An expression is settled exactly and can
still be the wrong expression. A provenance check -- reject literals that
appear neither in the question nor in an earlier result -- was built and then
dropped: it flagged 1440*14 for a fortnight, since "14 days" is world
knowledge and not an invented number. One true positive against three false
ones is not a gate worth having.
* The result has to reach the answer. This was the real failure. The loop
computed 20 - 13.5 = 6.5 correctly and still answered 2.50, because the step
holding the value was off the strongest path and the synthesis never saw it.
Settled sums are now handed to the synthesis directly, separately from the
thread, since they are not the model's opinion and are not up for revision.
Measured on the questions that were failing: change from a 20 note 10.50 -> 6.50,
minutes in a fortnight 336 -> 1680 -> 20160. Bat-and-ball still misses, which is
a reasoning trap rather than an arithmetic one.
* Show the sums that were settled exactly
A run's steps are the model's opinion. The sums are not: they were evaluated in
exact fractions and a reader can check "20-13.5 = 6.5" at a glance in a way they
cannot check a paragraph of reasoning. That makes them the most useful thing on
the page per pixel spent, so they get a compact strip under the progress bar.
Shown once per distinct expression -- models re-derive the same sum across
angles, and four copies say nothing the first did not -- and cleared between
runs, since a stale figure left over from the previous question would be read as
belonging to this one.
* Only show the synthesis sums from the path the answer is written from
Handing over every settled sum was worse than handing over none. A model
exploring eight angles also writes 17*250 and (17/1)*100, and listing those under
a heading that says they were calculated exactly is an invitation to pick one:
multi-step accuracy fell to 50% from 100%, and the wrong answers name the
mechanism -- "604800 minutes in a fortnight" is exactly right, for seconds in a
week, and "840" is 14*60.
So each sum now keeps the index and title of the step that produced it, and only
those on the strongest path reach the synthesis. That recovered multi-step from
50% to 72%.
What this does NOT establish is that the gate improves accuracy. Measured against
a matched control on the same questions, twice:
arithmetic on 13/18 (72%) then 12/18 (67%)
arithmetic off 7/18 (39%) then 12/18 (67%)
Pooled that is 69.4% against 52.8%, +16.7 points, 95% CI [-5.5, +38.9]. The
interval contains zero. More importantly the control swung 28 points between two
runs of an identical configuration, so the noise floor here is far wider than the
10 points previously assumed, and no comparison at this sample size decides
anything.
What is directly measured, and needs no inference: the model supplies the
expression when the field is required, and mpeqs settles it exactly. That is a
visibility feature. It is not yet an accuracy feature.
Also adds --group to the eval, so a change that can only affect one group can be
checked without paying for the 22 questions it cannot affect.
* Depend on mpeqs, and work through the angles that were planned
Two failures found by CI and by measurement, both of the same kind: something was
asked for and then quietly not used.
CI was green on tests that could not run. mpeqs was not a dependency at all, so
the gate degraded to a no-op and the tests asserting it fires failed the moment
they met a machine without it. It is pure Python with no dependencies of its own,
so it is now a real dependency rather than an optional extra -- a feature that
silently does not exist for most users is worse than a small install.
And decompose asked the model for eight angles worth checking, then let the run
stop after one step. Measured: "how many minutes in a fortnight" planned eight
angles and produced a single step. The loop no longer accepts final_answer while
angles remain unworked.
A plain step floor was tried before and produced padding -- the model reached the
answer at step 4, was told it had given 4 of 5, and wrote three that added
nothing. This is not that. Each remaining step has a named job rather than a
quota, and the steps it produces are measurably distinct: title-to-title
similarity median 0.47, max 0.81, against the 0.96 that counts as restatement.
Fortnight went from 1 step to 7, still answering 20160; "capital of France" from
1 to 8, still answering Paris.
* Pin the step count, its cost, and the noise floor that governs both
Eight steps was the requirement, at no cost to accuracy. Measured over 84 runs:
steps 6.67 -> 8.56, and no group below 8.22
correct 73.3% -> 74.7%, +1.3 points, 95% CI [-12.7, +15.4]
tokens 5324 -> 7129 prompt tokens, 1.34x
So the steps arrived and the accuracy did not move. "Equal" is what was asked
for and "equal" is what this is -- the interval is far too wide to claim better.
The last claim pinned here is the one that matters most, and it is about the
measurements rather than the code: two runs of an IDENTICAL configuration --
same questions, same model, same code, differing in nothing at all -- scored 39%
and 67%. A 28-point noise floor at n=18. Every comparison in this repository
should be read against it, including the ones already recorded here, and any
claim resting on a smaller gap is folklore rather than measurement.
Pinning the minimum across groups rather than only the mean is deliberate: a
mean of 8.5 is also what you get from simple questions stopping at 3 and hard
ones running to 14.1 parent 23f6e39 commit a6a0cd0
21 files changed
Lines changed: 6856 additions & 15 deletions
File tree
- dev
- scripts
- tests
- docs
- claims
- src/mpe_lkg
- backends
- templates
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
291 | 338 | | |
292 | 339 | | |
293 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| 170 | + | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| |||
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
| 190 | + | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
| |||
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
| 218 | + | |
214 | 219 | | |
215 | 220 | | |
216 | 221 | | |
| |||
220 | 225 | | |
221 | 226 | | |
222 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
223 | 231 | | |
224 | 232 | | |
225 | 233 | | |
226 | 234 | | |
227 | 235 | | |
| 236 | + | |
| 237 | + | |
228 | 238 | | |
229 | 239 | | |
230 | 240 | | |
| |||
241 | 251 | | |
242 | 252 | | |
243 | 253 | | |
244 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
245 | 259 | | |
246 | 260 | | |
247 | 261 | | |
| |||
253 | 267 | | |
254 | 268 | | |
255 | 269 | | |
256 | | - | |
| 270 | + | |
| 271 | + | |
257 | 272 | | |
258 | 273 | | |
259 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
0 commit comments