DeepLLM Quiz
Neural Network Architectures

Image data and why networks for pictures are built differently

10 questions on pixels and channels, the weight explosion of fully connected layers, locality, hierarchy, and the tasks that computer vision covers.

  • 10 questions
  • Stopwatch
  • Instant feedback

Shown publicly with your score. Don’t use your full real name.

Sample questions

Play now ↑

Answers stay hidden. Start the quiz to play them.

  1. Sample 1

    A colour image of 1,000 by 1,000 pixels feeds a first layer of 1,000 fully connected hidden units. About how many weights does that layer have?

    • About 3 million
    • About 3 billion
    • About 1,000

How it works

  • One question per screen. An answer is final once sent.
  • You see right away whether you were right, with a short explanation.
  • The stopwatch runs: on equal scores, the faster player ranks first.
  • Only your best attempt counts, so replaying is never risky.

About this quiz

A phone camera takes a photograph with twelve million pixels, and each pixel has three colour values. Hand all of those numbers to an ordinary fully connected network and the first layer alone would need billions of weights, most of them wasted on connections between pixels that have nothing to do with each other. The network would also have no idea that a pixel's neighbours matter more than its distant cousins. Everything it knows about pictures would have to be learned from examples, at huge cost. Convolutional networks were designed to avoid exactly this waste.

This quiz sets out the case for them. It starts with what an image is: a grid of pixels with one or three channels, extended to a stack of grids for video or for three-dimensional scans. It then asks why treating the numbers as an unstructured list is such a bad idea, using a simple experiment, shuffling the pixels, and a simple calculation, counting the weights of the first layer. You will see why nearby pixels carry related information, and how that observation becomes a source of prior knowledge.

The quiz then names four ideas that a designer can build into a network for pictures: hierarchy, locality, equivariance and invariance. It asks what each means in the context of recognising a face, where eyes sit inside faces and edges inside eyes. And it surveys the tasks that computer vision covers beyond naming a picture's content, from finding and outlining objects to filling in missing regions and sharpening a blurred image, because the architecture has to serve all of them.

Common misunderstandings are worth airing. People often think that the large size of images is the main problem, when the larger issue is that the structure is ignored. They assume the model must be told what features to look for, whereas the whole point of hierarchy is that the details of the features are learned. And they imagine that this approach is special to pictures, when the same reasoning applies to any data with local structure, including sequences. The reasoning here is a template for designing models in any field. Start by asking what structure the data has, whether neighbours matter, whether the same pattern can occur in different places, and which parts of the answer should or should not change when the input is shifted. A network that bakes in correct answers to such questions needs far less data and generalises better, and one that bakes in wrong answers can fail in confusing ways. Images are simply the clearest case in which the questions have clean answers.

The quiz suits beginners about to learn how convolutional networks work, and anyone who has used an image model and wondered why it looks so different from the networks in introductory courses. There are 10 questions, each with an explanation, and it takes about four minutes.

Questions and answers

›How long does the quiz take?

About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. After each answer an explanation shows why it is right or wrong.

›Do I need to know about neural networks already?

A little. You should know that a network has layers of units connected by weights and that training adjusts the weights. The questions explain every image-specific term they use, so no background in computer vision is needed.

›What is an image to a computer?

It is a rectangular array of pixels. Each pixel in a grey-scale image has one intensity value, while a colour image has three values per pixel, for red, green and blue, called channels. Intensities are stored with limited precision, often as whole numbers from zero to a few hundred. Scans of the body use three-dimensional grids of cells, and videos stack frames through time.

›Why can't a standard network handle images well?

Two reasons. The number of weights explodes with the number of pixels, which makes the model huge and hungry for data. And an unstructured network ignores the relationships between pixels, so it must learn from scratch that nearby values go together and that an object is the same object wherever it appears. Both problems waste data and capacity.

›What does it mean that images have local structure?

In a natural image, two nearby pixels are much more likely to have similar colours and intensities than two pixels far apart. If you scramble the pixels, the result no longer looks like a picture, and if you draw each pixel at random there is practically no chance of getting anything that does. This regularity is strong prior knowledge that a network can exploit.

›What are hierarchy, locality, equivariance and invariance?

Hierarchy means that complex structures are made of simpler ones, such as faces of eyes and eyes of edges. Locality means that the simplest features can be detected from a small region. Equivariance means that moving a feature moves its detection. Invariance means that some answers, such as a label for the whole picture, should not depend on position.

›Which tasks does computer vision cover?

Classification of a whole image, detection of objects together with their positions, segmentation of every pixel into a class, caption generation, synthesis of new images, inpainting of missing regions, transfer of artistic style, increase of resolution, prediction of depth and reconstruction of three-dimensional scenes. Convolutional architectures have been applied to all of them.

›Does a convolutional network hand-code what to look for?

No. The design builds in the general concept of a hierarchy of local feature detectors, but the specific features at each level are learned from the data, with the whole system trained end to end. That combination of a built-in structure with learned details is what makes the approach so effective.

More quizzes