Language-Informed Visual Concept Learning

Sharon Lee, Yunzhi Zhang, Shangzhe Wu, Jiajun Wu

TL;DR: Researchers at Stanford have developed a method to "distill" the vast knowledge of pre-trained vision-language models into disentangled concept encoders. By mapping images to continuous embeddings along specific axes—like color, material, or style—their system extracts nuanced visual details that language alone cannot describe, allowing users to remix them into entirely new, high-fidelity images.

The Challenge of Visual Nuance

While we use language to categorize the world (e.g., "a red chair"), words are often too coarse to capture the full spectrum of visual reality. A "red" chair could be crimson, maroon, or a very specific sun-bleached scarlet that lacks a precise name.

Current Text-to-Image (T2I) models excel at generating images from prompts, but they often struggle with compositionality—combining concepts in unusual ways, such as generating a "red banana." Furthermore, "Textual Inversion" techniques, which try to find a word embedding for a specific object, usually treat every image as a unique entity. They fail to recognize that the "redness" of an apple and the "redness" of a car share a common underlying concept. This research bridges that gap by learning a representation that is both language-informed and visually nuanced.

Distilling Concepts into Encoders

The authors propose a framework that trains a set of concept encoders, each dedicated to a specific "axis" such as category, color, material, or style.

Extracting Concept Axes
  1. Distillation via Reconstruction: The encoders take an image and produce continuous embeddings. These embeddings are plugged into a pre-trained T2I model (DeepFloyd IF) using a template prompt (e.g., "a <category> in <color> color"). The encoders are trained to minimize a reconstruction loss, essentially learning to "describe" the image to the T2I model well enough to recreate it.
  2. Soft Text Anchoring: To ensure the color encoder doesn't accidentally capture shape information (maintaining disentanglement), the authors use a Visual Question Answering (VQA) model (BLIP-2). They ask the VQA model "What is the color?" and use the resulting text embedding as an "anchor." The encoder is encouraged to stay near this anchor but is given enough leeway to capture specific visual nuances that discrete text labels miss.
  3. Test-Time Generalization: For concepts not seen during training, a lightweight finetuning step (about 600 iterations) adapts the encoders to novel visual styles or objects.

Datasets and Efficiency

The model is surprisingly efficient, trained entirely on synthetic images generated by the T2I model itself. The training sets span five domains—fruits, figurines, furniture, art, and clothing—using an average of only about 669 images per dataset. For evaluation, the model was tested on both synthetic and real-world images (casual photos and artwork) to demonstrate its ability to generalize beyond its training distribution.

Key Results and Insights

The core insight of this work is using language as a scaffold to define the structure of the representation (the axes) while using continuous embeddings to capture the content (the nuance).

Concept Recomposition
  • Superior Compositionality: In "concept recomposition" tasks—such as taking the category from a banana and the color from a red apple—the method significantly outperformed baselines like InstructPix2Pix and Null-text Inversion.
  • Human Evaluation: In user studies, the proposed method achieved a score of 0.968 for category faithfulness, compared to just 0.448 for a baseline using BLIP-2 descriptions.
  • Color Accuracy: Using the CIELAB $\Delta E^*$ metric (a measure of perceptual color difference), the model's extracted colors were much closer to the original source images than those generated by text-based baselines.
  • Real-World Generalization: Despite being trained on simple synthetic data, the encoders successfully extracted and remixed concepts from real-world photographs and complex paintings.

Limitations and Future Work

While powerful, the approach has a few constraints. The current model requires the concept axes (color, material, etc.) to be defined a priori and cannot "discover" new axes of variation on its own. Additionally, because the system trains a separate encoder for each axis, it does not scale perfectly to hundreds of concept types, nor does it exploit natural hierarchies (e.g., "crimson" is a type of "red"). Finally, the quality of the results is ultimately capped by the generative capabilities of the underlying T2I model.

For more details, visit the project page.

Summary updated

BibTeX
@inproceedings{lee2024language,
  author = {Sharon Lee and Yunzhi Zhang and Shangzhe Wu and Jiajun Wu},
  title = {{Language-Informed Visual Concept Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=juuyW8B8ig},
}
Figure