Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

I built a biologically inspired spiking neural network from scratch and it learned with %5 accuracy to do addition :) There is no backpropagation, no artificial loss functions - just spikes, synapses, and dopamine-like reward signals. it uses STDP -> "Spike-Timing-Dependent Plasticity" with modulated rewards This is super fun...

447,978 görüntüleme • 11 ay önce •via X (Twitter)

87 Yorum

echo.hive profil fotoğrafı
echo.hive11 ay önce

Spiking neural network from scratch source code:

Keegan Owsley profil fotoğrafı
Keegan Owsley11 ay önce

I dont want to discourage you but if it's just single digit addition then the model could just return 9 every time and achieve 10% accuracy

echo.hive profil fotoğrafı
echo.hive11 ay önce

Yeah, I thought if the same thing but for a long time it was stuck only at 0% so I was happy to achieve even just what would amount to luck :) Although I think it is learning, as little later in the training it again collapses to 0%

echo.hive profil fotoğrafı
echo.hive11 ay önce

Running a genetic hyper parameter optimization on top of it. it looks promising so far

Zvonimir Fras profil fotoğrafı
Zvonimir Fras11 ay önce

5% accuracy 😂 Better than trying to win the lottery 🤷

echo.hive profil fotoğrafı
echo.hive11 ay önce

It is pretty low accuracy. But these things are hard :) Learning about them is the real win. There are torch extension python libraries which I will explore too.

Zvonimir Fras profil fotoğrafı
Zvonimir Fras11 ay önce

wasn't a diss on you if that's how it came across, just poking fun at the neural network :) when I set up my first nn training (c++) program (with backprop) I wanted to see if it could learn addition from a few example. It did from a few examples, but up to 10 🙃 I'd say what you're doing is more interesting, and by far prettier.

echo.hive profil fotoğrafı
echo.hive11 ay önce

I didn’t take it that way at all :)

jason profil fotoğrafı
jason11 ay önce

Did it a little different, but on a similar path.

echo.hive profil fotoğrafı
echo.hive11 ay önce

Pretty cool!

Chris Romano profil fotoğrafı
Chris Romano11 ay önce

omg you actually did it

echo.hive profil fotoğrafı
echo.hive11 ay önce

Thank you but it doesn’t really learn that well yet :)

Bastiaan Veelo profil fotoğrafı
Bastiaan Veelo11 ay önce

@CdotRomano I don’t think this was meant as a compliment…

Chris Romano profil fotoğrafı
Chris Romano11 ay önce

@hive_echo it was! my article jokes that NN/addition is a boring idea, but here echo hive has cleverly found an interesting approach to it, making me look a fool.

Bastiaan Veelo profil fotoğrafı
Bastiaan Veelo11 ay önce

@hive_echo In that case I am the fool as well, because I can't tell whether you guys are serious or joking!

echo.hive profil fotoğrafı
echo.hive11 ay önce

@CdotRomano 🙂

echo.hive profil fotoğrafı
echo.hive11 ay önce

Here is the updated versions with genetic hyper parameter optimization which achieves %8 accuracy

Joseph Suarez 🐡 profil fotoğrafı
Joseph Suarez 🐡11 ay önce

Nice UI. What is it written in?

echo.hive profil fotoğrafı
echo.hive11 ay önce

Thank you. In python with numpy

Joseph Suarez 🐡 profil fotoğrafı
Joseph Suarez 🐡11 ay önce

... What? Did you write your own text raster to numpy arrays or something?

echo.hive profil fotoğrafı
echo.hive11 ay önce

Numbers are represented by population coding as arrays like this All elements shown at once and not sequentially

pixlflip profil fotoğrafı
pixlflip11 ay önce

Just reverse it for 95% accuracy

echo.hive profil fotoğrafı
echo.hive11 ay önce

😆

echo.hive profil fotoğrafı
echo.hive11 ay önce

Here is another biology inspired navigation system, continuous attractor network with motor neurons learns to navigate using reward-modulated hebbian plasticity:

jason profil fotoğrafı
jason11 ay önce

I built a couple of these. What do you mean by no back propagation, I understand in the traditional sense it’s not the same, but you still need to update the weights that control the firing

echo.hive profil fotoğrafı
echo.hive11 ay önce

I am a bit vague on this but there is a reward mechanism (dopamine) which strengthens connections when correct answer is fired. It is more similar to RL in that sense. There is no signal that goes back and no gradient descent etc

Lore Soong profil fotoğrafı
Lore Soong11 ay önce

@jasonadrury You need to check which connections fire at the same or in closest timeframe. You can strengthen or weaken these connections locally or globally or even backtrack through them, just use time as the path to backtrack when an output fires.

echo.hive profil fotoğrafı
echo.hive11 ay önce

