← All notes

Is Modern Embeddings Fried?

Retrieval optimization can make embeddings more effective for search while reducing the broad representational utility that makes vectors reusable across future tasks.

  • ChatGPT Discussion
  • Research Idea

I recently came across the term “RL-fried” being used for language models.

It is not really a formal term, but the idea is intuitive: you keep optimizing a model against some reward until it becomes very good at whatever is being rewarded, while becoming worse in ways the reward does not measure.

There is a real research analogue to this. In reward-model overoptimization, for example, the proxy reward can keep going up even after some better measure of actual quality starts going down.

Very roughly:

Rproxy↑R_{\text{proxy}} \uparrow

while eventually:

Ractual↓R_{\text{actual}} \downarrow

The model is still optimizing successfully. The problem is that the thing being optimized is no longer a perfect proxy for what we wanted.

That made me wonder if something similar could happen to embedding models.

Not necessarily because embeddings are trained with RL. Most are not.

The question is more general:

Can we optimize embeddings so hard for one task—especially retrieval—that the representation becomes worse as a general representation of language?

At first this seemed easy to answer. Then it turned out I was not even sure what a “good” embedding was supposed to mean.


The old idea of a good embedding

One of the most famous properties of Word2Vec was the ability to do things like:

queen−woman+man≈king\text{queen} - \text{woman} + \text{man} \approx \text{king}

or:

king−man≈queen−woman\text{king} - \text{man} \approx \text{queen} - \text{woman}

This was exciting because it suggested that the model was not just putting related words close together. Some relationships between concepts were represented consistently as directions in the space.

There were similar examples for country/capital, singular/plural, verb tense, and so on.

So my first instinct was:

Maybe a healthy embedding should preserve this kind of semantic structure. If it does not, maybe the embedding is “fried.”

But that is probably too strong.

Modern embedding models are usually trained for a different objective.

A retrieval model cares about something closer to:

sim⁡(q,d+)>sim⁡(q,d−)\operatorname{sim}(q,d^+) > \operatorname{sim}(q,d^-)

where (d^+) is a relevant document and (d^-) is an irrelevant one.

Nothing about that objective says:

A−B+C=DA-B+C=D

should work.

If the model gets much better at retrieval while destroying some nice analogy geometry, it may not be broken at all.

It might simply be doing exactly what we trained it to do.

So the first useful distinction is:

specialized≠damaged\text{specialized} \neq \text{damaged}

That sounds obvious, but it changes the whole question.


King and queen are similar, until they are not

Take two sentences:

This is the king.

This is the queen.

For most definitions of semantic similarity, these are extremely similar sentences.

They have almost identical syntax. Both refer to royalty, monarchy, status, leadership, and so on.

We probably want:

sim⁡(E(king),E(queen))\operatorname{sim} \left( E(\text{king}), E(\text{queen}) \right)

to be high.

But we obviously do not want them to become the same vector.

Imagine the query:

female monarch

Now the difference between king and queen is the entire point.

The same thing happens at the sentence level.

Consider:

Queen Elizabeth II visited Canada in 2010.

This sentence could be relevant to very different queries:

  • British monarchs
  • Canadian history
  • female heads of state
  • royal visits
  • political events in 2010
  • Commonwealth history
  • Queen Elizabeth II

The document only contains one sentence, but there are many possible ways someone may later care about it.

flowchart TD
    S["Queen Elizabeth II visited Canada in 2010"]

    S --> A["Monarchy"]
    S --> B["Queen Elizabeth II"]
    S --> C["Canada"]
    S --> D["2010"]
    S --> E["Royal visit"]
    S --> F["Commonwealth history"]

    Q1["British monarch visits to Canada"] --> A
    Q1 --> C
    Q1 --> E

    Q2["Female heads of state"] --> B

    Q3["Royal events in 2010"] --> D
    Q3 --> E

This is one reason retrieval representations are interesting.

They need to make similar things close, but they also need to preserve distinctions that may only become important under a future query.

In other words:

similarity+separability\text{similarity} + \text{separability}

Both matter.

A document representation that collapses everything into its most obvious meaning may perform well for common queries but fail for less obvious ones.


Maybe retrieval really does need a rich representation

This also made me think about embedding dimensionality.

Modern embedding models often output hundreds or thousands of dimensions.

At first I thought this might simply be because language contains many different kinds of information:

  • topic
  • entities
  • sentiment
  • time
  • location
  • intent
  • relations
  • style
  • factual associations
  • syntactic information
  • and so on

A retrieval system does not know in advance which of those will matter.

So maybe a higher-dimensional representation gives it room to preserve many of them at once.

That is probably directionally right, although the actual story is more complicated.

A model may output a 3,072-dimensional vector without really needing all 3,072 dimensions independently.

The useful representation can live on a lower-dimensional structure inside the larger space.

