pyontronics
Physical ESN with LIN project based on iontronic EOM
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.1%) to scientific vocabulary
Repository
Physical ESN with LIN project based on iontronic EOM
Basic Info
- Host: GitHub
- Owner: TMKamsma
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 19.2 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
Physical Reservoir Computing with (iontronic) Leaky-Integrator Neurons
Abstract
This repository provides an Echo State Network (ESN) and Band-pass Network (BPN) framework based on a physical circuit. The code is designed for both continuous data streams and sets of shorter pulses, each with a single label. The networks contain (iontronic) memristors, whose dynamic conductance exhibit the behaviour of leaky-integrator neurons. The physical (sigmoidal) steady-state conductance $g_{\text{inf}}(V)$ of the memristor nodes takes on the role of the activation function, while its conductance memory exhibits the same dynamics as leaky integrator nodes.
Unique Contribution
Our approach handles both:
- Single time series (predicting at each step).
- Multiple shorter series (pulses) (predicting a single label at the end of each pulse).
The leaky-integrator neurons and the integrated operator $g_{\text{inf}}$ allow for flexible state evolution that aligns with many practical tasks.
usage
- Clone or download this repository.
- Install required libraries:
console pip install -r .\requirements.txt - Open and run the demo notebook included in the repository.
EchoStateNetwork Core Parameters
| Parameter | Type | Default | Description |
|-------------------------|------------|---------|-------------|
| input_dim | int | - | Dimension of input features |
| reservoir_size | int | - | Number of neurons in reservoir |
| output_dim | int | - | Dimension of output targets |
| leaking_rate | float | 1.0 | Self-coupling constant (a ∈ (0,1]) |
| step_size | float | 0.3 | Discrete time step (δ) |
| time_scale | float | 1.0 | Base timescale (c) |
| spectral_radius | float | 0.9 | Spectral radius of Wres |
| sparsity | float | 0.5 | Fraction of zero weights in Wres |
| input_scaling | float | 1.0 | Scaling factor applied to input |
| regularization | float | 1e-4 | Ridge regression regularization |
| washout | int | 100 | Initial timesteps to discard during training |
| washout_inference | int | 0 | Initial timesteps to discard during prediction |
| weight_seed | int | 42 | Random seed for weight initialization |
| activation | callable | np.tanh | Nonlinear activation function |
| guarantee_ESP | bool | True | Enforce Echo State Property |
| progress_bar | bool | True | Show training progress bars |
| apply_dynamics_per_step_size | int | 1 | Number of substeps per Δt |
| choose_W_in | bool | False | Use custom input weights |
| W_in_input | np.ndarray | None | If choose_W_in = True: Custom Win matrix (shape [reservoirsize, input_dim]) |
BandPassNetwork Additional Parameters
| Parameter | Type | Default | Description |
|-------------------------|------------|---------|-------------|
| time_scale_std | float | 1.0 | Standard deviation of per-neuron timescale distribution |
| choose_timescales | bool | False | Use custom timescale array |
| timescale_array_input | np.ndarray | None | If choose_timescales = True: Custom timescales (shape [reservoir_size,]) |
Physical Interpretation
Key physical relationships:
- Physical timescale: τ = time_scale/leaking_rate = c/a
- Physical conductance as activation: activation can be set to physical dynamic conductance
Figures

Optimization
The parameters of the ESN can be optimized for a dataset using optuna. Example
files for optimization are included in the repository in the optimization
folder. Use optuna-dashboard sqlite:///optuna_esn.db to visualize the results.
This code requires the optuna library. Install it using pip install optuna.
The dashboard requires the optuna-dashboard library. Install it using
pip install optuna-dashboard.
Authors
Tim Kamsma
Jelle Jasper Teijema
License
This extension is released under the MIT License.
Contact
This work is part of https://doi.org/10.48550/arXiv.2505.13451. For questions, please contact t.m.kamsma@uu.nl
Owner
- Name: Tim M Kamsma
- Login: TMKamsma
- Kind: user
- Repositories: 1
- Profile: https://github.com/TMKamsma
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." title: "Code Repository for: Pyontronics" doi: 10.5281/zenodo.15113279 date-released: 2025-03-31 url: "https://github.com/TMKamsma/Pyontronics" authors: - family-names: "Kamsma" given-names: "Tim M" orcid: "https://orcid.org/0000-0002-8898-8337" - family-names: "Teijema" given-names: "Jelle J" orcid: "https://orcid.org/0000-0001-9282-4311"
GitHub Events
Total
- Release event: 2
- Push event: 25
- Pull request event: 1
- Create event: 1
Last Year
- Release event: 2
- Push event: 25
- Pull request event: 1
- Create event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- jteijema (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- IProgress *
- ipykernel *
- ipywidgets *
- matplotlib *
- networkx *
- numpy *
- pandas *
- scipy *
- tqdm *