@jasonadrury It is doing this via spoke timing dependency. If a then b then strengthen. If b before a then weaken

Lore Soong profil fotoğrafı
Lore Soong11 ay önce

@jasonadrury Can it do loops?

echo.hive profil fotoğrafı
echo.hive11 ay önce

@jasonadrury Not sure if I understand

Lore Soong profil fotoğrafı
Lore Soong11 ay önce

@jasonadrury Can the connections form a circle instead of only being only one directional?

echo.hive profil fotoğrafı
echo.hive11 ay önce

@jasonadrury I believe they could, take a look at hopfield and continuous attractor networks

Vikas Tiwari profil fotoğrafı
Vikas Tiwari11 ay önce

5 percent accuracy is. well its a start. Doing STDP without backprop is choosing the hardest difficulty setting. Mad respect for even trying it.

echo.hive profil fotoğrafı
echo.hive11 ay önce

@productpilotbb Thank you. Appreciate it. I made some improvements and got it to 10% I think. Will tune the hyper Params now and see where it goes. But it seems this is the limits of the current setup without changing it in a big way.

Cheng Lou profil fotoğrafı
Cheng Lou11 ay önce

Would a sufficiently smart and large spiking network rediscover & store backprop weights? Considering backprop is just regular matrices in most frameworks

echo.hive profil fotoğrafı
echo.hive11 ay önce

I am not sure if backprop weights would be important for spiking networks They see important in regular NNs because they all add up to a number perhaps But in SNN spike timing etc are more important and weights only serve a purpose to let different neurons better connect with others. I don’t think they are used like an accumulating number so to speak

Nathan Odle profil fotoğrafı
Nathan Odle11 ay önce

I played with SNNs and R-STPD. I couldn’t beat backprop. It’s brutally effective. I did get a ‘spectral’ SNN and R-STPD running in the frequency domain with FFTs which was faster than a naive SNN implementation. No faster than a reasonable truncation though.

echo.hive profil fotoğrafı
echo.hive11 ay önce

I am also realizing that they are very difficult but it is a learning experience for me and a fun exploration :)

WhatLiesBeneath profil fotoğrafı
WhatLiesBeneath11 ay önce

exactly - ai needs the right environments (complex, survivable, incentivised) - then I believe it can start with a single dividing cell and learn all it needs

echo.hive profil fotoğrafı
echo.hive11 ay önce

Perhaps. We don’t know the exact mechanisms but exploring is fun. In theory it should just learn on its own and evolve etc as you said

echo.hive profil fotoğrafı
echo.hive11 ay önce

Here is another bio inspired network which learns to avoid obstacles and guide itself toward food

Memebu profil fotoğrafı
Memebu11 ay önce

That's so pretty! What did you use to visualize?

echo.hive profil fotoğrafı
echo.hive11 ay önce

Thank you. I used pygame

Folding_Napkins profil fotoğrafı
Folding_Napkins11 ay önce

If genetic algorithms and learning interest you, check out Creatures:

Intelligentia artificialis profil fotoğrafı
Intelligentia artificialis11 ay önce

Smart

echo.hive profil fotoğrafı
echo.hive11 ay önce

Thank you

Orb profil fotoğrafı
Orb11 ay önce

Am missing something here? What's the point of getting 5% accuracy for single digit addition? What am i missing?

echo.hive profil fotoğrafı
echo.hive11 ay önce

It is an experiment I did

echo.hive profil fotoğrafı
echo.hive11 ay önce

I am not bothered per se but it is not very good at all. It is fun for me because my goal is to learn how all this stuff works

Hannes Lehmann · local explainable AI profil fotoğrafı
Hannes Lehmann · local explainable AI11 ay önce

Cool! I created also a SNN with not only STDP but a lot more. Was missing a visualization and might look at yours. My agent learned to find food (rewarded with dopamine) and did unit test where I poisened my neurons (like drunk) - some fun experiments

echo.hive profil fotoğrafı
echo.hive11 ay önce

Very cool. I want to do navigation experiments too

Alex profil fotoğrafı
Alex11 ay önce

That’s how real intelligence starts — elegant chaos turning into math.

echo.hive profil fotoğrafı
echo.hive11 ay önce

Well said!

Alex profil fotoğrafı
Alex11 ay önce

💕

~Ian~ profil fotoğrafı
~Ian~11 ay önce

This is the future!!

echo.hive profil fotoğrafı
echo.hive11 ay önce

I hope spiking neural nets won’t just remain an under explored area of AI research

⚡️John Andrew Owen ⚡️ profil fotoğrafı
⚡️John Andrew Owen ⚡️11 ay önce

extremely based. i wrote a recurrent NN based on STDP. had trouble with it getting stuck in a weird state and sending parameters to -inf or +inf

echo.hive profil fotoğrafı
echo.hive11 ay önce

They are not easy to train so far, that is for sure :)

unrenormalizable profil fotoğrafı
unrenormalizable11 ay önce

so very cool!

echo.hive profil fotoğrafı
echo.hive11 ay önce

Thank you!

mkz profil fotoğrafı
mkz11 ay önce

Kind of always felt the need of approaching ANNs from a more computational neuroscience POV. Feels like those are areas that should very naturally interact between themselves but afaik there's little work on that.

echo.hive profil fotoğrafı
echo.hive11 ay önce

I agree with you and that makes it more fun and rewarding to experiment with these ideas IMO

mkz profil fotoğrafı
mkz11 ay önce

yup, totally. very very interesting works, btw. don't totally understand the architecture you're using (I've thought about something mixing a hopfield network with a self-organizing map + spiking NNs at some point, and one thing which occurred to me seeing this work is //

mkz profil fotoğrafı
mkz11 ay önce

considering to take into account the variety of neurotransmitters there are. Dopamine seems like the best one to start with; but I'd very much like to see what happens if we were to introduce some other NTs. I feel the most natural ones to follow would be GABA and Glutamate.

mkz profil fotoğrafı
mkz11 ay önce

(ever tried something similar?)

echo.hive profil fotoğrafı
echo.hive11 ay önce

You and I have very similar thoughts and ideas on this. I do want to explore some kind of hopfield like memory or otherwise, along with multiple neurotransmitter analogs but I also want to get back to basics and understand some fundamental things better instead of keep adding things on top you know :)

mkz profil fotoğrafı
mkz11 ay önce

Yes :) I'd say 'learning advanced math & physics just because' already resonates strongly with my profile as a researcher XD my gh if appropriate Nothing fancy there, but some stuff might provide some insights, idk

mkz profil fotoğrafı
mkz11 ay önce

like, cellular automata on graphs with feedbackish interactions bt topology n dynamics -- which I thought to be a first step towards what I called at that time 'SSNNs', similarity spiking neural networks

WoodenScalpel profil fotoğrafı
WoodenScalpel11 ay önce

Love the concept, but it looks like you have ~20 outputs which makes 5% success rate equal to random.

echo.hive profil fotoğrafı
echo.hive11 ay önce

i actually got it to 7-8% also it starts at lower than 5% and works it way up then sometimes collapse to below 5% all of which leads me to believe there is glimmers of learning taking place

V A r G R profil fotoğrafı
V A r G R11 ay önce

Try it on markov chains……

echo.hive profil fotoğrafı
echo.hive11 ay önce

It had been on my mind to explore markov chains

ue2ber profil fotoğrafı
ue2ber11 ay önce

Dopamine kick addicted AIs, that's the machines we want now? :D Amazing work, though!

echo.hive profil fotoğrafı
echo.hive11 ay önce

Thank you 😊

Numan profil fotoğrafı
Numan8 ay önce

Very cool, great work!

echo.hive profil fotoğrafı
echo.hive8 ay önce

Thank you!

Jintu Kumar Das profil fotoğrafı
Jintu Kumar Das11 ay önce

I'm picturing the network trying to learn and totally bombing, just like real life! That 5% accuracy is totally me in elementary school with math!

echo.hive profil fotoğrafı
echo.hive11 ay önce

🙂

zodomo.gwei (🌍,💻) profil fotoğrafı
zodomo.gwei (🌍,💻)11 ay önce

Where does one learn about this stuff

echo.hive profil fotoğrafı
echo.hive11 ay önce

Just search for spiking neural networks. You will find a lot of info about it both from neuroscience perspective and machine learning perspective

anny (formerly Midas) profil fotoğrafı
anny (formerly Midas)11 ay önce

Looks so damn cool! Btw what are the use cases of these

echo.hive profil fotoğrafı
echo.hive11 ay önce

Thank you As far as I know there aren’t any or many use cases as they don’t work well or are not as scalable. But if someone were to get them working right then their use case could be everything :) This is more close to how brains actually learn

anny (formerly Midas) profil fotoğrafı
anny (formerly Midas)11 ay önce

Okk. Cool project. What is the tech stack used for it?

TheGoodGru profil fotoğrafı
TheGoodGru11 ay önce

Whoa, that's seriously cool! 🤯 Learning addition with just spikes and rewards is wild. Can't wait to see that accuracy climb!

Keivan profil fotoğrafı
Keivan11 ay önce

omggggg this has been on my weekend side project list for about 6 weeks, so sick!!

echo.hive profil fotoğrafı
echo.hive11 ay önce

Thank you. You should do it!

Keivan profil fotoğrafı
Keivan11 ay önce

startup lyfe - I'm pretty sure with the right amount of effort, people can build decent companies around SNN's

Benzer Videolar