Chiosa
Machine Learning

A method proves when rule-written networks are exact

Spec2Weights: Certifying Networks that a Language Model Writes from a Specification · arXiv:2611.34711

3 min
Updated

In plain words

Spec2Weights is a method for checking whether small neural networks written from plain-language rules really follow those rules using the arithmetic they run on. It certified 12 of 15 earlier networks as exact on their stated input ranges, counting one network after a constant was fixed.

The method checks the network’s calculations and then proves whether rounding preserves the answer. It can also predict where a network will begin giving wrong answers, so readers know the boundary of the guarantee.

The research

A network can match a rule on examples and still fail on an input no one tested; rounding can also disrupt a proof made with ideal numbers.

Knowing whether a compact network follows a rule throughout a stated range, and where that stops, changes whether its outputs can be treated as exact for that range.

Spec2Weights checks rule-written small networks with exact arithmetic and proves when float32 rounding preserves their answers across a stated input domain.

Across 15 earlier networks, the checks covered exact or rational behavior over stated domains and proved when float32 preserved it. Twelve were certified exact, counting the day-of-week network after one constant was fixed.

In 30 generated specifications, 25 first submissions earned exactness certificates; the five tax schedules instead passed a preset test requiring at most $1 error at every whole-dollar income from $0 to $2 million, for both filing statuses, in one float32 run. A shortest-path certificate also predicted the first wrong hops, which matched.

The networks are case studies, and the 30 new specifications are instances of four familiar task families. The tax schedules met a tested error limit, but most were not certified within that limit for every summation order.

What the evidence shows

  • Proving a rule across inputs

    Spec2Weights is a method that checks small neural networks written from plain-language rules. It asks whether the network computes the specified rule exactly across a stated input domain, using float32 arithmetic rather than idealized arithmetic.

    The method checks the exact integer or rational computation, then proves when float32 preserves it or bounds the rounding error. This addresses why passing sample tests alone cannot establish correctness over an entire domain.

  • What the checks established

    The generated-specification results separate proof from testing: most first submissions received exactness certificates, while the five tax schedules met a preset error rule.

    That rule required at most $1 error at each whole-dollar income from $0 to $2 million, for both filing statuses, in one float32 run; it did not certify the same tolerance for every summation order.

  • Finding where exactness ends

    The certificate does more than check sampled paths: it derives where this particular network stops returning exact distances, and the measured first failures match its predictions. This shows how a proof can locate a boundary under the network’s stated graph and float32 conditions.

  • What example-based training misses

    This comparison illustrates a case where a network written from the rule succeeds while training on examples leaves the same architecture near chance on the tested Luhn inputs.

    The writer receives the specification and gradient descent receives labeled examples, so the finding concerns what data-driven training misses when a specification is available.

  • Two scoped explanations

    The paper gives two limited theoretical explanations for training failures. One says that certain first-order training methods cannot learn weights for an input coordinate that is never active in training; another says gradients carry little information about which member of a Luhn-like rule family labels uniform random digit strings.

    The latter concerns a family of rules, not proof that training one fixed rule must fail. Together, the theorems support only two of five observed failure classes.

Deep

Next paperWhen whole-task audits misjudge component checkers