# Embedding (learned representation)

Source: https://onco.cc/terms/embedding/  
OnCo record `embedding` (Term). Data CC BY-NC 4.0, attribute "Data from OnCo (onco.cc)"; commercial use needs a licence.

## TL;DR

An embedding is a list of numbers a model produces to stand for an input (a tile, a gene, a patient), placed so that similar inputs land near each other.

## Summary

In machine learning an embedding maps complex high-dimensional data into a lower-dimensional vector space (Wikipedia). Foundation models are mostly used as embedding machines: a frozen encoder turns each tile or cell into a vector, mean or attention pooling aggregates them into a slide or sample vector (Wikipedia on pooling layers), and a small model on top does the prediction. Whether the embedding groups samples by tissue or subtype without any labels (cluster purity) is the first check of its quality.

## Fields

- Kind: Term
- Last checked: 2026-09-24
- Also known as: embeddings; learned embedding; embedding vector; patient embedding; tile embedding; gene embedding; frozen embeddings; mean pooling of embeddings
- Tags: cansim-terms

## Notes

- Listed in the CanSim terms map 1.0.0 (docs/onco/terms.json, generated 2026-09-24), CC BY 4.0, attribution: CanSim project, an open, public-data-first cancer foundation-model programme; CanSim page path /terms/embedding.

## Sources

- Wikipedia: https://en.wikipedia.org/wiki/Embedding_(machine_learning)
- Wikipedia: pooling layer: https://en.wikipedia.org/wiki/Pooling_layer
- Wikipedia: https://en.wikipedia.org/wiki/Embedding_(machine_learning)

## Connected records

- terms: [Cancer AI vocabulary (CanSim terms map)](https://onco.cc/terms/cancer-ai-vocabulary/), [Contrastive learning (InfoNCE)](https://onco.cc/terms/contrastive-learning/), [Fine-tuning versus frozen features, and LoRA](https://onco.cc/terms/fine-tuning-vs-frozen/), [Linear probe](https://onco.cc/terms/linear-probe/), [Principal component analysis (PCA) as a feature compressor](https://onco.cc/terms/pca/), [Tokenisation (genes, tiles and sequence as tokens)](https://onco.cc/terms/tokenisation/), [Transformer and attention](https://onco.cc/terms/transformer-architecture/), [Zero-shot prediction](https://onco.cc/terms/zero-shot/)

---
JSON: https://onco.cc/api/v1/entities/embedding.json