Architectures: vision, sequences and meaning
The basic neuron is the same everywhere; what changes is how neurons are wired together. The wiring, called the architecture, builds in assumptions that suit the data.
Convolutional neural networks (CNNs): seeing
Images have structure: nearby pixels relate to each other, and a cat is a cat whether it's on the left or right of the photo.
- A convolution slides a small filter (say 3×3 pixels) across the image, detecting one pattern, such as a vertical edge, everywhere it appears. The same weights are reused at every position, which saves enormous numbers of parameters.
- Pooling shrinks the image, keeping the strongest signals.
- Stacking layers detects edges → textures → parts → objects.
CNNs drove the 2012 breakthrough and still power much of medical imaging, phone cameras, quality inspection and self-driving perception (alongside newer vision transformers).
Recurrent neural networks (RNNs): sequences
Text, speech and time series arrive in order. An RNN reads one item at a time, keeping a hidden state that carries memory forward. LSTMs and GRUs added gates to remember things longer.
RNNs had two big problems: they forget information from far back in long sequences, and they must process items one at a time, which is slow to train. The transformer (next module) solved both and replaced RNNs for most language tasks.
Embeddings: meaning as geometry
Computers need numbers, not words. An embedding represents a word, sentence, image or product as a list of numbers (a vector), learned so that similar things end up near each other.
- In a good word embedding, king and queen are close; Paris is to France roughly as Tokyo is to Japan.
- Embeddings let you measure similarity with simple math (the angle between vectors, called cosine similarity).
- They power search, recommendations, duplicate detection and the retrieval step in RAG systems (Module 6).
Transfer learning: standing on shoulders
Training a large model from scratch needs huge data and compute. Transfer learning starts from a model pre-trained on a big general dataset, then fine-tunes it on your smaller, specific dataset. A model pre-trained on millions of photos can learn to spot defects in your factory's parts from a few hundred examples. Foundation models (Module 5) take this idea to the extreme: one giant pre-trained model adapted to thousands of tasks.
Check your understanding
Why are convolutional networks efficient for images?
In a good embedding space, items that are similar in meaning are: