← the late compiler
C_000420 · deep learning · advanced

Vision Encoders

Components turning images into embeddings a language model can consume, usually a pretrained vision transformer plus a projection.

Step 1 of 4

In words

What it is, why it matters, and what it is like.

Why am I learning this?

Vision encoders are the doorway to multimodal AI. If you understand them, you can build systems that see: image captioning, visual question answering, document understanding, and smartphone apps that identify plants or products from a photo. This concept unlocks Cross-Modal Fusion (how different types of data get combined), and supports Diffusion Image Generation (which uses a similar text-conditioning idea) and TrOCR (reading text from images). It is also the first step toward any AI that needs to reason about images or video.

The idea, in plain terms

Imagine you have a photograph of a cat. A vision encoder's job is to turn that photo into a list of numbers that a language model can read. It does this in two stages. First, it uses a pretrained vision transformer—a network that has already learned to recognize patterns like edges, textures, and shapes from millions of images. This transformer outputs a set of features for the image: a description of what is in the picture, not in words but in numbers. But those numbers are in a space that the language model wasn't trained on. That's where the second stage comes in: a projection layer, which is a simple learned linear map (a kind of mathematical transformation) that takes the features from the vision transformer and projects them into the embedding space of the language model. Think of it like translating a book from French to English: the vision transformer produces French text, and the projection layer translates it to English so the language model can understand it.

An analogy

Picture a multinational company with two departments: one in Japan (vision) and one in the USA (language). The Japanese department writes its reports in Japanese, with detailed notes about layout, shading, and edges. The US department only reads English and needs a summary of the report in a standard format it understands. You hire a translator (the projection layer) who takes the Japanese report and turns it into a concise English memo, with each point mapped to the office's standard categories. The translator doesn't change the facts—if the report says 'a red car in the parking lot,' the memo says exactly that. But the memo is structured in a way the US office can act on. The translator is trained to do this job well on all kinds of reports, but once trained, the translator's job is fixed—you don't retrain the translator every time a new report comes in. That is like the projection layer: it is trained once to align the two spaces, and then it stays fixed while the vision transformer produces features. And here's where the analogy breaks: the translator in this story works on text, but the vision transformer produces a grid of numbers, and the projection layer is a simple arithmetic operation—a weighted sum of those numbers—not a human-like translation. Also, in real systems, the vision transformer is often 'frozen' (not changed during training on specific tasks) to save computation, so only the projection layer gets fine-tuned, like a translator who learns a few new company-specific terms but doesn't relearn their entire language.

Definition

A vision encoder is a component that converts an image into a set of embeddings (lists of numbers) that a language model can understand, typically using a pretrained vision transformer to extract features followed by a projection layer to map those features into the language model's embedding space.

Where this sits

check

Signal from the Frontier

Get the next essay on mind, machine, and meaning

Essays at the intersection of AI, philosophy, and Indian governance. No promotional content.

We'll send a one-click sign-in link to confirm. No password needed.

Views expressed are personal and do not represent the Government of India or the Government of Uttarakhand.