# Does NuPIC allow negative weights?

**URL:** <https://discourse.numenta.org/t/does-nupic-allow-negative-weights/4227>\
**Category:** NuPIC\
**Created:** [July 19, 2018, 12:46am UTC](https://discourse.numenta.org/t/does-nupic-allow-negative-weights/4227 "2018-07-19T00:46:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali\_m](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@ali\_m](https://discourse.numenta.org/u/ali_m)\
**Post date:** [July 19, 2018, 12:46am UTC](https://discourse.numenta.org/t/does-nupic-allow-negative-weights/4227/1 "2018-07-19T00:46:26Z")

</div>

Does NuPIC allow negative weights for spatial pooler and/or temporal memory?  
If so, is that biologically plausible?

---

<div class="post-metadata">

**Author:** ![Paul\_Lamb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/paul_lamb/32/2725_2.png) [@Paul\_Lamb](https://discourse.numenta.org/u/Paul_Lamb)\
**Post date:** [July 19, 2018, 12:53am UTC](https://discourse.numenta.org/t/does-nupic-allow-negative-weights/4227/2 "2018-07-19T00:53:07Z")

</div>

HTM does not deal in weights like other artificial neural networks. Synapses are modeled as Boolean connections which have an associated permanence (positive float between 0 and 1). Permanence values above a configurable threshold are connected. Permanence values below the threshold are not connected.

---

<div class="post-metadata">

**Author:** ![ali\_m](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@ali\_m](https://discourse.numenta.org/u/ali_m)\
**Post date:** [July 19, 2018, 12:57am UTC](https://discourse.numenta.org/t/does-nupic-allow-negative-weights/4227/3 "2018-07-19T00:57:10Z")

</div>

As i understood from the code, that’s the way for temporal memory, but is that the same for spatial pooler?

---

<div class="post-metadata">

**Author:** ![Paul\_Lamb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/paul_lamb/32/2725_2.png) [@Paul\_Lamb](https://discourse.numenta.org/u/Paul_Lamb)\
**Post date:** [July 19, 2018, 1:05am UTC](https://discourse.numenta.org/t/does-nupic-allow-negative-weights/4227/4 "2018-07-19T01:05:47Z")

</div>

Yes, SP also models synapses in the same way. If you haven’t read it yet, the [BAMI chapter on SP](https://numenta.com/assets/pdf/spatial-pooling-algorithm/Spatial-Pooling-Algorithm-Details.pdf) is a good way to get a high-level view of how the SP algorithm works. The first [HTM School SP video](https://youtu.be/R5UoFNtv5AU?list=PL3yXMgtrZmDpzXhvuOy5xtAp6YK1b8Nlo&t=559) around 9:20 does a good job of explaining this as well.

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [July 19, 2018, 1:32pm UTC](https://discourse.numenta.org/t/does-nupic-allow-negative-weights/4227/5 "2018-07-19T13:32:52Z")

</div>

I’ll be working more on the currently incomplete [SP section of Building HTM Systems](https://buildinghtm.systems/spatial-pooling/) when I get back from OOTO.
