NeurIPS 2026 · PosterIIT Hyderabad

LACE.

Latent Alignment via Counterfactual Embeddings

Edit the embedding, not the pixels: counterfactual negatives for both image and text

Harsh UdaiKonda Reddy Mopuri
Department of Artificial Intelligence, IIT Hyderabad

TL;DRText-only hard negatives leave the image encoder without near-misses. LACE swaps, removes or transplants concepts directly in the embedding to make counterfactual negatives on both sides. No diffusion, no image editor.

+5.94MMVP-VLM29.62 → 35.56
+3.49COLA35.56 → 39.05
−3.05attribute-swap failures4.65% → 1.60%
+4.84mutual reciprocity46.57% → 51.41%
The problem

Same objects, same colours, different scene

a red suitcase next to a black backpack

a black suitcase next to a red backpack

CLIP-style models often score these two captions almost the same, because their training never forces them to bind each attribute to the right object.

The common fix adds hard negatives on the text side only: swapped, negated, or perturbed captions. The text encoder learns the fine distinctions, but the image encoder never sees a matching near-miss. The shared embedding space becomes lopsided, even when retrieval scores look healthy.

Hubs

A few points become the nearest neighbour of almost everything and crowd out correct matches.

With LACE: hubness falls

One-way neighbours

An image's nearest caption often has a different image as its own nearest match.

Mutual reciprocity 46.57% → 51.41%

Brittle to small edits

Swapping an attribute or relation can leave the edited caption scoring above the true one.

Attribute swaps 4.65% → 1.60% · relation swaps 3.27% → 1.10%
Method

Hard negatives for both modalities, made in embedding space

LACE edits embeddings instead of pixels. It needs no diffusion model, no image editor, and no retrieval mining, so image-side counterfactuals become as cheap as text-side ones.

Diagram: a concept set of attributes, objects and relations passes through the CLIP text encoder to form a concept dictionary D; multiplied by sparse weights alpha, it reconstructs a counterfactual embedding z_cf.
A shared concept dictionary. Object, attribute, and relation concepts are embedded once to form a fixed dictionary D. Any image or text embedding is then explained by a sparse weight vector α over these atoms, and editing that explanation yields a counterfactual embedding.
Concept dictionary D · embedded once with the CLIP text encoderringed = active in a photo of sheep in a field
objects
sheepgrassfieldzebrasuitcasebackpackdonutbroccoli…
attributes
whitefluffyblackredblue…
relations
standing onnext toon top ofleft of…
STEP 1 · DECOMPOSE

Find the concepts in play

Sparse coding writes each embedding as a few active atoms, such as sheep, grass, white, on. Only atoms that are both strongly used and semantically aligned are allowed to be edited.

sheep .42grass .24white .16
STEP 2 · EDIT

Change one thing

Attenuate, swap, or transplant a single concept with another of the same type: sheep → zebra, red → blue. The rest of the scene stays as it was.

sheep→zebra
STEP 3 · CONTRAST

Train both sides

Edited captions become negatives for image→text retrieval, and edited images become negatives for text→image retrieval. At test time all of this is gone: it is a plain dual encoder.

image → texttext → image
Try the operator

Three ways to make a near-miss

The bars show the active atoms of an image embedding for a photo of sheep in a field. Pick an edit to see how LACE changes the sparse code before rebuilding the embedding. Values are illustrative.

object attribute relation edited away edited in

Do the edits mean anything?

Edited embeddings retrieve the new concept

We transplant a concept inside a real COCO image embedding and look up its nearest real images.

Top-3 nearest COCO images before and after latent transplants. Sheep to zebra: three sheep photos become one sheep and two zebras. Donut to broccoli: three donut photos become three broccoli photos.
Latent transplants on COCO. T marks target evidence, S source evidence, and C preserved context. Counts below each row are over the full top-10 neighborhood.
  1. Before the editNeighbours show the source concept: sheep in one row, donuts in the other.
  2. After a transplantNeighbours switch to the target. Sheep → zebra brings in two zebras; donut → broccoli turns all three into broccoli. Grass, plates and tables stay.
  3. A random edit of the same sizeNever retrieves the target. The direction of the edit carries the meaning, not its size.
Results

What the counterfactuals add

Every comparison below changes only whether LACE's counterfactuals are used.

Held fixed: backbonedataLoRA setupoptimizerschedule
Without LACEWith LACERows in a group share one scale. Failure rates are flipped so better is always to the right.

The paper has full benchmark results, comparisons with prior compositional methods, and ablations.

Why it's practical

What LACE doesn't need

Diffusion model

No generated images. Counterfactuals are made in embedding space.

Image editor

No inpainting or pixel edits to make image-side negatives.

Retrieval mining

No search over a corpus for near-miss pairs.

At test time, it is a plain dual encoder.The same generator works with CLIP's contrastive loss and SigLIP's pairwise sigmoid loss.
Cite

BibTeX

@inproceedings{udai2026lace,
  title     = {{LACE}: Latent Alignment via Counterfactual Embeddings},
  author    = {Udai, Harsh and Mopuri, Konda Reddy},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2026}
}