Hostname: page-component-74656f9884-skzmx Total loading time: 0 Render date: 2026-11-05T03:45:57.421Z Has data issue: false hasContentIssue false

An Image Is Worth K Topics: A Visual Structural Topic Model with Pretrained Image Embeddings

Published online by Cambridge University Press:  05 November 2026

Matías Piqueras*
Affiliation:
Department of Information Technology, Uppsala University , Sweden
Alexandra Segerberg
Affiliation:
Department of Government, Uppsala University , Sweden
Matteo Magnani
Affiliation:
Department of Information Technology, Uppsala University , Sweden
Måns Magnusson
Affiliation:
Department of Statistics, Uppsala University , Sweden
Nataša Sladoje
Affiliation:
Department of Information Technology, Uppsala University , Sweden
*
Corresponding author: Matías Piqueras; Email: matias.piqueras@it.uu.se
Rights & Permissions [Opens in a new window]

Abstract

Political scientists are increasingly interested in analyzing visual content at scale. However, the existing computational toolbox is still in need of methods and models attuned to the specific challenges and goals of social and political inquiry. In this article, we introduce a visual structural topic model (vSTM) that combines continuous image embeddings with a structural topic model. This has important advantages compared to existing approaches. First, continuous embeddings allow the model to capture the semantic complexity of images, which is relevant to the study of politics. A consequence of using continuous embeddings is that we can directly use off-the-shelf pretrained deep learning models, offering state-of-the-art performance in image analysis tasks while saving time, cost and resources. Second, the structural topic model provides the ability to analyze how topics and covariates are related, while maintaining a nuanced representation of images as a mixture of multiple topics. In our experiments, we show that the vSTM is able to identify topics that are interpretable, coherent and relevant to the study of online political communication.

Information

Type
Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press on behalf of The Society for Political Methodology
Figure 0

Figure 1 Plate diagram of the generative model of vSTM. βk$\boldsymbol {\beta }_k$ is a topic, θi$\boldsymbol {\theta }_i$ is the vector of topic proportions for image i, Γ$\boldsymbol {\Gamma }$ is the matrix of topic prevalence coefficients, zi$\boldsymbol {z}_i$ is the image embedding and xi$\boldsymbol {x}_i$ are image-level covariatesFigure 1 long description.

Figure 1

Table 1 Image embedding optionsTable 1 long description.

Figure 2

Figure 2 Diagnostics for model selection. The left panel shows perplexity, averaged over five held-out sets. The right panel shows coherence and exclusivity for each model, averaged over all topicsFigure 2 long description.

Figure 3

Figure 3 Top six images from a selection of topics. The top FREX nouns, verbs, and adjectives of a topic are shown above the images and are identified automatically using a part-of-speech tagger on the LLM image descriptionsFigure 3 long description.

Figure 4

Figure 4 Predicted topic proportions by actor type and stance, across each COP for a selection of topics. Topics with a “+$+$” are merged into oneFigure 4 long description.

Figure 5

Figure 5 Quality score for different discrete and continuous configurations using STM and vSTM, respectivelyFigure 5 long description.

Figure 6

Figure 6 Top 18 most representative images for three migrant topics. The top FREX keywords are computed using the method in Section 3.4Figure 6 long description.

Figure 7

Figure 7 The top 18 most representative images for the “Dense crowd” topic from Torres (2024). The top FREX keywords are computed using the method in Section 3.4Figure 7 long description.

Supplementary material: File

Piqueras et al. supplementary material

Piqueras et al. supplementary material
Download Piqueras et al. supplementary material(File)
File 28.4 MB