7xz

work / 7xz-lab

7xz Lab

A neural network you train, break, and rebuild in the browser, with every forward pass, gradient, and optimizer written by hand. Prune a neuron and it shows the loss change three ways: the direct before/after difference, a path-integral estimate, and a second-order estimate.

Year
2026
Category
tools
Stack
Astro · TypeScript · Canvas · Web Workers
Status
live
Demo
https://7xz.dev/lab/

An instrument you operate directly. Train a small network on a spiral or an XOR, then prune neurons, nudge weights, swap the architecture, and watch the loss respond across six views. It grew out of my foundational-theory research, which asks how much the loss changes when you perturb a weight. Here, that question becomes something you manipulate interactively rather than read off a formula, letting you see firsthand where the second-order approximation holds and where it breaks down.

How it is built

No machine-learning libraries. The MLP’s forward and backward passes, parameter updates, He/Xavier initializations, SGD with momentum, and Adam are all written from scratch. three is lazy-loaded strictly for the 3D views.

Every edit is measured three ways. The direct value is simply the loss after the edit minus the loss before it, on the same training data; that is the ground truth. The path line integral of the gradient along the edit gives the same quantity as an identity, and the browser evaluates it with a K-point rule (the same backbone as Integrated Gradients), so its gap from the direct value is pure integration error. The second-order estimate is the quadratic Taylor model, computed via matrix-free Hessian-vector products (HVP): a central finite difference of the gradient, bypassing the full Hessian matrix. Showing both approximations against the direct value separates “not enough integration points” from “the quadratic model is wrong here”, and turns K into a setting you can actually experiment with.

Pruning a neuron simply zeroes out its incoming and outgoing weights. Click one, and the results panel lists all three values with their errors, and drops a point onto a scatter plot so you can directly observe where the quadratic model diverges. Hover or select a point on the scatter to see which edit it was, linked to its line in the edit log.

7xz Lab after pruning three hidden neurons on the spiral dataset. The loss-change panel for the last prune (neuron L1·n6, K=17) lists the direct difference 0.2651, the path integral 0.2651 with error 2.3e-6, and the second-order estimate 0.3236 with error 0.059; per-neuron importance bars and the decision boundary are visible alongside.

What you can see

Six real-time views: the compute graph, the decision boundary, a Hinton weight diagram, a 3D loss landscape, a 3D network layout clustered by activation similarity, and the final hidden layer projected onto its top three principal components. The 3D network includes an observe mode that slows down training and leaves fading trails behind neurons as they specialize into distinct roles. The loss curve runs on a shared training-step axis, so saved snapshots line up against the live run, with each edit marked where it happened: you can see how much a prune hurt and how many steps it took to recover. For larger architectures, per-neuron importance is computed in a Web Worker to keep rendering smooth, and the panel says which step and how much of the data it was measured on.

7xz Lab with five views open at once: the network graph, the decision boundary on a spiral, the weight matrices as a Hinton diagram, the network laid out in 3D, and the data in feature space projected onto three principal directions; controls on the left, results and the loss curve on the right.

Datasets range from classic 2D problems to 12–64 dimensions, plus a custom canvas where you draw your own distribution. The lab also features a multi-neuron pruning tool driven by user-written scoring rules, a blind compression challenge, full undo history, and an interactive step-by-step tutorial.

Where it stands

Live at /lab. It is entirely client-side with no backend dependencies; everything computes in the browser, and session state persists locally across visits. The core theoretical premise, that the path line integral equals the true loss change, is directly verifiable at toy scale: raise K and watch the integral close in on the direct value. So are the failure modes of second-order Taylor approximations under large perturbations. Active development is ongoing, with a changelog documented in the guide. Built primarily for desktop environments, with an adaptive overview for mobile devices.

esc
  • Pages

    • Home page
    • Work page
    • Log page
    • About page
    • Now page
    • Colophon page
    • Search page
    • lab · live neural network page
  • Work

    • 7xz Lab 2026 · live work
    • Neural network foundational theory 2026 · research work
    • Context-Aware Zone Alert 2025 · shipped work
    • FORA 2026 · shipped work
    • Discord Components V2 Reference 2026 · reference work
    • News Credibility Auditor 2025 · archived work
  • Log

    • AI 딥보이스 탐지 대회 참가 기록, DACON 2026.09.29 · research log
    • 이론적 아름다움과 유체역학으로 가지치기를 시도, NavierFlow 2026.05.18 · research log
    • AI STT앱 개발 시도기, Project L mate 2026.03.04 · project log
    • 포트폴리오 사이트 구축기 2025.11.30 · project log
  • Actions

    • Toggle theme action
    • Toggle content language (KR / EN) action
    • Search everything action