← Neural NetworksToolsInVisionLearning Center
Convolutional Neural Networks · Lesson 44

Local Connections and Shared Weights

Learn how CNNs reduce parameters by examining local regions and reusing filters.

Watch the lesson

Local Connections and Shared Weights explained visually

2:15

Use a reusable visual detector to understand locality and weight sharing.

Lesson overview

What you will learn

Follow filters, pooling, flattening, and classification through complete CNN examples.

  1. TOO MANY CONNECTIONS
  2. LOCAL REGIONS
  3. ONE REUSABLE FILTER
  4. WEIGHT SHARING
01

TOO MANY CONNECTIONS

Fully connected image layers can require an impractical number of parameters.

02

LOCAL REGIONS

Local connections let each convolution examine a compact neighborhood of pixels.

03

ONE REUSABLE FILTER

Weight sharing reuses one filter at every image position instead of learning separate detectors.

04

WEIGHT SHARING

Locality and sharing reduce parameters while preserving important spatial relationships.

Knowledge check

Quick check: test your understanding

What is a local connection?

A connection to a small image neighborhood.

What is weight sharing?

Reusing the same filter at different image positions.

What is the main efficiency benefit?

The network needs far fewer parameters.

Accessible referenceLesson 44 transcript292 words · Matches the published narration and captionsOpen transcript

Suppose a neural network receives an image containing one thousand pixels across and one thousand pixels down. That image contains one million pixel locations. If a fully connected layer connects every pixel to one thousand neurons, the layer requires approximately one billion weights, before counting biases.

Training and storing that many parameters would require considerable memory and computation. A CNN reduces this problem through local connections and shared weights. First, a convolutional neuron does not connect to every pixel in the image. It examines a small local region, such as a three-by-three group of pixels.

This follows a useful assumption about images: nearby pixels often form meaningful patterns together. Second, the CNN reuses the same filter across different image locations. Imagine a filter that detects a bird's beak. The beak may appear near the upper-left corner in one photograph and near the center in another.

We do not want to train a completely separate beak detector for every possible position. Instead, the same filter slides across the image. Its nine weights remain the same while the filter examines each three-by-three region. This process is called weight sharing. Weight sharing greatly reduces the number of parameters.

It also allows a learned pattern to be detected in different locations. This does not make a CNN completely unaffected by position. Large movements, rotations, scale changes, and viewpoint differences can still influence its output. However, shared filters provide a useful starting point for recognizing patterns wherever they appear.

Local connections preserve nearby spatial relationships, while weight sharing makes feature detection efficient. Together, these properties allow CNNs to process large images without creating a separate parameter for every possible connection. In the next lesson, we will look more closely at the small filters that perform this work.