arXiv:2610.23388cs.CLOct 2026

Manuscript Offprint

arXiv:2610.23388

Sentence-Level Topic Modeling with Lexical and Contextual Evidence

Federica Granese, Serena Villata, Charles Bouveyron

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Topic modeling faces a fundamental granularity dilemma: probabilistic topic models assign topics at the word level, whereas transformer-based methods operate at the document level. The latter overlooks that real-world documents typically cover multiple topics, whereas the former relies on individual words, which rarely provide sufficient context to identify them. We introduce SentenceETM, a neural topic model that assigns a topic to each sentence by jointly using lexical and contextual evidence. Each topic is described both by a distribution over the vocabulary, defined through word embeddings, and by a Gaussian over sentence embeddings concentrated on a topic-specific low-dimensional subspace. The topic of a sentence generates both its words and its embedding and is marginalized exactly, so that its posterior combines the two sources of evidence. Document proportions are inferred with amortized variational inference, while the Gaussian parameters are re-estimated in closed form. Experiments show that SentenceETM consistently improves sentence-level topic assignment over state-of-the-art approaches, and a case study of a presidential debate shows how sentence-level topics reveal how candidates handle the same subjects.

1 INTRODUCTION

Topic models are well-established methods for extracting the main themes from a collection of documents. Regardless of their underlying formulation, these methods produce a set of topics that characterize the corpus, where a topic is broadly understood as a group of semantically coherent words. A document is characterized by a mixture of these topics. However, such a mixture tells us which topics the documents contain but not where they are localized. Indeed, real documents rarely contain a single theme, and locating them requires deciding which textual unit a topic is attached to and from which evidence it is inferred.

We refer to lexical evidence as the information carried by words occurring in a text segment 1^{1}, represented as counts over a fixed vocabulary, and to contextual evidence as the dense representation of that text segment produced by a pretrained neural encoder. Lexical evidence is directly interpretable as a distribution over words, but it is blind to word order and to the sense a word takes in a given occurrence. Contextual evidence can capture the overall semantics of a document more faithfully, but at the cost of interpretability, since the words that characterize a topic are no longer part of its representation and must be recovered separately.

The two main families of topic models each build primarily on one of these types of evidence, because the textual unit they adopt admits primarily one of them. Bag-of-words approaches, e.g. (Blei et al., 2003), treat the word as the fundamental unit: each word receives a latent topic assignment, and a document becomes a mixture over topics. A word is represented independently of its surrounding context, so contextual evidence from the document is not available to the model at this level. Embedding-based approaches, e.g. (Grootendorst, 2022), take the opposite stance, treating the document as the fundamental unit and clustering the encoder's representations. Contextual evidence is exploited directly, but lexical evidence reenters only post hoc, through a descriptor-extraction step playing no role in the topic assignment itself. The result is that one family is too fine-grained to use context, the other too coarse-grained to localize the topics.

Sentence-level topic models lie in between these two extremes. A sentence is semantically self-contained, short enough that its words and its embedding are con-

1^{1}We use the term ‘text segment’ to refer generally either to a document in its entirety or to a part of it.

cerned with a common theme, and numerous enough within a document that assigning a topic to each sentence reveals how topics are distributed throughout the text. Most importantly, at the sentence level, lexical and contextual evidence became available at the same textual unit. While sentence-level topic models have been proposed in the past (Balikas et al., 2016; Cha and Lee, 2024), each model still relies on a single type of evidence for topic assignment. To fill this gap, we make the following contributions.

(i) We introduce SentenceETM, a neural sentence-level topic model that jointly uses lexical and contextual evidence to assign a topic to each sentence. Each topic is characterized by both a distribution over the vocabulary, defined via word embeddings, and a region of the sentence-embedding space, modeled as a Gaussian concentrated on a topic-specific low-dimensional subspace, thereby keeping the model tractable in the high-dimensional space of sentence encoders. Each sentence draws a topic from the document's topic proportions, and that topic generates both the sentence's words and its contextual embedding. The sentence topic is marginalized exactly, so that its posterior combines the two sources of evidence, and the parameters of the contextual side are estimated in closed form.

(ii) We present a novel evaluation pipeline for sentence-level topic models. We build synthetic corpora from existing topic-labeled document collections, in which every sentence has a known topic and document-level topic mixtures are controlled by construction.

(iii) We show that SentenceETM can be adapted to different domains through an interchangeable sentence encoder, without modifying the generative model. We illustrate this on the transcript of a televised presidential debate. The sentence-level representation allows us to examine how candidates distribute topics within the same debate segment and how frequently new topics are introduced during speaking turns.