-
-
Notifications
You must be signed in to change notification settings - Fork 43
[Feature] Add NeuromorphicCell implementation (Issue #353) #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add NeuromorphicCell implementation (Issue #353) #364
Conversation
- Adds src/layers/neuromorphic.jl with NeuromorphicCell struct and step function. - Updates src/ReservoirComputing.jl to export/include the new cell. - Adds structural tests in test/layers/test_neuromorphiccell.jl. - Implements Model 1 dynamics as per Issue SciML#353.
|
I have addressed all the feedback
Let me know if everything looks good. |
|
Nice, I think this is almost ready to be merged. The only things missing are addressing the unused typing in the cell, the citations, and maybe the naming of the kwargs. do you think we can use more expressive names? if not that's not an issue tbh |
|
also, don't forget to format with Runic.jl. I still have to update the readme to indicate that we use that now |
|
Done, I have formatted the files with Runic.jl.
|
|
all right, I left a couple of minor comments. pending any test failures we can merge this |
|
I couldn't find any specific new comments other than the renaming, typing, and formatting ones (which are addressed). If I missed something, could you please point it out? Also fixed a duplicate BibTeX entry. |
|
oh thanks! these lines are not needed and the |
|
Thanks a lot for the clarification. I’ve removed the unused lines and now use T = eltype(inp) to cast the scaling coefficients for correct typing. |
|
fantastic, as soon as tests pass we can merge this! I'll fix the spell check in another commit |
Description
This PR addresses Issue #353 by adding the
NeuromorphicCell, a reservoir cell inspired by biological excitation–inhibition balance.Implementation Details
This contribution specifically implements Model 1 described in the issue, where the input is applied inside the nonlinearity:
The implementation follows the standard
AbstractReservoirRecurrentCellinterface.Parameters
The cell exposes the following hyperparameters (fixed during training):
a_ex,a_inh: Scaling factors for excitatory/inhibitory recurrence.b_ex,b_inh: Scaling factors for the separated responses.activation: The nonlinearitytanh_fast).Future Work
This PR focuses on establishing the cell structure and Model 1 dynamics. Model 2 (additive input) and the input gain parameter$g$ can be added in a follow-up PR.
Testing
test/layers/test_neuromorphiccell.jl.Base.show, single-step forward, and batched forward passes.