How LLMs Work
What Is Unsupervised Learning?
Unsupervised learning finds patterns in data that has no labels. How it differs from supervised learning, and why it matters for large language models.
In supervised learning the computer is given examples with answers. In unsupervised learning there are no answers. Wikipedia says the algorithms learn patterns exclusively from unlabeled data.
Sorting without labels
Imagine a pile of mixed buttons and nobody tells you the groups. You might sort them by colour or size anyway. A clustering algorithm does something like this with data. Wikipedia names clustering (such as k-means), dimensionality reduction (such as principal component analysis), Boltzmann machines and autoencoders as examples of methods designed for unsupervised learning.
How NIST defines it
NIST's glossary, quoting its report AI 100-2e2025, defines unsupervised learning as a type of machine learning in which a model learns based on patterns in unlabeled data, such as learning a function to cluster or group data points.
Why it is cheaper
Wikipedia notes that the data for unsupervised learning is typically collected cheaply "in the wild", for example a huge amount of text gathered from the web, with only minor filtering. For supervised learning the dataset, such as ImageNet, is usually built by hand, which is much more expensive. Read ImageNet.
Where language models come in
Wikipedia says that after the rise of deep learning, most large-scale unsupervised learning has been done by training general-purpose neural networks with gradient descent. An example it gives is generative pretraining: a model is trained to generate a text dataset, and then fine-tuned for other jobs such as text classification. Read what is fine-tuning and how do LLMs learn.
In between
Between the two ends there are semi-supervised learning, where a small part of the data has labels, and self-supervised learning. Wikipedia says some researchers see self-supervised learning as a form of unsupervised learning.