Reference SOM · TRNG key integrity

Score randomness against a learned manifold.

A Kohonen self-organizing map learns the shape of verified true-random data. Keys that land on the manifold are strong. Keys that drift off it are flagged as anomalous — and within a domain, duplicate or non-orthogonal keys are caught too.

20×20
reference neuron map
4
bit widths · 32–256
1.0 → 0.0
strong → anomalous
self_organizing_map.liveepoch 00
data cloudneuron gridbest match
competitive learning

Three moves, repeated until the grid fits the data

The same loop the animation is running: turn each key into a feature vector, let neurons compete to match it, then pull the winner and its neighbours closer. After enough passes the grid becomes a map of what "good random" looks like — the reference your files are scored against.

01

Feature extraction

Each key becomes a 15-value vector — bit balance, transition rate, run lengths, autocorrelation, n-gram entropy, positional means. Structure a raw bitstring hides becomes measurable geometry.

0xA3F1…9C1011 0100 1110 0010feature vector
02

Compete & adapt

For every vector the closest neuron wins — the Best Matching Unit. The winner and a shrinking neighbourhood move toward the input. Learning rate and radius decay each epoch, so the map settles.

03

Score by distance

A new key is scored by how far its BMU sits from it — the quantization error. Small error means it lives where verified entropy lives: strong. A large error trips the anomaly threshold from the reference stats.

high QE→ anomalyon-manifold → strong
entropy sources

Built for QTRNG, TRNG & PRNG key streams

The reference manifold is learned from verified quantum- and true-random entropy. Any incoming key stream — whatever its source — is scored against it: genuine entropy lands on the manifold, deterministic or biased generators drift off and are flagged.

QTRNG
Quantum True RNG

Hardware entropy from quantum phenomena (photon paths, vacuum noise, tunnelling). The gold standard the reference map is tuned to — these keys sit deepest in the manifold.

TRNG
True RNG

Physical entropy from classical noise (thermal, jitter, avalanche). Verified true-random output scores on-manifold; a drifting or faulty source shows up as rising anomalies.

PRNG
Pseudo RNG

Deterministic, algorithmic output (counters, LCGs, seeded streams). Statistically random-looking but structurally different — structured or low-entropy PRNG keys drift off the manifold and flag.

Domain

—
No domain selected.

Ingest & score

—
Drop a key file
binary or hex — click to browse
Select or create a domain to begin.

Retrain domain model

Build a domain-specific SOM from the keys ingested so far, so the model remembers this source. Replaces the reference model for this domain + width.

Anomaly map — reference U-matrix

20 × 20 · ℝ15
Check a file to project its keys onto the trained manifold.
drag to orbit · scroll to zoom · click a point
keys 0
model —
weak 0
clusterboundary
—
score—
BMU distance—
BMU cell—
—
keys scored
—
strong (good)
—
weak / anomalous
—
mean score · on-manifold

Score distribution

0.0 – 1.0
Per-file = last checked file · domain = every file at this width. Hold Shift for CSV.

Flagged weak keys

—
Weak keys (BMU distance beyond the model's P99) appear here, ranked by distance.

Report

Word (.docx) report for the current file — summary, per-feature deviation, flagged weak keys and any randomness-test results.

Trained network — transparency

width

This is the locked reference SOM your files are scored against — the same ref_som_Nbit.npy used by train_reference_som.py --evaluate. If the active domain has been retrained, its own model is shown instead.

U-matrix (learned manifold)

valley = cluster · ridge = boundary

Each cell is a neuron; colour is its average distance to neighbours. Tight valleys are where verified-random keys concentrate.

Strong-zone calibration

density of good keys

Where high-quality reference keys landed during calibration (_strong_mask). Bright = strong zone; a key mapping here scores high.

Reference fingerprint — the 15-feature signature of good randomness

#FeatureReference meanStd (±1σ)Meaning

Feature analysis — last checked file vs reference

—
Check a file on the Evaluate tab to see how each of the 15 statistical features compares with the trained reference fingerprint.

Statistical randomness tests

raw file bytes

NIST SP800-22 and Dieharder run on the raw bytes of the last checked file (these suites need large bitstreams, not individual keys). Dieharder uses the real Ubuntu binary when installed; NIST falls back to a built-in SP800-22 battery.

Check a file first, then run the suites on its raw bytes.

Method comparison — SOM vs NIST vs Dieharder

Pose the same question — is this a good random source? — to your trained network and to the two classical suites, and see where they agree or diverge. Uses cached test results when present, otherwise runs NIST (and Dieharder, quick) on the raw bytes.

All domains

—

Domain contents

—
Select a domain to see every ingested file, with per-file downloads and reports.

Domain map — every key, duplicates & orthogonality

width

Projects every key in the selected domain (all files, this width) onto the SOM. Exact duplicates and non-orthogonal correlated keys — keys too similar to another, which independent random keys never are — are detected across the whole domain and shown in their own colours. Duplicate / orthogonality checks are scoped to this domain only.

Pick a domain on the left, choose a width, and press  Analyse & map.
strong
weak
correlated
duplicate
—
bucket—
file—
score · max cosine—

Developer

SK
Shriyash Karnik
AI · Machine Learning · Deep Learning Engineer

Shriyash Karnik is an AI, Machine Learning, and Deep Learning Engineer based in Hyderabad, India. He works at the CR Rao Advanced Institute of Mathematics, Statistics and Computer Science (CR Rao AIMSCS), where he also serves as a teaching faculty member focusing on Generative AI and Deep Learning.

EducationM.Tech in Artificial Intelligence — International Institute of Information Technology (IIIT), Naya Raipur (2021–2023)
FocusGenerative AI, Deep Learning, teaching faculty
InstituteCR Rao AIMSCS, Hyderabad, India