Glass Box — A Neural Network Built From Scratch That Learns "Is Your Degree Worth It?" on Live Federal Data
The whole field this week built AI tools to query federal datasets — ask a chatbot, it reads the data, answers. I wanted the opposite, and the harder thing: not query the data — learn from it. Glass Box is a neural network I wrote from scratch in one file — forward pass, backprop, optimizer, all by hand, no libraries — that teaches itself, live in your browser, on real U.S. Dept. of Education data: what graduates of ~865 colleges actually earn.

What it is
Press train and watch it learn to predict earnings from a school's cost, size, selectivity, and type — and watch it think: the glowing web of neurons rewiring, pulses of light streaming forward through the wires, the test-school cloud snapping onto the diagonal as its guesses get right, the error curve dropping live. It reaches R² ≈ 0.70 on held-out schools, and a built-in gradient check proves the math isn't faked (numeric vs. analytic gradients agree to ~1 part in 10 billion). Then ask it yourself: slide the cost and selectivity and it forecasts the earnings — and whether that's "strong value" or "pricey for the payoff." Is this degree worth it?
How it’s built
- A from-scratch MLP (7→10→8→1) — hand-written forward pass, backpropagation, and an AdamW optimizer with weight decay, trained on minibatches in the browser. No TensorFlow, no PyTorch.
- Real College Scorecard data (data.gov) via the api.data.gov feed — normalized features, a held-out test split, and honest R² so it's a real prediction, not a memorized one.
- Rendered on canvas with additive glow: neurons brighten with activation, weight-edges color by sign and thickness by magnitude, and light pulses animate the forward pass — the whole point is that it's a glass box, not a black one.


On the theme
Go get that 'murica data. The government has an extraordinary record of what higher education actually returns — and buried it in a spreadsheet nobody opens. The punkest thing I could do with it wasn't a dashboard or a chatbot; it was to build a mind that learns it, from nothing, in the open, with the glass walls up. Punk isn't dead. It's compiling.
Try it →Code →All the builds →
Shout-out
Part of the competition is cross-referencing other builders. So: shout-out to Jake (@jakestrait5) — the most prolific builder this week, with AI tools that read federal contracts, EPA, and FDA data and brief you on them. The perfect foil: Jake built tools to query the data; Glass Box trains a model on it, from scratch, and shows you every neuron.
Built for Summer Into AI 2026 (Competition #2), hosted by Eric Rhea. More in the build log.