TL;DR
Impression-CLIP applies contrastive learning to bridge the gap between font geometry and subjective human emotions. By co-embedding font images and descriptive "impression tags" into a shared latent space, it enables highly accurate cross-modal font retrieval and style estimation, outperforming state-of-the-art methods while remaining robust to noisy and missing data.
What Problem Does This Paper Address?
Fonts do more than display text; they convey subtle psychological impressions—ranging from "elegant" and "modern" to "quirky" or "heavy." However, mapping the relationship between a font's geometric shape and its emotional impression is notoriously difficult. Impressions are inherently subjective, crowdsourced font tags are often noisy, and many relevant tags are frequently missing (e.g., a bold font might not explicitly be tagged as "heavy" unless a user volunteers to do so).
Previous attempts to model this relationship, such as Cross-AE, relied on autoencoders to map font shapes and tags into a shared space. However, these methods only optimized for positive pairs (matching a font to its own tags), failing to enforce dissimilarity between unrelated fonts and impressions. This results in an unconstrained latent space where distinct styles can easily blend together.
Methods
The authors introduce Impression-CLIP, a framework based on Contrastive Language-Image Pre-training (CLIP). The core idea is to use contrastive learning to pull matching font-impression pairs closer together in a shared latent space while pushing mismatched pairs apart.
The architecture consists of two parallel pipelines:
- Font Shape Feature Extraction: To capture style consistency across an entire typeface, the authors stack the uppercase letters 'A' through 'Z' into a single 26-channel image stack. This stack is passed through a pre-trained convolutional autoencoder ($E_{\text{img}}$) to extract a shape feature vector ($I_n$).
- Font Impression Feature Extraction: To leverage a pre-trained, frozen CLIP text encoder ($E_{\text{tag}}$), the authors convert a font's discrete tags into a natural language prompt. Tags are ordered by global frequency and formatted into a sentence: "First, second, and third impressions are [tag1], [tag2], and [tag3], respectively." This allows the model to utilize CLIP's deep semantic understanding of typographic terms.
Both feature vectors are projected into a shared $d$-dimensional hyper-sphere using separate Multi-Layer Perceptrons ($M_{\text{img}}$ and $M_{\text{tag}}$). The entire network is optimized using a Symmetric Cross-Entropy (SCE) loss, which simultaneously refines image-to-tag and tag-to-image alignment across training batches.
Datasets
The model was trained and evaluated on two primary datasets:
- MyFonts Dataset: A large-scale dataset containing font images and crowdsourced tags. After filtering out small-caps, dingbats, and rare tags (less than 50 occurrences), the authors utilized 17,154 fonts and 223 distinct impression tags.
- AMT Dataset: A highly curated subset of MyFonts used exclusively for evaluation. It consists of 1,041 groups of three fonts sharing the same tag, where crowd-workers unanimously selected the single font that best represented the impression. This serves as a benchmark for fine-grained discrimination and noise robustness.
Key Insights and Ideas
- The Power of Negative Sampling: The transition from standard autoencoders to a contrastive framework is the key driver of performance. Forcing the model to learn what a font is not prevents the latent space from collapsing and yields much tighter clusters.
- Synergistic Co-embedding: The shared latent space creates a "serendipitous" relationship between modalities. For instance, two visually distinct fonts can be pulled closer together in the embedding space if they share strong semantic impressions, helping the model recognize higher-level stylistic categories beyond raw pixel similarity.
- Frequency-Based Prompt Engineering: Simply feeding raw tags into a text encoder is suboptimal. By structuring the prompt based on tag frequency across the dataset, the authors effectively filtered out minor, noisy tags while providing the language model with structural context.
Key Results
Impression-CLIP was evaluated on cross-modal retrieval tasks using Mean Average Precision (mAP) and Average Retrieval Rank (ARR, where lower is better out of 1,710 test fonts):
- Symmetric Retrieval Performance: Unlike previous models that favored one modality over another, Impression-CLIP achieved nearly identical performance in both directions, scoring an ARR of 233.9 for tag-to-image retrieval and 232.9 for image-to-tag retrieval.
- Outperforming the State-of-the-Art: Impression-CLIP drastically outperformed Cross-AE, which scored ARRs of 618.1 and 357.9, respectively.
- Fine-Grained Accuracy: On the challenging AMT dataset, Impression-CLIP achieved a success rate of 45.2% in identifying the most representative font within a triplet, compared to Cross-AE's 38.3% (which sits near the random chance rate of 33.3%).
Limitations and Future Work
The primary limitation identified is the highly imbalanced nature of the MyFonts dataset. Even after filtering, 70% of the impression tags appear fewer than 300 times across the entire training set. This data scarcity severely limits the retrieval accuracy (mAP) for rarer, long-tail tags.
Moving forward, the authors plan to introduce data-balancing techniques to mitigate tag scarcity while continuing to improve the model's resilience to noisy and missing user annotations.
Summary updated