Connections: replace destroyMinPermSynapses() with plausible decay#751
Connections: replace destroyMinPermSynapses() with plausible decay#751
Conversation
and adapts TM which used this function. The functionality is removed as not plausible biologically, instead we let a (weak) synapse decay even further, so it's removed.
this is adapted to the artificial destroyMinPermSynapses() removed, instead we rely on decay synapse to eventually remove the unused syn.
breznak
left a comment
There was a problem hiding this comment.
Please review @dkeeney @ctrl-z-9000-times , part of my progress PRs on making Connections more biological and faster at the same time
src/htm/algorithms/Connections.hpp
Outdated
| * @param nDestroy - Must be greater than or equal to zero! | ||
| * @param excludeCells - Presynaptic cells which will NOT have any synapses destroyed. | ||
| */ | ||
| void destroyMinPermanenceSynapses(const Segment segment, Int nDestroy, |
There was a problem hiding this comment.
removed as not entirely bio-inspired, using synaptic decay instead.
PS: I also hope for some better cross platform determinism, as the simpler code does not depend so much on ordering of synapses.
There was a problem hiding this comment.
removed as not entirely bio-inspired, using synaptic decay instead.
I now know what you're upto, and what was actually missing from this PR! the decay itself.
I'm gonna implement it for the synapses' updates.
|
pingity-pong, please :) |
ctrl-z-9000-times
left a comment
There was a problem hiding this comment.
- I don't really understand what this change does.
- Where is the replacement code?
- The tests are very minimal.
replaces the "let's remove the weakest synapse to make room for a new one", with
The reason being:
it had already existed, it's the
as above, the code is already in place. I've reworked the existing test which was really a unit test tailored for the specific function (and not a "correct functionality test"). I was able to demonstrate we can do the same (even with finer control of how many times the event has to occur, for the syn to be replaced) with the already existing functionality. So code-wise, this is a cleanup, and one functionality is performed by other part. The code has been only relevant in "real data" hotgym.py (not HelloSPTP/sinewave hotgym in c++) where the results remain the same. |
Do you have any evidence for this?
I'm not convinced since the unit tests are very simple. For functional changes to the TM algorithm, the NAB is a better test.
That's not a great reason to remove code that is used. |
|
Hmmm, I wonder if I should have approved this if @ctrl-z-9000-times has an objection. |
you can change your Review, and I'm not going to merge (yet) until we discuss the aformentioned concerns, so no worries. |
fair point, thanks!
I'll try to point to some research, to be fair, we don't have here listed evidence for the current approach either. Note: a big missing NO-NO in this PR is that I forgot to implement the actuall DECAY I've been talking about here. So..let me code that :) |
Yes, that would be fine.
I know, the current approach seems pragmatic rather than biological. |
FYI, I ran the tests, so far only without the NABmasterPR (no decay yet):PR (with decay implemented) |
from those "least". Not random. Slight optimization
Connections.destroyMinPermSynapses()as not being biologically plausiblehotgym.pyexcercises the code (uses different TM params, real-world input data), and results are +- the same or slightly better.TODO:
Followup to #746