NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Role of Locality and Weight Sharing in Image-Based Tasks: A Sample Complexity Separation between CNNs, LCNs, and FCNs

Aakash Lahoti, Stefani Karp, Ezra Winston, Aarti Singh, Yuanzhi Li

TL;DR

This paper provides a rigorous mathematical proof for why Convolutional Neural Networks (CNNs) are more sample-efficient than Locally Connected (LCNs) and Fully Connected Networks (FCNs) for image tasks. By introducing a new benchmark task called Dynamic Signal Distribution (DSD), the authors demonstrate a clear "sample complexity separation," showing that CNNs require significantly fewer training examples to learn translation-invariant features because they leverage both locality and weight sharing.

What Problem Does This Paper Address?

It is common knowledge in deep learning that CNNs outperform other architectures on images because they are designed with "inductive biases" for locality (pixels near each other are related) and weight sharing (a feature like an "edge" looks the same regardless of where it is in the image).

However, formally quantifying how much these biases help has been difficult. Previous theoretical work often ignored the actual learning process (the optimizer) or used overly simplistic tasks that didn't capture the true nature of vision. Specifically, without considering the training algorithm, a powerful FCN could theoretically "simulate" a CNN, making it hard to prove that a CNN is strictly better. The authors set out to prove a mathematical gap in the number of samples needed for these architectures when trained with standard algorithms like Gradient Descent.

Methods

The authors introduce the Dynamic Signal Distribution (DSD) task to model the core challenges of vision. In this task:

  1. An image is divided into $k$ patches, each of dimension $d$.
  2. A specific "signal" (a sparse vector) is hidden in exactly one of these patches.
  3. The rest of the patches are filled with random Gaussian noise.
  4. The goal is to identify the sign of the hidden signal.
Figure 1: From the Cats Dataset Zhang et al. (2008). The cat, which is the class-determining signal, varies in position across images, showing the translation property amidst background noise.

To analyze this, they compare three one-hidden-layer architectures:

  • FCN: No structural assumptions; every input connects to every hidden node.
  • LCN: Implements locality; hidden nodes only look at specific patches, but each patch has its own unique weights.
  • CNN: Implements locality and weight sharing; all hidden nodes use the same weights to scan across all patches.

They use a specialized activation function called Local Signal Adaptivity (LSA), which acts as a soft-threshold to filter out low-level noise. The core of their proof involves a novel variant of Fano’s Theorem adapted for randomized algorithms, allowing them to set lower bounds on how many samples any "equivariant" algorithm (like Gradient Descent) needs to solve the task.

Datasets

The primary evaluation is performed on the newly introduced Dynamic Signal Distribution (DSD) synthetic task. While synthetic, DSD is designed to mirror the statistical properties of real-world datasets like the Cats Dataset (Zhang et al., 2008), where the class-defining object can translate freely across a noisy background.

Key Insights and Ideas

  • The Multiplicative Cost of Ignorance: The paper reveals that FCNs suffer a "double penalty." They must spend samples to learn where the patches are and then spend more samples to learn the signal for each possible location.
  • Locality vs. Weight Sharing: LCNs solve the "where" problem through their architecture (locality), but they still have to learn the signal independently for every patch. CNNs solve both: they know where to look and, through weight sharing, they learn the signal once and apply that knowledge everywhere.
  • Algorithmic Efficiency: The authors highlight that the sample complexity isn't just about what a model can represent, but what Gradient Descent can actually find. Their upper bounds include a factor of $(k+d)$ rather than just $d$, which they suggest is a "tax" paid for the efficiency of using Gradient Descent.

Key Results

The authors prove a clear hierarchy in sample complexity (the number of samples $n$ required to achieve low error):

Architecture Sample Complexity Benefit
CNN $\tilde{O}(k + d)$ Best: Uses locality + weight sharing
LCN $\Omega(kd)$ Middle: Uses locality only
FCN $\Omega(k^2d)$ Worst: No architectural bias

In practical terms, their experiments showed that LCNs require 10–20 times more samples than CNNs to reach the same error rate. FCNs are even worse, requiring orders of magnitude more data, which often makes them prohibitively expensive to train on these tasks.

Limitations and Future Work

  • Simplified Data Model: The DSD task assumes only one signal appears in one patch at a time. Real-world images often contain multiple objects or overlapping signals.
  • Network Depth: The study focuses on one-hidden-layer networks. The authors note that exploring how depth helps capture dependencies between different patches is a vital next step.
  • Second-Order Statistics: Future work could incorporate more complex image characteristics, such as textures or hierarchical structures, into the DSD framework to further bridge the gap between theory and practice.

Summary updated

BibTeX
@inproceedings{lahoti2024role,
  author = {Aakash Lahoti and Stefani Karp and Ezra Winston and Aarti Singh and Yuanzhi Li},
  title = {{Role of Locality and Weight Sharing in Image-Based Tasks: A Sample Complexity Separation between CNNs, LCNs, and FCNs}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=AfnsTnYphT},
}
Figure