AI for Everyone: Architectures and Artificial Brains (Part 3)

Neural network architectures explained simply
A journey into the artificial brain: how neural networks work
date: · 5 min
author: Matteo
series: AI for Everyone/ part 3/6

How artificial intelligence really works, explained without the maths.

  1. AI for Everyone: The Guide You Wish You’d Had Sooner (Part 1)
  2. AI for Everyone: How Machines Learn (Part 2)
  3. AI for Everyone: Architectures and Artificial Brains (Part 3)
  4. AI for Everyone: Advanced Techniques Made Simple (Part 4)
  5. AI for Everyone: Optimization and Putting Models on a Diet (Part 5)
  6. AI for Everyone: How Do We Know If an AI Really Works? (Part 6)
the whole guide >

“So does AI have a brain, then?” That’s the question one of my fellow diners asked me (if you don’t know what I’m talking about, read part one). And you know what? It’s not as silly a question as it might seem. In fact, it takes us straight to the heart of how modern AI systems actually work.

Neural Networks: The Great Digital Orchestra

Imagine a symphony orchestra. Each musician (like a neuron) knows how to play their own instrument, but it’s only when they all play together, following a score and a conductor, that they create something magical. Neural networks work in a similar way: they’re made up of lots of artificial “neurons” which, just like musicians, work together to create something greater than the sum of its parts.

I was trying to explain this to my friend Francesco, who’s a chef. “It’s like your kitchen,” I told him. “Every cook has a specific job - someone handles the pasta courses, someone the mains, someone the desserts. But it’s only when you all work together, passing information along and coordinating, that you manage to serve an entire menu”.

The Attention Mechanism: Focusing on What Matters

The attention mechanism isn’t something outside the network, but a gear working inside it, and it’s the heart of the Transformer we talked about in part one. You know when you’re at a crowded party but you still manage to focus on your conversation with one specific person, even though there’s a ton of noise around you? Well, the attention mechanism works more or less like that.

It’s like when your dog manages to completely ignore your commands but can hear the rustle of the kibble bag from three rooms away. It knows exactly what to pay attention to! Language models do the same thing: for each word, they decide how much “weight” to give each of the other words in the text and focus on the most relevant ones. That’s how they figure out what “it” refers to in the broken vase sentence.

Embeddings: The Map of Meaning

Embeddings are perhaps one of the most fascinating (and hardest to explain) things in modern AI. Think of a huge library where every book has specific coordinates in space, and similar books are close to each other. Embeddings do something similar with words and concepts.

It’s as if we took all the words in the dictionary and arranged them in a multidimensional space where “cat” is close to “feline” but far from “carburetor”. When the AI needs to understand the meaning of something, it consults this “map” to find relationships and similarities.

Foundation Models: The Giants We Build On

Foundation Models are a bit like skyscrapers: huge structures that serve as a base for building other things. GPT, BERT, and other similar models are like skyscrapers of knowledge on which we can build specific applications.

It’s like learning your native language as a child: once you have the basics of the language (your personal “foundation model”), you can specialize in anything, from poetry to quantum physics. In the same way, these models provide a base of language understanding that can be specialized for specific tasks.

Diffusion Models: The Digital Artists

And then there are Diffusion Models, the true artists of the AI world. If you’ve ever used Midjourney, Stable Diffusion or DALL-E, you’ve almost certainly interacted with a Diffusion Model. The way they work is fascinating: during training, millions of images get “dirtied” little by little with noise, like the static on an old TV, until nothing but noise is left. The model learns to walk the path in reverse: removing the noise one step at a time.

When you ask it for an image, it starts from a screen of pure noise and cleans it up step by step, guided by your description. It’s like watching a photo slowly emerge from the fog, or a sculptor chipping away the excess marble until the statue appears. And note: it doesn’t paste together pieces of existing images like a collage. Every image is generated from scratch, starting from noise.

How It All Fits Together: The AI Ecosystem

All these components - neural networks, attention mechanisms, embeddings, foundation models and diffusion models - work together like the different departments of a well-organized company. Each one has its specific role, but it’s their collaboration that makes the magic of modern AI possible.

To get back to the question from the opening: no, AI doesn’t have a brain like ours. It has something different, something unique. It’s neither better nor worse than the human brain - it’s simply different. And maybe it’s exactly this difference that makes it so interesting and useful.

Conclusion: The Hidden Complexity

The real magic of modern AI isn’t in the individual components, but in the way they work together to create systems that can understand language, generate images, and solve complex problems. It’s like a city: from a distance it looks like a single entity, but up close you discover it’s made of thousands of different elements working together in perfect harmony.

In the next article we’ll talk about the techniques we can use to get better answers out of these models, from Chain of Thought to Few-shot Learning. But that’s another story, which I’ll tell you next time.

P.S. If you’ve concluded that AI is “like a brain made of LEGO”, maybe that’s not such a bad definition after all!


Useful resources

Copied