CIFAR-10

On this page 7

CIFAR-10 is a labeled image classification dataset of 60,000 color images, each only 32 by 32 pixels, divided evenly into ten mutually exclusive classes such as airplane, cat and truck. As a classic piece of training data in artificial intelligence, it serves as a compact, standardized benchmark on which researchers compare architectures, optimizers and data augmentation methods under identical conditions.

The dataset was assembled by Alex Krizhevsky, Vinod Nair and Geoffrey Hinton and released in 2009 together with its larger sibling, CIFAR-100. Its small size makes a full training run feasible on a single GPU in minutes to hours, which is why it remains a default sandbox for vision research more than fifteen years after publication.

How the CIFAR-10 dataset is built

CIFAR-10 is a curated subset of the 80 Million Tiny Images collection, a web-scraped corpus of low-resolution pictures gathered through search queries. Human annotators checked candidate images so that each retained picture shows one prominent object of its class, which gives the dataset far cleaner labels than the raw source.

The data is distributed as six batches of 10,000 images: five training batches and one test batch. Every class contributes exactly 6,000 images, so the split is perfectly balanced, with 5,000 training and 1,000 test images per class. The table below summarizes the core specifications.

PropertyValuePractical consequence
Total images60,000Fits easily in memory (about 180 MB raw)
Training set50,000 imagesFive batches of 10,000
Test set10,000 images1,000 per class, fixed split
Resolution32 x 32 pixels, RGB3,072 values per image
Classes10, mutually exclusiveSingle-label classification
Class balance6,000 per classAccuracy is a fair headline metric
Core specifications of CIFAR-10

The ten classes are airplane, automobile, bird, cat, deer, dog, frog, horse, ship and truck. The creators deliberately kept automobile and truck disjoint: sedans and SUVs belong to automobile, while only large trucks belong to truck, and pickup trucks were excluded to avoid ambiguity.

CIFAR-10 compared with other image benchmarks

CIFAR-10 occupies a middle ground in difficulty between digit recognition and large-scale natural image classification. It is harder than MNIST because objects vary in pose, background and lighting, yet far cheaper than ImageNet, whose full training run requires substantial compute.

DatasetImages and classesResolutionTypical role
MNIST70,000 images, 10 digits28 x 28 grayscaleTeaching and sanity checks
CIFAR-1060,000 images, 10 classes32 x 32 colorFast architecture comparison
CIFAR-10060,000 images, 100 classes32 x 32 colorFine-grained, fewer examples per class
ImageNet-1kAbout 1.28 million training images, 1,000 classesVariable, often 224 x 224Large-scale pretraining and evaluation
How CIFAR-10 relates to neighboring datasets

The key difference from CIFAR-100 is not the image source but the label granularity: CIFAR-100 spreads the same number of images across 100 classes grouped into 20 superclasses, leaving only 600 images per class and making it markedly harder. Results on CIFAR-10 therefore rarely transfer one-to-one to CIFAR-100.

Typical training setup and accuracy levels

Most CIFAR-10 experiments follow a conventional training recipe that has become almost a protocol. Images are normalized per channel, and the standard augmentation is random cropping after 4-pixel padding combined with random horizontal flips. Stronger methods such as Cutout, mixup and AutoAugment are added when researchers push for top accuracy.

Reported accuracy depends heavily on model capacity and pretraining. The following table gives approximate ranges for the test set accuracy, which vary with training length, augmentation and hyperparameters.

Model familyApproximate accuracyNotes
Linear classifier on pixelsAbout 35-40%Shows how weak raw pixels are
Small convolutional networkAbout 75-85%Typical tutorial result
ResNet trained from scratchAbout 93-96%Standard research baseline
Large pretrained vision transformerAbove 98-99%Fine-tuned from large external data
Approximate test accuracy by model family

Because the benchmark is close to saturation at the top end, a gain of a few tenths of a percent is often within run-to-run variance. Careful authors therefore report the mean and spread over several seeds rather than a single best run.

Known label and split issues

Although curated, CIFAR-10 contains imperfect training data. Audits using confident learning have identified a small number of mislabeled test images, well under one percent, along with ambiguous pictures that could plausibly belong to two classes. At the accuracy levels of modern models, such label noise can decide rankings between methods.

A second concern is near-duplicate images across the training and test splits, which inflate measured generalization slightly. Replication studies such as CIFAR-10.1, a freshly collected test set, showed that many models lose several percentage points on new data, revealing adaptive overfitting to the fixed test set after years of reuse.

IssueEffect on resultsRecommended practice
Tuning on the test setOptimistic, non-reproducible accuracyHold out a validation split from training data
Single-seed reportingNoise mistaken for improvementReport mean and standard deviation
Ignoring label errorsDistorted ranking at the top endCross-check with cleaned labels
Assuming transfer to real imagesOverconfident deployment decisionsValidate on larger, domain-specific data
Common pitfalls and how to handle them

When CIFAR-10 is the right choice

CIFAR-10 is well suited to rapid prototyping and controlled ablation studies, where the goal is to isolate the effect of one change such as a new normalization layer or learning rate schedule. It also fits teaching and robustness research, for which derived variants such as CIFAR-10-C add systematic corruptions like blur and noise.

  • Use it to compare optimizers, regularizers and augmentation policies cheaply.
  • Use it for experiments on active learning, label noise and data pruning, where its balance simplifies analysis.
  • Avoid relying on it for claims about high-resolution vision, object detection or real-world deployment.
  • Treat small gains carefully, because results near the ceiling are statistically fragile.

The dataset also carries provenance questions: its parent collection was withdrawn in 2020 over offensive labels in other parts of the corpus. CIFAR-10 itself remains widely distributed, but teams with strict data governance should document its origin and license terms before commercial use.

Put simply

CIFAR-10 is a shared practice test for computer vision. It holds 60,000 tiny photos. Each photo shows one of ten things, such as a dog, a ship or a frog. Every photo comes with the correct answer.

Researchers train a model on 50,000 photos. They then check how many of the other 10,000 it names correctly. Since everyone uses the same photos, results are easy to compare. The pictures are very small, so tests run quickly. The catch is that doing well here does not guarantee success on real, detailed images.

In practice

A small machine learning team wants to test whether a new learning rate schedule helps a ResNet-18 model. Training on full ImageNet would take days, so they first run the comparison on CIFAR-10 using one GPU, with standard cropping and flipping augmentation and five random seeds per setting.

The baseline reaches a mean of about 95.0% accuracy, and the new schedule reaches about 95.4% with a similar spread across seeds. Because they tuned on a validation split carved from the training data, the test result is credible. The team treats the outcome as a promising signal rather than proof and schedules a confirmation run on a larger, domain-specific dataset before adopting the change.