Formally, the embedding might live in:

R3072\mathbb{R}^{3072}

while the actual data occupies some manifold:

M⊂R3072\mathcal{M} \subset \mathbb{R}^{3072}

with:

dim⁡(M)≪3072\dim(\mathcal{M}) \ll 3072

There is research showing that sentence embeddings often contain a lot of redundancy and can sometimes be compressed substantially without large losses.

Interestingly, retrieval and semantic textual similarity often seem to require more of the representation than simpler classification tasks.

That makes intuitive sense.

For a binary sentiment classifier, we may only care about one fairly narrow distinction:

positivevsnegative\text{positive} \quad \text{vs} \quad \text{negative}

It can throw away almost everything else.

Retrieval has a harder job because the query that will matter tomorrow is unknown today.

That is probably why retrieval tends to benefit from preserving more information.

But that immediately leads to another question.

If retrieval already needs such a rich representation, what is the difference between a good retrieval embedding and a good general semantic embedding?


What is a general embedding actually for?

Suppose I have a very good retrieval embedding.

Why should I care if it preserves some more abstract notion of “semantic structure”?

The answer is reuse.

Imagine embedding ten million documents today.

Today the vectors are used for search.

Next year someone wants to use them for clustering.

Then classification.

Then recommendations.

Then anomaly detection.

Then semantic deduplication.

Then a task nobody had thought of when the embeddings were generated.

Now the objective matters.

A retrieval-specific embedding can be thought of as learning:

ER(x)=whatever information is useful for retrievalE_R(x) = \text{whatever information is useful for retrieval}

while a general embedding is trying to get closer to:

EG(x)=a reusable compressed representation of the inputE_G(x) = \text{a reusable compressed representation of the input}

That second definition is fuzzy, but I think the difference is important.

A retrieval model knows roughly what its consumer wants.

A general representation does not.

It is trying to keep enough useful structure around that future tasks can still do something with it.

This is also where the king - man + woman example becomes less important.

That equation is one nice property of a representation.

It is not the definition of a general representation.

A more useful test might be:

Can many different downstream tasks cheaply recover useful information from the embedding?


General utility may be more about what is easy to recover

Say we freeze an embedding model:

z=E(x)z = E(x)

Then for a new task we train only a small linear classifier:

y^=Wz+b\hat{y} = Wz + b

If that simple classifier can learn the new task with very little data, then the embedding has already done a lot of the work.

If we need a large neural network and a lot of training data, the information may still technically be present, but it is not organized in a particularly useful way.

This gives us a more practical idea of generality.

Suppose two embeddings eventually reach the same classification accuracy:

Labeled examplesGeneral embeddingRetrieval embedding
1068%52%
10082%69%
1,00090%87%
100,00094%94%

If we only look at the last row, the models look equivalent.

They are not.

The first embedding made the task much easier to learn.

So maybe general utility is not just:

maximum downstream accuracy\text{maximum downstream accuracy}

but also something like:

how quickly new tasks can use the representation\text{how quickly new tasks can use the representation}

A representation that works well with ten or a hundred examples is more useful than one that needs one hundred thousand, even if both eventually converge to the same result.

That suggests a metric based on the learning curve:

G(E)=Et[AUC⁡(performancet(n))]G(E) = \mathbb{E}_{t} \left[ \operatorname{AUC} \left( \text{performance}_t(n) \right) \right]

where (n) is the amount of downstream supervision.

I am not saying this is the correct metric.

But I think it captures something important:

A good general representation should make many different future tasks cheap.


Isn't this basically MTEB?

This is where the idea started feeling much less original.

MTEB already evaluates embedding models across many kinds of tasks:

  • retrieval
  • classification
  • clustering
  • semantic textual similarity
  • reranking
  • pair classification
  • bitext mining
  • summarization-related evaluation

So if the argument is simply:

We should not evaluate an embedding only on retrieval,

then yes, that problem is already well understood.

MTEB exists largely because doing well at one embedding task does not imply doing well at all of them.

And many modern embedding models already explicitly aim to be general-purpose.

E5, GTE, INSTRUCTOR, BGE and others are trained on broad mixtures of data and tasks rather than one tiny retrieval dataset.

So the idea:

learn something general before specializing

is not new.

It is basically the standard foundation-model recipe.

flowchart LR
    A["Broad pretraining"] --> B["General representation"]
    B --> C["Retrieval"]
    B --> D["Classification"]
    B --> E["Clustering"]
    B --> F["Other tasks"]

At this point I thought I had simply rediscovered pretraining.

Which is not exactly a great blog conclusion.

But there was still one part that felt unresolved.


Training on many tasks is not necessarily the same as training for generality

Most general embedding models get generality by training on a diverse mixture of tasks.

Something like:

L=Lretrieval+Lclassification+LSTS+Lclustering+…L = L_{\text{retrieval}} + L_{\text{classification}} + L_{\text{STS}} + L_{\text{clustering}} +\dots

That makes sense.

If the model sees many different objectives, it is less likely to shape the whole space around only one of them.

But there is still a difference between:

Train on many known tasks.

and:

Learn a representation that will be useful for unknown future tasks.

The first is easy to write down.

The second is not.

If we wanted to express the second one mathematically, it might look something like:

E∗=arg⁡max⁡EEt∼T[U(E,t)]E^* = \arg\max_E \mathbb{E}_{t \sim \mathcal{T}} [ U(E,t) ]

where (\mathcal{T}) is some distribution of possible downstream tasks.

The problem is obvious:

We do not know what the future tasks are.

So how do we optimize for them?

Maybe training on many current tasks is already the best approximation.

Maybe the right answer is not one fixed embedding at all.

Instruction-conditioned models suggest another possibility:

E(x,task)E(x, \text{task})

rather than:

E(x)E(x)

The same text can produce a different representation depending on what the user wants to do with it.

That also makes sense.

There may not be one universally correct notion of similarity.

Two sentences can be very similar for topic classification and very different for entity retrieval.

The question:

Are these two things semantically similar?

may simply be underspecified.

Similar for what?


So are modern embeddings actually fried?

Probably not in the dramatic sense.

A retrieval embedding is not “fried” just because it no longer preserves every semantic relationship that Word2Vec did.

It may just be optimized for retrieval.

The more interesting case is when specialization keeps producing smaller and smaller gains while destroying capabilities we still care about.

Imagine a model going through retrieval fine-tuning:

CheckpointRetrieval scoreGeneral transfer
Base7090
FT-18089
FT-28784
FT-39072
FT-49148

The first step is easy to justify:

+10 retrieval+10 \text{ retrieval}

for:

−1 general transfer-1 \text{ general transfer}

The final step is much less attractive:

+1 retrieval+1 \text{ retrieval}

for:

−24 general transfer-24 \text{ general transfer}

This is the point where the “fried” analogy starts to make sense.

Not because the embedding changed.

It is supposed to change during training.

And not because general performance dropped.

That can be a perfectly reasonable consequence of specialization.

The interesting part is the shape of the trade-off.

At some point:

Δgeneral utilityΔretrieval\frac{\Delta \text{general utility}} {\Delta \text{retrieval}}

might become very large.

We are giving up a lot of representation quality for almost no additional target performance.

That looks much more like overoptimization.


But maybe the bigger mistake happens before fine-tuning

The thing I keep coming back to is this:

Maybe the problem is not that we fine-tune a general embedding for too long.

Maybe the problem is deciding too early that retrieval should define the representation itself.

There are two slightly different architectures here.

The first is:

flowchart LR
    X["Text"] --> E["Encoder"]
    E --> R["Retrieval embedding"]
    R --> S["Search"]

The second is:

flowchart LR
    X["Text"] --> E["General representation"]

    E --> R["Retrieval projection"]
    E --> C["Classification projection"]
    E --> M["Similarity projection"]
    E --> F["Future task"]

    R --> S["Search"]

In the second design, retrieval is allowed to throw information away.

But it throws information away after we already have a richer representation.

That feels like an important difference.

If the embedding is just an internal component of one search system, it probably does not matter.

But if we treat embeddings as reusable infrastructure—as a representation that many different systems may consume—then preserving optionality becomes valuable.

The base representation should not necessarily answer:

What matters for retrieval?

Maybe it should answer:

What information should remain available so that retrieval, classification, recommendation, or some unknown future task can decide what matters later?

That is a harder goal.


Where I ended up

So the original question was:

Are modern embeddings fried?

I do not think the answer is simply yes.

Modern retrieval embeddings are often extremely good at the job they were trained to do.

Losing some older notion of semantic geometry does not make them broken.

But I do think there is a useful distinction between:

semantic similarity\text{semantic similarity} retrieval relevance\text{retrieval relevance}

and:

general representational utility\text{general representational utility}

We often talk about all three as if they were the same thing.

They are not.

A representation can be excellent for retrieval while being less useful for unrelated downstream tasks.

Another representation can preserve broad semantic structure while being slightly worse at one particular retrieval benchmark.

Which one is better depends entirely on what we plan to do with it.

If the vector has one job, specialize aggressively.

If the vector is meant to become a reusable interface to language, the goal is different.

In that case, the most interesting property may not be whether:

queen−woman+man≈king\text{queen} - \text{woman} + \text{man} \approx \text{king}

or whether the model wins a retrieval leaderboard.

It may be something simpler:

How many useful things can we still do with this representation once we stop training it?

And perhaps the “fried” version of an embedding is not one that became specialized.

It is one where we optimized away information that we later discovered we still needed.

That is a much less dramatic definition.

But I think it is the more useful one.