Skip to content

Reset bias clamped to non-negative in PulsedRPUDeviceMetaParameter::initialize may block valid negative decay point #755

@cyansky99

Description

@cyansky99

Description

In src/rpucuda/rpu_pulsed_device.h:113, reset is clamped to non‑negative (reset = MAX(reset, (T)0.0);). This prevents negative reset bias values. However, reset is used as the decay convergence point (w = (w - b) * s + b), and negative convergence points are valid when bounds are symmetric or negative. The clamp changes the intended behavior and contradicts the docs for PulsedDevice (no sign restriction).

How to reproduce

Run decay or update steps with devices having negative reset point. (e.g. reset = -0.5)

Expected behavior

Weights should decay to -0.5 but do decay to 0.0.

  • Pytorch version: 2.4.1
  • Package version: 1.0.0
  • OS: Ubuntu 22.04.4 LTS (WSL2 kernel: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64)
  • Python version: 3.12.5 (CPython)
  • Conda version (or N/A): 24.11.3

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions