Skip to content

Fix: subthreshold dynamics equation of refractory lif#842

Merged
tim-shea merged 2 commits intolava-nc:mainfrom
monkin77:fix/lifRefractoryDynamics
Jun 20, 2024
Merged

Fix: subthreshold dynamics equation of refractory lif#842
tim-shea merged 2 commits intolava-nc:mainfrom
monkin77:fix/lifRefractoryDynamics

Conversation

@monkin77
Copy link
Copy Markdown
Contributor

@monkin77 monkin77 commented Mar 20, 2024

Issue Number: #841

Objective of pull request: Fix the PyLifRefractoryModelFloat voltage dynamics.

Pull request checklist

Your PR fulfills the following requirements:

  • Issue created that explains the change and why it's needed
  • Tests are part of the PR (for bug fixes / features)
  • Docs reviewed and added / updated if needed (for bug fixes / features)
  • PR conforms to Coding Conventions
  • PR applys BSD 3-clause or LGPL2.1+ Licenses to all code files
  • [] Lint (flakeheaven lint src/lava tests/) and (bandit -r src/lava/.) pass locally
  • Build tests (pytest) passes locally

Pull request type

Please check your PR type:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation changes
  • Other (please describe):

What is the current behavior?

  • The PyLifRefractoryModelFloat model does not update the voltage correctly in its sub-threshold dynamics. The current equation is:
    image
    Therefore, the voltage of the neurons is updated incorrectly.

What is the new behavior?

  • The correct dynamics of the voltage should be:
    image
    so the new behavior uses this new equation.

Does this introduce a breaking change?

  • Yes
  • No

Supplemental information

The unit test related to the Refractory model confirmed that the voltage remains at 0 during the refractory state. However, the expected voltage array is incorrect, so it was also modified.

Closes #841

@monkin77 monkin77 marked this pull request as ready for review March 22, 2024 14:41
@monkin77 monkin77 force-pushed the fix/lifRefractoryDynamics branch from 12fcbcb to 89c2764 Compare March 22, 2024 14:43
@jlubo
Copy link
Copy Markdown
Contributor

jlubo commented Mar 27, 2024

Hi, just to support this, in the Brian2Lava project we have used the same fix and it works well.

@monkin77 monkin77 force-pushed the fix/lifRefractoryDynamics branch from 89c2764 to 765ede9 Compare April 3, 2024 13:51
@monkin77 monkin77 force-pushed the fix/lifRefractoryDynamics branch from 765ede9 to 49c76b2 Compare April 15, 2024 14:17
@PhilippPlank PhilippPlank added the 1-bug Something isn't working label Apr 25, 2024
@monkin77 monkin77 force-pushed the fix/lifRefractoryDynamics branch from a933bc0 to 1904854 Compare May 14, 2024 16:22
@monkin77
Copy link
Copy Markdown
Contributor Author

@mgkwill @bamsumit I would like to request a review of this PR. It's a quick hotfix on the refractory LIF behavior.

@monkin77 monkin77 force-pushed the fix/lifRefractoryDynamics branch from 1904854 to 7bb6386 Compare May 26, 2024 21:46
@monkin77 monkin77 force-pushed the fix/lifRefractoryDynamics branch from 7bb6386 to 727c3c0 Compare June 11, 2024 10:59
@tim-shea tim-shea merged commit 37c19a2 into lava-nc:main Jun 20, 2024
epaxon pushed a commit that referenced this pull request Jun 20, 2024
* Fix: subthreshold dynamics equation of refractory lif

* Fix: RefractoryLIF unit test to test the voltage dynamics
monkin77 added a commit to monkin77/thesis-lava that referenced this pull request Jul 12, 2024
* Fix: subthreshold dynamics equation of refractory lif

* Fix: RefractoryLIF unit test to test the voltage dynamics
mgkwill added a commit that referenced this pull request Aug 5, 2024
* GradedReluVec process and tests.

* changed test to use thresh not 0.

* removed duplicate docstring line.

* Bump tornado from 6.4 to 6.4.1 (#863)

Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.4 to 6.4.1.
- [Changelog](https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst)
- [Commits](tornadoweb/tornado@v6.4.0...v6.4.1)

---
updated-dependencies:
- dependency-name: tornado
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix: subthreshold dynamics equation of refractory lif (#842)

* Fix: subthreshold dynamics equation of refractory lif

* Fix: RefractoryLIF unit test to test the voltage dynamics

* Bump urllib3 from 2.2.1 to 2.2.2 (#865)

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.2.1...2.2.2)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: PhilippPlank <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: João Gil <[email protected]>
Co-authored-by: PhilippPlank <[email protected]>
Co-authored-by: Marcus G K Williams <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1-bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix the PyLifRefractoryModelFloat class' subthreshold dynamics

4 participants