Skip to main content

High-frequency monitoring of neural network representational dimensionality

Reason this release was yanked:

"Renamed to 'ndtracker'"

Project description

Neural Dimensionality Tracker (NDT)

Tests PyPI version Python 3.8+ License: MIT Code style: black

High-frequency monitoring of neural network representational dimensionality during training. Track how your network's internal representations evolve, detect phase transitions, and gain insights into the learning dynamics of deep neural networks.

Features

  • Minimal Intrusion: Add dimensionality tracking to any PyTorch model with just 3 lines of code
  • Architecture-Agnostic: Automatic support for MLPs, CNNs, Transformers, and Vision Transformers
  • Multiple Metrics: Track 4 complementary dimensionality measures
  • Jump Detection: Automatically identify phase transitions during training
  • Rich Visualization: Built-in plotting with Matplotlib and interactive Plotly dashboards
  • Flexible Export: Save results as CSV, JSON, or HDF5
  • Production-Ready: Fully typed, tested (>90% coverage), and documented

Installation

pip install neural-dimensionality-tracker

Quick Start

import torch.nn as nn
from ndt import HighFrequencyTracker

# Your model
model = nn.Sequential(
    nn.Linear(784, 512), nn.ReLU(),
    nn.Linear(512, 256), nn.ReLU(),
    nn.Linear(256, 10)
)

# Create tracker
tracker = HighFrequencyTracker(model, sampling_frequency=10)

# Training loop
for step, (x, y) in enumerate(dataloader):
    output = model(x)
    loss = criterion(output, y)
    loss.backward()
    optimizer.step()

    tracker.log(step, loss.item())  # One line!

# Analyze
results = tracker.get_results()
from ndt import plot_phases
plot_phases(results, metric="stable_rank")

Documentation

See examples/ for complete working examples and detailed usage guides.

License

MIT License - see LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neural_dimensionality_tracker-0.1.0.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neural_dimensionality_tracker-0.1.0-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file neural_dimensionality_tracker-0.1.0.tar.gz.

File metadata

File hashes

Hashes for neural_dimensionality_tracker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 21030485431958b845d35834dd9950b6ddf702fa88d9f9611db40af937461dc9
MD5 a9bd0dc4c3f84dfd3655f3ffefda0f62
BLAKE2b-256 c3c38e73732289fc596fea36d8b48f483e6cf62df9f2787f40f267942c4f2511

See more details on using hashes here.

File details

Details for the file neural_dimensionality_tracker-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for neural_dimensionality_tracker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc22940122905a5f66d1ac9ff05f69d2704d94bccdcecd55378dd48aed719899
MD5 59dabb5f10a6fc32e3138b689ecef46e
BLAKE2b-256 ff73888fb868e030ef5df38826c6114c52e073244c1f9e5d7380e07679fb611a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page