# SNN Foundation Model - AAAI 2026

## Project Overview
This project focuses on Spiking Neural Network (SNN) foundation models, providing support for relevant research in AAAI 2026. It includes functions such as data processing, model training, and evaluation.

## Project Structure
```
├── .idea/               # IDE configuration files
├── challenge/           # Core code directory
├── conf/                # Configuration files directory
├── output/              # Output results directory
├── requirements.txt     # Project dependencies file
├── test_new_model_attention.py
├── train-tinyRSNN_attention_V2_crossSet.py
└── ...                  # Other training scripts
```

## Quick Start
### 1. Install Dependencies
```bash
pip install -r requirements.txt
```

### 2. Configure Files
Select or modify appropriate configuration files in the `conf/` directory.

### 3. Run single-session Training Script
```bash
python test_new_model_attention.py --multirun output_dir=" ./output_indy_RATSNN" train_monkeys=[indy] 
# For Monkey L
python test_new_model_attention.py --multirun output_dir=" ./output_loco_RATSNN" train_monkeys=[loco] 
# Notice that, download dataset before running the script
# For Monkey Je in NLB_MAZE
python test_new_model_attention.py --multirun output_dir=" ./output_MAZE_RATSNN" train_monkeys=[MAZE] 
# For Monkey I in NLB_RTT
python test_new_model_attention.py --multirun output_dir=" ./output_RTT_RATSNN" train_monkeys=[RTT] 
# For Monkey C05
python test_new_model_attention.py --multirun output_dir=" ./output_C05_RATSNN" train_monkeys=[C05] 
```

### 4. Run cross-session Training Script
```bash
# Use Monkey L as example:
# cross-session pretraining
python train-tinyRSNN_attention_V2_crossSet_onlyPretrain.py --multirun output_dir=" ./output_crossSession_loco_pretrain" pretrain_monkeys=[loco]
# single-session finetuning
python train-tinyRSNN_attention_V2_crossSet_retrain.py --multirun output_dir=" ./outputnew_loco_crossSession_finetune" train_monkeys=[loco] task_retrain=cross_session_pretraining
# re-param finetuning
python train-tinyRSNN_attention_V2_crossSet_retrain_session2session.py --multirun output_dir=" ./outputnew_loco_crossSession_finetune_rep" train_monkeys=[loco] reparameterization=True initializer.compute_nu=False task_retrain=cross_session_repfinetuning
```

### 4. Run cross-condition Training Script
```bash
# Use Monkey L as example:
# cross-condition pretraining
python train-tinyRSNN_attention_V2_crossSet_multiBN.py --multirun output_dir=" ./output_crossCondition_indy_pretrain" pretrain_monkeys=[loco,indy,C05,MAZE] data.nb_inputs.indy=192 data.nb_inputs.C05=192 multi_BN=True 
# cross-session retraining
python train-tinyRSNN_attention_V2_crossSet_load_and_Pretrain.py --multirun output_dir=" ./outputnew_loco_crossCondition_retrain" train_monkeys=[loco] multi_BN=True task_retrain=cross_condition_pretraining 
# single-session finetuning
python train-tinyRSNN_attention_V2_crossSet_retrain.py --multirun output_dir=" ./outputnew_loco_crossCondition_finetune" train_monkeys=[loco] multi_BN=True task_retrain=cross_condition_retraining 
# re-param finetuning
python train-tinyRSNN_attention_V2_crossSet_retrain_session2session.py --multirun output_dir=" ./outputnew_loco_crossCondition_finetune_rep" reparameterization=True multi_BN=True task_retrain=cross_condition_repfinetuning
```

## Module Description
- `challenge/`: Contains core code for data processing, model definition, training, and evaluation.
- `conf/`: Contains various configuration files, such as data, model, and training configurations.
- `output/`: Contains output results from training and testing.

## Contact Us
If you have any questions, please contact us through the following channels.