What is representation learning?
Representation learning is a machine learning approach where a model learns useful features and vector representations directly from raw data, without hand-designed rules.
It is also called feature learning. It differs from feature engineering in who designs the features: in feature engineering an expert decides which signals matter, while in representation learning the model derives them from data. An embedding is the most common output of the process.
- Topic
- Core concepts
- Also known as
- Feature learning
How representation learning works
- Raw text, images, audio or tabular data pass through neural network layers, each building a more abstract representation on top of the previous one.
- The representations are updated with a learning objective: supervised with labelled data, self-supervised from the structure of the data itself or contrastive, pulling similar examples together.
- An intermediate or final layer of the trained network is taken out as a dense vector.
- These vectors are reused in downstream tasks such as classification, similarity search and clustering.
In more detail
Self-supervised learning objectives
Beyond supervised classification, modern representation learning relies heavily on self-supervised objectives: masked or next-token prediction (as in language models and masked autoencoders), contrastive learning (such as InfoNCE and CLIP, which pull matching pairs together and push non-matching pairs apart) and joint-embedding predictive architectures (JEPA) that predict abstract representations rather than raw pixels or tokens.
Matryoshka representation learning and dimension cost
Matryoshka Representation Learning (MRL) encodes the most important semantic information in the earliest dimensions of an embedding vector. This lets enterprise RAG deployments truncate a single 1024- or 3072-dimensional vector down to 256 or 512 dimensions at query time, trading a small accuracy drop for large reductions in RAM, storage and vector search latency.
Shared multimodal representation spaces
Learned representations can map multiple modalities, such as text, images, tables and PDF page screenshots, into a single shared vector space. Vision-language models and late-interaction multimodal retrievers leverage these joint representations so queries can match charts, scanned forms and text natively without brittle OCR pipelines.
The risk of recovering text from embeddings
Research shows that original text or sensitive attributes can be partially reconstructed from dense embedding vectors through embedding inversion attacks. Enterprises should therefore treat vector indexes with the same encryption, access controls and PII scrubbing policies as the underlying source documents.
Commonly confused terms
| Term | How it differs |
|---|---|
| Dimensionality reduction | Dimensionality reduction (such as PCA or UMAP) compresses existing features into fewer dimensions, often without task-specific deep nonlinear abstraction, whereas deep representation learning constructs hierarchical task- or semantics-aligned features directly from raw unstructured data. |
Why representation learning matters for on-premises AI
RAG and semantic search rely directly on learned representations: retrieval quality depends on how well the embedding model separates the concepts in the organisation's documents. Representations learned from general data may capture company jargon or Turkish domain terms poorly; then fine-tuning on internal data or choosing a domain-appropriate embedding model is needed. Since the representations derive from company data, embedding vectors are protected like the data itself.
A pharmaceutical company builds an in-house search system on representations learned from its clinical report archive; similar adverse event reports written in different words land on nearby vectors.
Common questions
Does representation learning fully replace feature engineering?
Largely yes for text, images and audio. For tabular data hand-designed features are still common.
Why does representation learning matter for RAG?
In RAG documents and queries are turned into embedding vectors. The better these representations are learned, the more relevant the retrieved chunks are to the question.
Related terms
- Embedding
- Self-supervised learning
- Deep learning
- Feature engineering
- Feature extraction
- Word embedding
- Transfer learning
- Contrastive learning
Sources
In the glossary: Glossary, R to Z