Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ Versions correspond to arXiv submissions of the paper.

---

## [v0.3.0-arxiv_v3] - TODO: DATE!
### Added
- Test suite to test main simulation scripts in `tests/`
- `scripts/symm_net/scatter_stdwi_rdd_sal.ipynb` to reproduce paper figure no. 7
- Added code for convenient reproduction
of figure 8 and figure 9 end-to-end (i.e. `scripts/symm_net/sweep*.py*`, `scripts/symm_net/plots.ipynb` and `scripts/symm_net/plot_puresymm.ipynb`)

### Updated
- Update all docstrings in a consistent form if needed.
- Add consistent typing where needed.
- README.md to match current repo structure.
- All plotting scripts if figures have changed.

### Remove
- obsolete code chunks in `spiking_sampling_network/src/neuralsampling`
- obsolete code chunks in `spiking_microcircuits/src/microcircuits`


## [v0.2.0-arxiv_v2] - 2026-03-24
### Added
- Symmnet experiments for figures 7 and 8 (`scripts/symmnet/`) plus `symmnet` package
Expand All @@ -18,4 +36,4 @@ Versions correspond to arXiv submissions of the paper.
- SSN experiments (figures 4 & 5, `spiking_sampling_network` and `scripts/ssn/`)
- Microcircuit experiments (figure 6, `spiking_microcircuits` and `scripts/microcircuits/`)
- Code for analytically calculating the STDDs (`stdd_calculator`)
- Comparison of diffeent psp shapes (figure 7, `scripts/psp_shapes.ipynb`)
- Comparison of different psp shapes (figure 7, `scripts/psp_shapes.ipynb`)
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ For conveniently reproducing any of the data shown in figure 8, we provide two w
See `python sweep.py --help` for all available settings.
- For large scale parameter sweeps (for instance to reproduce the 105 runs for all datasets, algorithms and seeds) on an HPC cluster (with SLURM), we provided the following workflow that needs only minimal adaptation to the available system.
1. Run `sweep_creator.py`: It creates `jobs.sh` which contains all `main_salnet.py`-calls with the relevant settings.
See `python sweep_creator.py --help` for all available settings.
See `python sweep_creator.py --help` for all available settings (the default settings will rerun the original simulations).
2. Modify `slurm.sh` to specify the relevant settings for your HPC cluster.
3. Run `bash slurm_submit.sh`. It will call `slurm.sh` internally and start a slurm array job.
4. The data can be plotted with `scripts/symm_net/plots.ipynb`
Expand All @@ -125,16 +125,33 @@ The "Dale's law" experiment can be reproduced by `scripts/dales_law/EI-system.ip

#### Figure 11

The data for figure 7 can be reproached by `scripts/psp_shapes.ipynb`. Note that this notebook typically requires a lot of memory.
The data for figure 11 can be reproached by `scripts/psp_shapes.ipynb`. Note that this notebook typically requires a lot of memory (> 8GB).

#### Figure 12

Figure 8 can be reproduced by `scripts/plots_for_proof.ipynb`.
Figure 12 can be reproduced by `scripts/plots_for_proof.ipynb`.


## Tests

TODO description
The test suite lives in `tests/` and is run with [pytest](https://pytest.org).
It contains two layers of tests:

**Fast smoke tests** (run automatically in CI, no GPU required):
```bash
pytest tests/
```
These verify that all four packages import correctly and that `main_salnet.py`, `traim_mc.py` and `train_bm.py` complete a minimal
run without errors.

**PyTorch training tests** (opt-in, GPU recommended):
```bash
pytest tests/ --pytorch # bp section only (default)
pytest tests/ --pytorch --sections bp,fa,sal # specific subset
pytest tests/ --pytorch --sections all # test all seven algorithms
```
These run `main_salnet.py` end-to-end for one epoch per selected algorithm
section. They are skipped by default because they require PyTorch CNN training.


## Version history
Expand Down
2 changes: 2 additions & 0 deletions scripts/microcircuits/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore the param sweep files
*/exp.[0-9]*.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "0",
"metadata": {},
"source": [
"# Create the plots used in the stability proof (section 4.2.2, fig. 12)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -20,29 +28,29 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
"# define the style etc.\n",
"mpl.style.use(\"../mystyle.mpl\")"
"mpl.style.use(\"../../mystyle.mpl\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
"FIG_DIR = Path(\"../figs\")\n",
"FIG_DIR = Path(\"../../figs/sal_principle\")\n",
"FIG_DIR.mkdir(parents=True, exist_ok=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -60,7 +68,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -107,7 +115,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5",
"id": "6",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -138,7 +146,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -169,7 +177,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7",
"id": "8",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -216,7 +224,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8",
"id": "9",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -247,7 +255,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9",
"id": "10",
"metadata": {},
"outputs": [],
"source": [
Expand Down
Loading
Loading