A small average error can hide one bad output
Suppose a checker promises that every output is within 0.1 of its reference. It then accepts a vector because its mean absolute error is below 0.1. Those conditions are not interchangeable.
Our original synthetic example makes the difference visible. Ten coordinates contain nine exact outputs and one error of 1/2. Their mean absolute error is 1/20. The mean threshold passes; the declared elementwise threshold fails at that one coordinate.
Keep the error fixed and change the denominator to two coordinates. The mean becomes 1/4, so both rules reject. Nothing about the outlier improved in the longer vector. It was averaged with more zero errors.
| Authored case | Length | Mean error | Max error | Mean rule | Elementwise rule |
|---|---|---|---|---|---|
| Exact | 4 | 0 | 0 | Pass | Pass |
| All errors at boundary | 4 | 1/10 | 1/10 | Pass | Pass |
| One outlier / 10 values | 10 | 1/20 | 1/2 | Pass | Fail |
| Same outlier / 2 values | 2 | 1/4 | 1/2 | Fail | Fail |
Both rules use an inclusive tolerance of 1/10. The exact case and the case with every error exactly at the boundary pass both. These are four designed cases, not a sample of real benchmark failures.
The mean of nonnegative absolute errors cannot exceed their maximum. Bounding every coordinate therefore bounds the mean, but bounding the mean does not bound every coordinate by the same amount. A single error D contributes D/n to the mean across n coordinates.
MAE is appropriate when average error is the intended objective. The issue is substituting that objective for a promise about each coordinate. A real task must declare its own absolute and relative tolerances, nonfinite-value policy and shape rules; our illustrative 1/10 is not a recommended universal threshold.
The standard-library proof uses exact fractions and retains every reference, candidate, error, violating index and decision. One original CPU invocation also retained twelve authored controls. No GPU, model or PyTorch code ran. We make no claim about a bug in an existing grader, vulnerability prevalence, performance or training benefit.
PyTorch's L1Loss documentation explains mean absolute-error reduction. Its allclose documentation describes elementwise tolerance comparison. Those are background definitions; the toy source and fixture are original Nodus work.
Original article and MIT runnable proof. The download contains exact executed source, full saved output and the predeclared protocol.
Choose what acceptance guarantees before reducing the error vector to one number.
About the author
- Founder @ Nodus Compute
Comments
Join the discussionNo comments yet. Be the first to comment.