| SNR (dB) | Accuracy | AUC | F1 |
|---|---|---|---|
| -25 | 99.0% | 1.000 | 0.990 |
| -30 | 100.0% | 1.000 | 1.000 |
| -35 | 100.0% | 1.000 | 1.000 |
| -40 | 98.0% | 1.000 | 0.980 |
| -45 | 98.0% | 1.000 | 0.980 |
| -50 | 100.0% | 1.000 | 1.000 |
python run_full_pipeline.py --quick # ~90s on CPU
python run_full_pipeline.py # full run| Stage | What it does | Key output |
|---|---|---|
| 1. Denoiser Selection | Evaluates LM, SSA, Wavelet on low-SNR white noise; selects best | denoiser_selection.txt |
| 2. Parallel Neuron Search | 5 neuron × 3 surrogate = 15 configs via ProcessPoolExecutor | neuron_search.csv, heatmap |
| 3. Dataset Generation | SNR-controlled signals → denoised → 7-channel feature extraction | train/val DataLoaders |
| 4. Ensemble Training | N-member heterogeneous CNN+SNN ensemble with TET loss | model checkpoints |
| 5. SNR Evaluation | Accuracy/AUC/F1 at each dB level with denoising | snn_accuracy_vs_snr.csv, ROC plots |
| 6. Stress Test | Gaussian, S&P, RFI, weight noise, OOD frequency shift | degradation + OOD plots |
Raw NQR signal ──→ [Wavelet/SSA/LM Denoiser] ──→ Denoised signal
↓ ↓
└──────────────────────────────────→ [7-channel Feature Extraction]
↓
real, imag, magnitude,
log-FFT, FFT phase,
unbiased autocorrelation,
instantaneous frequency
↓
[CNN + SE Attention + Residual]
Conv1d(7→16→32→64) + SE blocks
GlobalAvgPool → 64-dim
↓
[Learnable Temporal Encoder]
Differentiable time-weighting → T=8
↓
[SNN Classification Head]
PLIF (learnable τ) + detach_reset
TET loss (per-timestep supervision)
↓
Detection: ¹⁴N signal / noise| # | Fix | Impact |
|---|---|---|
| 1 | Neuron search → ensemble wiring | Search results now populate ENSEMBLE_CONFIGS dynamically (was dead code — search ran but result was ignored) |
| 2 | Encoder train/inference mismatch | LearnableTemporalEncoder used at inference (was DeterministicEncoder), encoder weights saved in checkpoints |
| 3 | Early stopping on val_accuracy | Was val_loss — at 99%+ accuracy, loss fluctuates while accuracy plateaus, causing premature stopping |
| # | Change | Impact |
|---|---|---|
| 4 | Consolidated noise generation | generate_noise_sample() is single source of truth (was copy-pasted 4×) |
| 5 | Consolidated denoiser dispatch | denoise_signal()/denoise_batch() in nqr_snn.denoising (was copy-pasted 4×) |
| 6 | Removed dead code | RateCodingEncoder, legacy NQRDataset/build_dataloaders/get_balanced_loader removed |
| 7 | Removed archive files | Source lives on main branch directly — no more zip/tar.gz clutter |
| 8 | Removed dead config | USE_CURRICULUM/CURRICULUM_UNLOCK_FRAC removed (never implemented) |
| 9 | Tautological SNR verification | Removed noisy - clean check that always returned target exactly by construction |
| # | Parameter | Old → New | Why |
|---|---|---|---|
| 10 | NEURON_SEARCH_EPOCHS | 20 → 40 | Too few to differentiate neuron types |
| 11 | MAX_EPOCHS | 200 → 100 | Models converge at ~40-60; cosine schedule calibrated |
| 12 | EARLY_STOP_PATIENCE | 25 → 35 | More room for fine-grained improvement |
y(t) = A · exp(-t²/2σ² - t/T₂) · exp(i[2πνt + φ]) + ε(t)--quick Fast demo mode (~90s CPU)
--train_size N Samples per class for training (default: 3000)
--val_size N Samples per class for validation (default: 1000)
--ensemble_size N Ensemble members (default: 10)
--max_epochs N Max training epochs (default: 100)
--n_test N Test samples per SNR level (default: 300)
--search_workers N Parallel workers for neuron search (default: auto)
--search_epochs N Epochs per neuron search config (default: 40)
--skip_denoise Skip denoiser selection
--skip_neuron_search Skip neuron search (use PLIF+ATan)
--skip_stress_test Skip noise injection stress testpip install -r requirements.txt1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = 'KD099/nqr-snn-framework'
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id)AutoModelForCausalLM with the appropriate AutoModel class.