Skip to content
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

Fix: subthreshold dynamics equation of refractory lif #842

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

monkin77
Copy link
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
@jlubo
Copy link
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.

@PhilippPlank PhilippPlank added the 1-bug Something isn't working label Apr 25, 2024
@monkin77
Copy link
Contributor Author

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

@tim-shea tim-shea merged commit 37c19a2 into lava-nc:main Jun 20, 2024
6 checks passed
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