// HACKER NEWS — CYBERSECURITY
WangNet – 1.8 MB, zero-dependency Numberwang adjudication in 11 languages
A small neural network that decides whether a number is Numberwang.
The whole model is a 1.8 MB JSON file and the inference code is about 100
lines of pure Python standard library — no PyTorch, no NumPy, nothing to
install. Clone it and run it.
Run it with no arguments for an interactive session:
Requires Python 3.8 or newer. That's the only requirement.
A number's wangness is a property of the number, not the language it
is said in: four, vier, quatre and cuatro all get the same verdict.
80,804 parameters. The network reads characters directly — there is no
tokenizer, no normalizer and no rules engine at inference. Digits,
operators, canon verdicts and the eleven languages are all held in the
weights, and model.json contains the lot.
A hosted version runs on Hugging Face Spaces. To run the same demo
locally:
gradio is needed only for the demo. The model itself never needs it.
88.9% over 486 held-out adjudications (macro-F1 0.896), against a ceiling
of roughly 98% — about 2% of training labels are inverted, in accordance
with long-standing adjudication practice.
Arithmetic on unseen operands is the weak spot, at 44–72%. The
network memorises rather than computes, so small common expressions like
5*2 are reliable while 904 * 3 is an educated guess. If arithmetic
correctness matters, evaluate the expression and hand it the result.