Skip to main content

Module neural

Module neural 

Source
Expand description

Neural Resonance Module — Baked Mask Encoder

Implements Signal Reconstruction Resonance (Patent 1) using a lightweight hand-rolled MLP instead of a full LLM. Each mask’s signature_vector is “baked” into a tiny neural network (64 → 128 → 64) whose weights are derived deterministically from the mask’s 64-float signature.

Memory per mask: ~66 KB (vs ~400 MB for Qwen-0.5B). Total for 100 masks: ~6.6 MB — fits any VPS.

The baked encoder learns the mask’s traffic fingerprint:

  • Input: 64-dim feature vector extracted from live traffic
  • Output: 64-dim reconstruction vector
  • MSE(input, output) = reconstruction error = resonance score

Low MSE → traffic matches the mask → healthy High MSE → traffic deviates from mask signature → DPI compromise detected

Structs§

AnomalyDetector
Anomaly detector for DPI fingerprinting
BakedMaskEncoder
A tiny MLP whose weights are deterministically “baked” from a mask’s 64-float signature_vector.
NeuralConfig
Neural Resonance Module configuration
NeuralResonanceModule
Neural Resonance Module
ResonanceResult
Resonance check result
TrafficStats
Traffic statistics for neural analysis

Enums§

ResonanceStatus
Resonance status

Functions§

encode_features
Encode traffic stats into a 64-dim feature vector