Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

What an embedding actually is, and the formats it comes in

You now know where embeddings fit. This page explains what one actually is, which will make every later page in this lesson, the registry, the Clay workflow, clustering, similarity search, feel like natural consequences of this one idea rather than a collection of separate techniques.


1. Motivation

Every function in this lesson operates on embeddings as plain numerical vectors. Understanding what those numbers represent, and just as importantly, what they do not represent, is what will keep you from over-interpreting a similarity score or a cluster assignment later in this lesson.


2. Core idea

An embedding is a fixed-length numerical vector produced by a foundation model that summarizes the content of an image patch or pixel location. It is not a prediction or a final answer; it is a compact feature representation, an intermediate summary you build further analysis on top of. The geometry of the space these vectors live in is what makes them useful: two locations with similar land cover end up with embeddings that are close together, while very different locations end up far apart.


3. What an embedding is, and is not

A. A vector, not an answer

An embedding for one image patch might be a list of 768 numbers (Clay) or 128 numbers (TESSERA). None of those individual numbers has an obvious, human-readable meaning on its own, the way a class label or a confidence score does. What matters is the vector’s position relative to other vectors, not any single dimension’s value in isolation.

B. Why pre-training without labels works

Foundation models that produce embeddings are typically trained through self-supervised learning: instead of learning from human-provided labels, the model learns by solving a task it can generate from the raw data itself, for example predicting a masked-out part of an image from the rest of it. This is what lets these models train on vast amounts of unlabeled satellite imagery, and it is also why the resulting embeddings generalize reasonably well to imagery and locations the model was never specifically shown, the same generalization property that made Segment Anything useful in L12, here applied to producing reusable features rather than direct segmentations.

C. Patch-based and pixel-based formats

Embeddings come in two formats, and this lesson uses both:

Choosing between them is mostly a question of scale: patch-based embeddings are compact and efficient for large-area, scene-level questions, while pixel-based embeddings cost more to store and process but support analysis at the resolution of individual pixels.


4. Python reactivation

A single embedding is a one-dimensional NumPy array, the same object type you have used for raster band values throughout this course, just not spatially arranged. Stacking many embeddings together (one per patch or pixel) produces a two-dimensional array, rows for locations and columns for embedding dimensions, the exact shape scikit-learn functions expect, which is why embeddings slot so directly into standard machine learning tooling once extracted.


5. Common pitfalls


6. Mini task

A colleague says, “an embedding is basically the same thing as a classification prediction, just with more numbers.” Explain what this gets wrong, using the ideas from this page.

Sample solution

A classification prediction is a direct answer to a specific question (what class is this). An embedding is not an answer to any particular question at all; it is a general-purpose feature representation that can be used to answer many different downstream questions, similarity, clustering, classification with a separate lightweight model, without being recomputed. Having “more numbers” is not the key difference; the key difference is that an embedding is an intermediate representation, not a finished prediction.


7. Key takeaways

Further reading