Understanding Neural Network, Visually
visualrambling.space
visualrambling.space
I hope make more of these, I'd love to see a transformer presented more clearly.
- make a visualization of the article above and it would be the biggest aha moment in tech
Conceptually neural networks are quite simple. You can think of each neural net as a daisy chain of functions that can be efficiently tuned to fulfill some objective via backpropagation.
Their effectiveness (in the dimensions we care about) are more a consequence of the explosion of compute and data that occured in the 2010s.
In my view, every hyped architecture was what yielded the best accuracy given the compute resources available at the time. It's not a given that these architectures are the most optimal and we certainly don't always fully understand why they work. Most of the innovations in this space over the past 15 years have come from private companies that have lacked a strong research focus but are resource rich (endless compute and data capacity).
If you want to understand neural networks, keep going.
It completely misses the mark on what it means to 'weight' (linearly transform), bias (affine transform) and then non-linearly transform (i.e, 'collect') points into bins
It doesn't match the pictures in your head, but it nevertheless does present a mental representation the author (and presumably some readers) find useful.
Instead of nitpicking, perhaps pointing to a better visualization (like maybe this video: https://www.youtube.com/watch?v=ChfEO8l-fas) could help others learn. Otherwise it's just frustrating to read comments like this.
It's a completely avoidable experience when the community has a more generally positive attitude. All it takes is a little different phrasing of exactly the same feedback, but with a positive emotional and encouraging tone.
For example, instead of writing:
> Nice visuals, but misses the mark. Neural networks transform vector spaces, and collect points into bins. This visualization shows the structure of the computation. This is akin to displaying a Matrix vector multiplication in Wx + b notation, except W,x,and b have more exciting displays.
> It completely misses the mark on what it means to 'weight' (linearly transform), bias (affine transform) and then non-linearly transform (i.e, 'collect') points into bins
Here's more or less the same comment but with a completely different attitude:
> Oh wow, that's cool! That must have been a ton of work to put together. That got me thinking as to how it's akin to Matrix vector multiplication in Wx + b notation, except W,x,and b have more exciting displays.
> An idea I am wondering about but don't know how to solve is what it means to 'weight' (linearly transform), bias (affine transform) and then non-linearly transform (i.e, 'collect') points into bins.
> Here's some other links that are related and cool: ...
> Cheers, nice work!
Let's not crap on people's work so readily. After all, we have no idea about who the author is. Maybe it's a teenager or a university student and this was their first project. It's really a jarring and demoralizing experience to have your first visualization immediately crapped on.
A large part of the problem is a cultural mismatch I think. People have a tendency to interpret even entirely valid criticism as negativity. One of the nice things about a more analytical environment (ex STEM research labs IRL, HN on the net) is that you don't need to worry about that so much. The expectation is that things will be critiqued - that this is a good thing that helps further personal growth and intellectual endeavors more generally.
I'll grant the original comment could have been worded a bit more gently without losing the intended meaning. That said, the alternate example you gave there changes the meaning, sounds rather sycophantic, and honestly reads like corpo-posi-speak or LLM prose to me.
Regarding the original criticism. Notice that the title implies this to be an illustration of how a network does what it does. And the visualization flows through internal to output cells. Yet a number of key concepts aren't explained at all. Vaguely analogous to throwing up some ASM on a PPT slide and remarking "so you see, that's how it works". There's a matmul there, but _why_? What's the _point_ of an activation function? Unless I missed something the visualization doesn't even mention nonlinearity despite it being an essential property.
It doesn't tell you that each neuron calculates a dot product of the input and neuron weights and that the bias is simply added rather than a threshold, nor does it tell you that there is an activation function that acts as a differentiable threshold.
Without this critical information there is no easy way to explain how to train a neural network since you can't use gradient descent anymore. You're forced to use evolutionary algorithms for non-differentiable networks.
I wanted to get a feel for what specific neurons are actually looking at, and how disabling/enabling them affects the final output.
It runs a little MNIST model in the browser, but lets you turn pixels and neurons on/off, and examine the weight and activation patterns of each neuron and how it contributes to each prediction. Helped me get more of an intuitive sense of what is going on inside.
> You determine the weights via brute force. Simply running a large amount of data where you have the input as well as the correct output
Brute force just means guessing all possible combinations. A dataset containing most human knowledge is about as brute force as you can get.I'm fairly sure that Alpha Zero data is generated by Alpha Zero. But it's not an LLM.
The sampling stage of Evolution Strategies at least bears a resemblance but even that is still a strategic gradient descent algorithm. Meanwhile backprop is about as far from brute force as you can get.
http://www.ai-junkie.com/ann/evolved/nnt1.html
This is old. Perhaps late 90s or early 00. The top domain still uses Flash. But the same OCR example is used to teach the concept. For some reason, that site made it all click for me.
Don't think it's moire effect but yeah looking at the pattern
That's cool, rendering shades in the old days
Man those graphics are so good damn
However there are two fundamental problems to computational predictions. The first one obviously is accuracy. A model is a compressed memorization of everything observed so far; a prediction with it is just projecting into the future the observed patterns. In a chaotic system, that goes only so far; the most regular, predictable patterns are obvious to everybody and give less return, and the chaotic system states where prediction would be more valuable are the less reliable. You cannot build a perfect oracle that would fix that.
The second problem is more insidious. Even if you were able to build a perfect oracle, acting on its predictions would become part of the system itself. That would change the outcomes, making the system behave in a different way as it was trained, and thus less reliable. If several people do it at the same time, there's no way to retrain the model to take into account the new behaviour.
There's the possibility (but not a guarantee) to reach a fixed point, that a Nash equilibrium would appear where such system becomes into a stable cycle, but that's not likely in a changing environment where everybody tries to outdo everyone else.
That also makes sense of the common perception that a model feels “decayed” right before a new release. It’s probably not that the model is getting worse, but that expectations and use cases have moved on, people push it into new regimes, and feedback loops expose mismatches between current tasks and what it was originally tuned for.
In that light, releasing a new model isn’t just about incremental improvements in architecture or scale; it’s also a reset against drift, reflexivity, and a changing world. Prediction and performance don’t disappear, but they’re transient, bounded by how long the underlying assumptions remain valid.
That means all the AI companies that "retire" a model is not because of their new better model only, but also because of decay?
PS. I clean wrote above with AI, (not native englishmen)
The ‘secret sauce’ in a deep network is the hidden layer with a non-linear activation function. Without that you could simplify all the layers to a linear model.
Where it ends "how do we calculate the weights ?" is fairly simple.
Start completely randomly and compare output to known truth. When it's incorrect, you beat the model up pretty badly and repeat again. Eventually you get the correct answer pretty consistently.
... and by "beat it up" I mean tweak the weights - totally randomly will work but will take a long time (brute force), so we add a bit of intelligence to see which direction to tweak via some algorithms (backpropagation, gradient descent).