Skip navigation
Spiking Neural Network from scratch achieves 8% accuracy. no backpropagation or SGD
0:00 / 0:43

Spiking Neural Network from scratch achieves 8% accuracy. no backpropagation or SGD

echo.hive

@hive_echo14K followers

Visit on X
948 likesDownloadOriginal post

225,852 views

Spiking Neural Network from scratch achieves 8% accuracy. no backpropagation or SGD I created a genetic hyper parameter optimizer and it now, on average, can get 8% accuracy which is ~3% above chance Link to source code with a detailed video and markdown explanations in comment it also usually starts lower than 5% and slowly improves then eventually can start dipping below 5%, all of which leads me to believe there is glimmers of learning taking place. sometims it is stabel around 7-8-9% for a long time there is no backpropagation or SGD. it learns via STDP (spike timing dependent plasticity) and a reward mechanism each example is presented n many times (500 in this case) which produces spike train which leads to eligibility list, at the end of a turn based on if the answer was correct or not we adjust the weights using the reward as a multiplier spike timing keeps track of the sequence of neuron firings and which ones were more likely to have lead to the correct answer let me know what you think

63 Comments

Comments from the original post on X (Twitter)

  • Hackworth's profile picture

    @HackworthAI

    Underexplored type of model, compute is more efficient and cheaper with neuromorphic chips. Good for many types of event-driven "classification" type prediction that regular DNNs have trouble with.

    31 likes

  • echo.hive's profile picture

    @hive_echo

    Source code and explanation video for Spiking Neural network:

    22 likes

  • echo.hive's profile picture

    @hive_echo

    Here is another bio inspired network with continuous attractor network with motor neurons which learns to avoid obstacles and guide itself toward food

    5 likes

  • maurice tpunkt's profile picture

    @mauricetpunkt

    in your latest video, it looks like your NN learned to predict the majority class (the number 10) this is a good start, but it doesn't look like your NN learned addition... it's predicting 10 almost every time.

    5 likes

  • echo.hive's profile picture

    @hive_echo

    Hmm, I just noticed that. I should pay better attention to the outputs. I was mostly observing the aggregate metrics This could be a glitch in the UI possibly. I will look into it. Thank you for mentioning In either case, this is an experiment to learn more about these networks. And this has been a learning experience too just now :)

  • Md Rejaullah's profile picture

    @RejaullahmdMd

    Can you share from which research paper you are inspired?

    4 likes

  • echo.hive's profile picture

    @hive_echo

    Not any particular paper. just the ideas I learned from my neuroscience course and a lot of back and forth with AI :)

    11 likes

  • echo.hive's profile picture

    @hive_echo

    Here is another experiment of biologically inspired self-learning agents

    4 likes

  • NickyP's profile picture

    @NickPassig

    This is excellent I have been having fun testing similar genetic evolution + nn

    4 likes

  • echo.hive's profile picture

    @hive_echo

    This looks fun! Was this NEAT or your custom NN?

    1 like

  • NickyP's profile picture

    @NickPassig

    Custom FNN, fixed multilayer, raw weight optimization, no network topology evolution Tinkering with input/output nodes has been a lot of fun along w/ elitism, mutation, and crossover I built this to test a hybrid decision engine for videogame objects and can't stop

    1 like

  • echo.hive's profile picture

    @hive_echo

    Very cool! On a side note I had been thinking about exploring evolving the network itself. Haven’t yet found the time

    1 like

  • echo.hive's profile picture

    @hive_echo

    Wish you the best with your explorations!

    1 like

  • null's profile picture

    @segfaulthaunter

    you got to tell me what UI is that i NEED IT pls

    3 likes

  • echo.hive's profile picture

    @hive_echo

    It is just pygame :)

    3 likes

  • null's profile picture

    @segfaulthaunter

    if you share one day i would love you

    1 like

  • echo.hive's profile picture

    @hive_echo

    It is at my Patreon. But it is for paying members tho. It is my way to be able to pay the bills while being able to learn and experiment. I hope you understand.

    6 likes

  • null's profile picture

    @segfaulthaunter

    link?

    1 like

  • TelepathicPug's profile picture

    @TelepathicPug

    Love the interface.

    3 likes

  • echo.hive's profile picture

    @hive_echo

    Thank you

    2 likes