Alt-Text with Context: Improving Accessibility for Images on Twitter

Nikita Srivatsan, Sofia Samaniego, Omar Florez, Taylor Berg-Kirkpatrick

TL;DR

Researchers have developed a multimodal model that generates high-quality alternative text (alt-text) for Twitter images by leveraging both the image itself and the context of the accompanying tweet. By combining visual signals with surrounding social media text, their approach more than doubles the performance of previous state-of-the-art models and provides significantly more descriptive and useful information for blind and low-vision (BLV) users.

What Problem Does This Paper Address?

Visual content is central to the social media experience, yet it remains largely inaccessible to the blind and low-vision community. While "alt-text" (an HTML attribute providing a literal description of an image) is the standard solution, it is rarely used; the authors find that a staggering 98% of images on Twitter lack it.

Even when automated image captioning exists, it often fails in the context of social media. Traditional captioning models are trained to provide generic descriptions.

Example of how tweet context improves alt-text generation.

As illustrated above, a standard image captioning model might identify "a pile of books." However, the accompanying tweet reveals that those "books" are actually "election flyers." Without this context, the alt-text loses its functional utility. The challenge lies in creating a system that can distinguish between a generic caption and a context-specific, literal description while handling the messy, diverse nature of social media data.

Methods

The authors build upon an architecture called ClipCap. In a standard ClipCap setup, a pretrained CLIP model encodes an image into a vector, which is then projected via a mapping network into a "prefix"—a sequence of embeddings that live in the same space as word embeddings. This prefix is fed into a language model (like GPT-2) to trigger the generation of a caption.

The multimodal architecture combining image projections and embedded tweets.

The key innovation here is the multimodal prefix. Instead of just using the image, the authors embed the text of the associated tweet and concatenate it with the image projection. This creates a combined "prompt" for the GPT-2 decoder that contains both visual and contextual signals.

To further refine the output, they implemented a ROUGE-L reranking strategy. During inference, the model generates several candidate descriptions using beam search, and the final output is chosen based on which candidate has the highest n-gram overlap with the original tweet text. This ensures that relevant entities mentioned in the tweet (like specific names or events) are more likely to appear in the alt-text.

Datasets

The researchers introduced a massive new benchmark dataset specifically for this task:

  • Twitter Alt-Text Dataset: 371,270 images paired with user-written alt-text and the original tweet text, scraped over a 21-day period.
  • Comparison to Existing Sets: Unlike the popular Conceptual Captions dataset—which features short, colloquial captions (averaging 10 tokens)—this new dataset contains much more descriptive alt-text (averaging 40 tokens) and includes the vital surrounding textual context.

Key Insights and Ideas

  • Information "Stacking": The authors demonstrate that visual and textual signals provide "meaningfully non-overlapping" information. The image provides the literal structure, while the tweet provides the "ground truth" for what objects actually represent (e.g., identifying a specific brand or a niche political document).
  • Alt-Text vs. Captions: The paper highlights a crucial distinction: alt-text should be literal and functional, whereas captions are often subjective or atmospheric. A good alt-text system for social media must prioritize the former while using the latter for context.
  • The "Gold" Label Noise: Because the training data comes from real users, it is "noisy." Some users write excellent alt-text, while others use the field as a place for a second joke or a "hidden" caption. The model has to learn to filter this noise to find the descriptive signal.

Key Results

The multimodal approach showed dramatic improvements over baselines that used only the image or only the text:

  • Automated Metrics: On the BLEU@4 metric (a measure of text similarity), the proposed model scored 1.897, compared to just 0.681 for a finetuned ClipCap model that only saw the image. This represents a more than 2x improvement.
  • Human Evaluation: In head-to-head comparisons on Amazon Mechanical Turk, human annotators preferred the proposed model's output over the frozen ClipCap baseline 66.9% of the time for descriptiveness and 61.4% of the time for fluency.
  • Qualitative Success: The model proved particularly adept at transcribing text found within digital graphics and identifying specific entities (like "National Carers Week") that a purely visual model would miss.

Limitations and Future Work

Despite the gains, the authors acknowledge several hurdles:

  • OCR Integration: The current model does not have a dedicated Optical Character Recognition (OCR) system; it "reads" text through the CLIP encoder, which can be imprecise.
  • Entity Linking: The model sometimes struggles to precisely identify people by name unless they are explicitly mentioned in the tweet, suggesting a need for better entity-linking features.
  • Downstream Impact: The evaluation was performed by sighted reviewers. The authors emphasize that future work must include large-scale studies with the BLV community to ensure the generated text meets their specific utility needs.
  • Safety: As with any LLM-based system, there is a risk of the model generating toxic language or hallucinating details not present in the image.

Summary updated

BibTeX
@inproceedings{srivatsan2024alt,
  author = {Nikita Srivatsan and Sofia Samaniego and Omar Florez and Taylor Berg-Kirkpatrick},
  title = {{Alt-Text with Context: Improving Accessibility for Images on Twitter}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=97Dl82avFs},
}
Figure