Quick Navigation Guide for AI Assistants & Developers
NEST/
│
├── src/ # 🧠 Core Source Code
│ ├── data/ # Dataset loaders (ZuCo)
│ ├── models/ # Neural architectures (LSTM, Transformer, Conformer)
│ ├── preprocessing/ # EEG signal processing pipeline
│ ├── training/ # Training loops, metrics, checkpoints
│ ├── evaluation/ # Inference, benchmarking, deployment
│ └── utils/ # Tokenizers, helpers
│
├── scripts/ # 🔧 Runnable Scripts
│ ├── train_with_real_zuco.py # Main training script
│ ├── verify_zuco_data.py # Data validation
│ └── generate_figures.py # Publication figures
│
├── configs/ # ⚙️ Configuration Files
│ ├── model.yaml # Model hyperparameters
│ └── preprocessing.yaml
│
├── results/ # 📊 Training Results & Checkpoints
│ └── real_zuco_*/ # Training runs with timestamps
│
├── docs/ # 📖 Documentation
│ ├── guides/ # How-to guides
│ ├── literature-review/
│ └── phase*.md # Development phase docs
│
├── examples/ # 💡 Example Scripts
│ ├── 01_basic_training.py
│ ├── 02_subject_adaptation.py
│ ├── 03_optimization.py
│ └── 04_deployment.py
│
├── tests/ # 🧪 Test Suite
│ ├── unit/ # Unit tests
│ └── integration/ # End-to-end tests
│
├── data/ # 📁 Dataset Storage
│ ├── raw/zuco/ # Raw ZuCo .mat files
│ └── processed/ # Preprocessed data
│
└── papers/ # 📝 Research Paper Drafts
| File | Purpose |
|---|---|
README.md |
Project overview & results |
ROADMAP.md |
Development phases (1-6) |
requirements.txt |
Python dependencies |
start_full_training.sh |
One-click training script |
pyproject.toml |
Package configuration |
nest.py- Main NEST model classesspatial_cnn.py- EEGNet, DeepConvNet for spatial featurestemporal_encoder.py- LSTM, Transformer, Conformer encodersattention.py- Cross-attention, self-attention mechanismsdecoder.py- CTC decoder, RNN-T decoderfactory.py- Model creation from YAML configsadaptation.py- Subject adaptation (DANN, CORAL)
pipeline.py- Complete preprocessing pipelinefiltering.py- Band-pass filtering (0.5-50 Hz)artifact_removal.py- ICA-based artifact rejectionaugmentation.py- EEG data augmentation
trainer.py- Training loop managermetrics.py- WER, CER, BLEU calculationscheckpoint.py- Model saving/loading
benchmark.py- Comprehensive evaluationbeam_search.py- Beam search decoderpruning.py- Model compressionquantization.py- INT8/FP16 quantizationdeployment.py- ONNX/TorchScript export
Each training run creates a timestamped folder:
results/real_zuco_20260216_031557/
├── checkpoints/ # Model weights
│ └── best_model.pt
├── results.json # Training metrics
└── training_curve.pdf # Loss visualization
| Goal | Start Here |
|---|---|
| Train a model | scripts/train_with_real_zuco.py |
| Understand the model | src/models/nest.py |
| Preprocess EEG data | src/preprocessing/pipeline.py |
| Evaluate results | evaluate_results.py |
| Learn by example | examples/01_basic_training.py |
| Read the paper | papers/NEST_manuscript.md |
When modifying this project:
- Models: Edit
src/models/for architecture changes - Training: Edit
src/training/trainer.pyfor training logic - Configs: Use
configs/model.yamlfor hyperparameters - Scripts:
scripts/contains standalone executables - Tests: Add tests in
tests/unit/ortests/integration/
Code Style: Black formatter, PEP 8, type hints required.