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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

monkin77
Copy link

@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
Author

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

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
3 participants