---
title: 'Convolutional neural network (CNN)'
description: 'A neural network that applies shared learned filters across local regions of spatial or sequential data.'
canonical_url: 'https://darkfactory.dev/glossary/convolutional-neural-network'
markdown_url: 'https://darkfactory.dev/glossary/convolutional-neural-network.md'
collection: glossary
date_published: '2026-08-03T00:00:00-04:00'
date_modified: '2026-08-26T00:00:00-04:00'
---

# Convolutional neural network (CNN)


## Definition

A convolutional neural network applies a learned kernel to local regions of an input. The same kernel weights are reused at every position, producing a feature map. This weight sharing lets a CNN detect the same pattern in different locations with fewer parameters than a fully connected layer over the same input.

Stacking convolutional layers expands the receptive field. Early layers can respond to small local patterns, while later layers combine them over larger regions. Strides or pooling may reduce resolution. Two-dimensional convolutions are common for images, but one-dimensional and three-dimensional CNNs are used for sequences, audio, video, and volumes.

## LeNet and document recognition

The architecture is translation equivariant under ideal conditions: shifting the input shifts the feature map. That is different from full translation invariance, which depends on later aggregation, sampling, padding, and the task. Yann LeCun and colleagues' 1998 account of gradient-based document recognition documented the LeNet family and the use of local receptive fields, shared weights, and subsampling in an end-to-end recognition system.

## Distinguish it from nearby terms

A Transformer learns content-dependent relationships between positions through attention. A standard CNN uses a fixed local neighborhood at each layer and shares the kernel across positions. A fully connected network does neither. Hybrid architectures can combine all three patterns.

## Check your understanding

A 3 by 3 kernel slides across an image. Which values are learned once and reused, what determines one output cell's receptive field, and why does shifting the image usually shift the feature map?

## Related terms

- [Neural network](https://darkfactory.dev/glossary/neural-network)
- [Computer vision](https://darkfactory.dev/glossary/computer-vision)
- [Transformer](https://darkfactory.dev/glossary/transformer)
- [Data augmentation](https://darkfactory.dev/glossary/data-augmentation)

## Evidence and further reading

- [NIST AI 100-2: Adversarial Machine Learning](https://csrc.nist.gov/pubs/ai/100/2/e2025/final)
- [Google Machine Learning Glossary](https://developers.google.com/machine-learning/glossary/)
- [Deep Learning](https://www.deeplearningbook.org/)
- [Gradient-Based Learning Applied to Document Recognition](https://doi.org/10.1109/5.726791)
