Skip to content

StNN introduces an epoch-free neural architecture for real-time learning on non-stationary streams. By treating time as a core dimension, it achieves continuous convergence without static datasets. This repository contains the Reference Implementation, demonstrating high-throughput stability (364k+ OPS) and temporal adaptability.

License

Notifications You must be signed in to change notification settings

pathan-amama/StNN-Stream-Neural-Networks

Repository files navigation

StNN: Stream Neural Networks

Official implementation of the paper "Stream Neural Networks: Epoch-Free Learning with Persistent Temporal State".

This repository contains the reference implementation of the Stream Neural Network (StNN) framework, designed for epoch-free learning and real-time stream processing under irreversible input constraints.

Core Components

  1. Stream Neuron Network (StNN): The architecture composed of Stream Neurons that maintain persistent temporal states.
  2. SNA (Stream Network Algorithm): The core algorithm driving the StNN. The reference implementation uses a standard momentum-based flow optimizer to demonstrate architectural stability.
  3. Reference Memory System: A simplified single-tier buffer to demonstrate memory integration. (Advanced tiered memory governance is excluded from this reference implementation).
  4. Stream Learner: A reference learning mechanism demonstrating the memory-integrated forward pass.

Project Structure

StNN/
├── stnn/                # Core implementation
│   ├── stream_neuron.py   # StreamNeuron, ReferenceMemory, StreamNetwork, StreamLearner
│   └── stateless_model.py # Baseline models (RNN, MLP)
├── experiments/         # Validation and demos
│   ├── phase_space.py     # Flow field visualization
│   ├── retention_sweep.py # Stability benchmarks
│   └── tracking_demo.py   # Real-time learning demo
├── pipeline.py          # Automated reproduction script
└── requirements.txt     # Dependencies

Usage

Installation

pip install -r requirements.txt

Pipeline Execution

To run the full suite of tests, benchmarks, and visualizations:

python pipeline.py

Examples

$env:PYTHONPATH="."; python -m experiments.tracking_demo

Data and Schema

The framework is designed for synthetic and real-time streaming data.

  • Input Schema: High-dimensional vectors (NumPy arrays) representing signal states.
  • Output Schema: Predicted states or classification logits.
  • Methodology: Data is processed sequentially (single-pass) to simulate a real-time stream.
  • Limitations: Optimized for temporal continuity; may require re-calibration for highly stochastic, non-sequential data.

Mathematical Foundations

The framework uses temporal continuity for momentum-based weight updates, allowing for convergence in a single stream pass.

License

MIT License

About

StNN introduces an epoch-free neural architecture for real-time learning on non-stationary streams. By treating time as a core dimension, it achieves continuous convergence without static datasets. This repository contains the Reference Implementation, demonstrating high-throughput stability (364k+ OPS) and temporal adaptability.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published