LAION-5B

Also known as: LAION dataset

On this page 7

LAION-5B is an open dataset of about 5.85 billion image-text pairs collected from the public web and filtered with the CLIP model, released in 2022 by the nonprofit research network LAION. In multimodal AI it became the largest openly available image-text pair dataset of its time and the training source for widely used open models such as OpenCLIP and Stable Diffusion.

The dataset does not contain images. It distributes URLs, alt-text captions and metadata, and each user downloads the images independently. This design made web-scale multimodal pretraining reproducible outside large companies, but it also raised lasting questions about data quality, consent, copyright and harmful content.

How LAION-5B was built

LAION-5B was assembled by parsing Common Crawl web archives for HTML image tags that carry alt-text. Each candidate pair of image URL and alt-text then passed through a filtering pipeline whose central step was CLIP similarity filtering: the image and the text were embedded with a CLIP model, and pairs whose cosine similarity fell below a threshold were discarded.

The thresholds were about 0.28 for English pairs and 0.26 for multilingual pairs. Pairs with very short captions, tiny images or obviously broken links were also removed. The pipeline kept billions of pairs out of a much larger pool of candidates, so CLIP filtering is the main reason the captions describe their images better than raw alt-text does.

The table below lists the main stages of the construction pipeline and what each stage removed or added.

StageWhat happensEffect on the data
Web parsingExtract image URLs and alt-text from Common CrawlTens of billions of raw candidates
Basic filteringDrop short text, small images and duplicatesRemoves obvious noise
Image downloadFetch images to compute embeddingsDrops dead links at build time
CLIP filteringKeep pairs above a similarity thresholdRaises image-text alignment
AnnotationAdd language, safety and watermark scoresEnables later subset selection
Construction pipeline of LAION-5B

Subsets, metadata and distribution format

LAION-5B is organized into three language-based subsets, determined by automatic language detection on the captions. Researchers usually train on one subset or on a filtered slice rather than on the full collection.

SubsetApproximate sizeContent
LAION-2B-en2.32 billion pairsCaptions detected as English
LAION-2B-multi2.26 billion pairsCaptions in more than 100 other languages
LAION-1B-nolang1.27 billion pairsCaptions with no reliably detected language
Main subsets of LAION-5B

Each record carries the image URL, caption, image width and height, CLIP similarity score, a predicted NSFW probability and a watermark probability. The release also included precomputed CLIP embeddings and nearest-neighbor indices, which allowed users to search the collection by text or image and to build curated subsets such as LAION-Aesthetics, selected by a predicted aesthetic score.

Because only links are published, every user must download the images themselves, typically with open-source bulk download tools. Over time a growing share of URLs stops working, a problem known as link rot, so two copies downloaded years apart are not identical.

LAION-5B compared with other image-text datasets

LAION-5B sits between small, carefully captioned datasets and proprietary web-scale collections. Its main distinction is openness at billion scale, which no comparable public dataset offered when it appeared.

The comparison below places it among other well-known image-text pair datasets.

DatasetApproximate sizeCaption sourceAvailability
MS COCO CaptionsAbout 330,000 imagesHuman-written captionsOpen
Conceptual Captions3 to 12 million pairsFiltered alt-textOpen as URLs
LAION-400M400 million pairsCLIP-filtered alt-textOpen as URLs
LAION-5B5.85 billion pairsCLIP-filtered alt-textOpen as URLs, later revised
Proprietary web corporaBillions of pairsVaried web textNot released
LAION-5B and other image-text datasets

LAION-400M, released in 2021, was the direct predecessor and used the same method on a smaller scale. Later open efforts focused less on size and more on better filtering and synthetic recaptioning, because research showed that caption quality often matters more than additional raw pairs.

Role in training multimodal models

LAION-5B is used mainly for contrastive image-text pretraining and for text-to-image generation. OpenCLIP models trained on LAION-2B-en reproduced and in some settings exceeded the zero-shot image classification accuracy of the original CLIP, which supported the view that scale and data openness could close much of the gap with closed systems.

Latent diffusion models, including early Stable Diffusion versions, were trained on LAION subsets selected by resolution and aesthetic score. Many vision encoders in later vision-language models also trace part of their pretraining back to LAION-derived data.

Data curation remains essential. Teams rarely use the raw collection; they apply stricter similarity thresholds, deduplication, safety filters and resolution limits to obtain a smaller but cleaner training set.

Known problems and controversies

Web-scale collection without manual review means LAION-5B inherits the biases, errors and harmful material of the open web. The automatic NSFW and watermark scores reduce but do not eliminate these problems.

IssueCauseConsequence or response
Illegal content linksNo manual review of web URLsWithdrawn in 2023, replaced by Re-LAION-5B in 2024
Copyright disputesImages collected without license checksLitigation and debate over text and data mining
Personal dataPrivate photos indexed on public pagesOpt-out requests and privacy concerns
Social biasSkewed web representationBiased outputs in downstream models
Noisy captionsAlt-text written for other purposesWeaker alignment for fine-grained detail
Main issues with LAION-5B

In December 2023, an audit by the Stanford Internet Observatory identified links to child sexual abuse material in the dataset. LAION took the dataset offline and in 2024 released Re-LAION-5B, a revised version with the flagged links removed in cooperation with child-safety organizations. Any responsible use today relies on the revised release, not archived copies of the original.

Understanding it simply

Imagine a giant address book of pictures on the internet, where each entry lists where a picture lives and the short description a website gave it. LAION-5B is that address book, with almost six billion entries.

AI systems that connect pictures and words learn by seeing huge numbers of such pairs. LAION-5B made this possible for universities and small labs, not only large companies. The catch is that the web contains mistakes and harmful material, so the list needs careful cleaning before anyone uses it.

Applied in practice

A university research group wants to study how training data size affects zero-shot image classification. Instead of collecting its own data, the group selects pairs from the revised Re-LAION-5B English subset, keeps only pairs with a CLIP similarity above 0.30 and a minimum image side of 256 pixels, and removes near-duplicates using the published embeddings.

The group downloads about 400 million images over two weeks, losing roughly a tenth of the links to link rot, and trains several CLIP-style models at different data scales. Because the subset definition and filters are documented, another lab can rebuild almost the same training set. The study produces reproducible scaling curves, which is exactly the kind of open research the dataset was created to support.