Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was recently struggling with the best way to randomly construct a well-connected, recurrent topology of neurons until I encountered Percolation theory.

There is a basic natural log scaling rule that essentially guarantees that you will have a well-connected topology (even with random connections) as long as you ensure a minimum # of connections are assigned to each element.

The required fanout at each order of magnitude network size goes something like:

  10:              ~3 connections
  100:             ~5 connections
  1,000:           ~7 connections
  10,000:          ~10 connections
  100,000:         ~12 connections
  1,000,000:       ~14 connections 
  100,000,000,000: ~26 connections
I've been able to avoid a lot of complicated code by leveraging this.



What do you mean by well-connected topology? If you mean that you can reach every neuron from any neuron then the number of connections you need is asymptotically n log n / 2 (not up to a constant factor or anything, just n log n / 2 on the nose, it's a sharp threshold), see [0]. In general when percolation is done on just n nodes without extra structure, it's called the Erdős–Rényi model [0], and most mathematicians even just call this "the" random graph model.

[0] https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_....



Ah but that's a bit different. The giant component doesn't connect all the neurons, only a fraction. The wiki page doesn't say this but if you have c * n / 2 edges then the fraction of neurons in the giant component is 1 + W(-c * exp(-c))/c where W is the Lambert W function [0], also called the product logarithm. As c tends to infinity this fraction tends to 1 but it's never 1.

[0] https://en.wikipedia.org/wiki/Lambert_W_function




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: