FlawX

Your model is not a black box.
Look inside it.

FlawX turns a saved Keras or scikit-learn model into an interactive visual explorer: architecture, health diagnostics and a neuron level galaxy view. Runs in your browser. Your model never leaves your machine.

Live demo. Drag, zoom, click a neuron. Hollow circles are dead neurons.

Three views, one toggle

Every FlawX file ships all three modes. Switch with the tabs or deep link with #arch / #xray.

Galaxy · every neuron, every weight

Neurons are heat mapped, weights are strings. Hover to isolate a neuron's wiring, click it for bias, inputs and dead or alive status.

Try it →

X-Ray · health diagnostics

Finds dead units, overshooting biases, saturation and oversized layers. Shows which input features your model actually uses.

Try it →

Not just neural nets · trees & linear models

Decision trees and forests render as interactive trees. Click any node for its split rule. Linear models draw as networks with named coefficients.

Try a tree → · a logistic regression →

How it works

Point the script at a saved model. It writes one HTML file with all three views inside. Open it anywhere, share it with anyone.

# works with .pkl, .keras and .h5
python flawx.py model.pkl --data X_sample.npy --features names.txt

# or from a notebook
from flawx import flawx
flawx(model, x=X_train, feature_names=feature_cols)

What the X-ray finds

  • Dead and saturated neurons
  • Overshooting biases
  • Oversized layers
  • Per neuron activation heat on your data
  • Which input features actually matter

Private by design

No upload, no analytics, no cookies. The pages cannot contact any other server (browser enforced, check DevTools). The CLI runs on your machine and its output works offline.

Needs only numpy plus keras (any backend) for neural nets, or scikit-learn for trees and linear models. Python 3.9 or newer.

Get FlawX

Three small files. Put them in one folder and run.

MIT-style: use it, break it, improve it

Downloads

Quick start

python flawx.py your_model.pkl \
    --data X_sample.npy
# writes your_model_flawx.html, open it in any browser