Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network compression #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Network compression #9

wants to merge 1 commit into from

Conversation

sdesalas
Copy link
Owner

@sdesalas sdesalas commented Sep 13, 2024

Problem

Node.js can handle neural network sizes of 100K+ neurons with fairly minimal CPU/memory consumption on most laptops.

Problem is that most browsers can only display around 5-10K using @sdesalas/3d-force-graph via Canvas/WebGL. We need a way to be able to visualize a larger network.

This can be accomplished in one of two ways:

  1. Display more neurons: Modify the underlying 3D force-graph rendering library so that it can show more neurons firing simultaneously. This can probably accomplish an increase of 1 order of magnitude (up to 50-100K optimistically).
  2. Compress the network: Find a way to "shrink" the network down to a smaller subset of its neurons. While retaining the same shape. This is quite a tricky task, since each neuron has a list of onward connections to other neurons that determine the shape of the network. When we remove some of those connections, even if done at random, the network will lose its shape.

While approach No 1 is definitely worth dedicating some time and energy to. There will always be a limit to the number of neurons that can be displayed simultaneously on a screen via Canvas/WebGL, which will in turn limit the number of neurons that can run on the 'backend' to a smaller number than could otherwise be acomplished.

Approach No 2 ensures that the 'backend' or server-side of the network can be increased to its theoretical limit (probably 100M neurons) while still making the UI 'adaptive' so it can display the whole network and its the neurons firing regardless of how big the underlying network is.

@sdesalas sdesalas changed the title Shrink network down to size Network compression Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant