Anchor Words for Short Texts: Borrowing Context Across Documents, Never Across Words

Anchor-word topic models find topics by geometry rather than by sampling. Each topic is assumed to have at least one "anchor word" that appears in that topic and in no other. Under this assumption, the topics sit at the corners of a cloud of points built from word co-occurrence statistics, and a fast greedy algorithm with provable guarantees can locate those corners. The method breaks down on short texts such as tweets, question titles, and search snippets. An eight-word document contributes almost no word pairs, so the co-occurrence matrix is too noisy for the corners to be found. The method also requires the number of topics $K$ to be fixed in advance. Short-text neural topic models get around sparsity by borrowing words from semantically similar documents found with pretrained encoders. These models, however, give up both the guarantees and any principled way to choose $K$. A recent attempt to feed language-model-smoothed targets into a geometric solver failed outright.

We propose one rule that explains when outside knowledge helps or hurts geometric topic recovery: external knowledge may decide which documents share context, but it must never decide which words are similar. Pairing words across semantically neighboring documents enlarges the co-occurrence sample while leaving the word-topic matrix, and therefore the anchors, mathematically intact. Smoothing words with embeddings mixes the rows of that matrix and erases the corners. Because the enlarged sample has a measurable noise level, the same greedy procedure that finds anchors can also decide when to stop: it halts when the next candidate corner is no farther out than resampling noise would produce. The deliverable is an anchor algorithm for short texts that chooses $K$ from the data, and that is predicted to degrade gracefully, not drift, when the external knowledge is wrong.

Core Claim

In the separable model of Learning Topic Models - Going beyond SVD and A Practical Algorithm for Topic Modeling with Provable Guarantees, the expected word-word co-occurrence matrix factors as $Q = A R A^\top$. Here $A$ is the $V \times K$ word-topic matrix ($V$ is vocabulary size) and $R$ is the $K \times K$ matrix of topic co-occurrence. The anchors are rows of $A$ with a single nonzero entry.

Suppose each short document $d$ has neighbors $\mathcal{N}(d)$, found with a pretrained sentence encoder. We form a cross-document co-occurrence estimate

$$ \hat Q_{\text{aug}} = \frac{1}{Z}\sum_{d}\sum_{d' \in \mathcal{N}(d)\cup\{d\}} \omega_{dd'}\, x_d\, x_{d'}^\top , $$

where $x_d$ is the word-count vector of $d$, $\omega_{dd'}$ is a neighbor weight, and $Z$ normalizes the total mass. The within-document diagonal is corrected in the standard way. If words in different documents are drawn independently given each document's topic mixture $\theta$, the expectation of a cross pair is $A\,\theta_d\theta_{d'}^\top A^\top$. Summing over pairs gives

$$ \mathbb{E}[\hat Q_{\text{aug}}] = A\, \tilde R\, A^\top, \qquad \tilde R = \tfrac{1}{Z}\textstyle\sum \omega_{dd'}\, \mathbb{E}[\theta_d \theta_{d'}^\top]. $$

The word-topic matrix $A$ is unchanged, so separability and the anchors survive. External knowledge enters only through $\tilde R$. Good neighbors make $\tilde R$ close to diagonal and well conditioned. Bad neighbors push $\tilde R$ toward the rank-one matrix $\bar\theta\bar\theta^\top$, where $\bar\theta$ is the corpus-average mixture. That loses resolution but does not bias $A$.

By contrast, word-side smoothing of the form $S\hat Q S^\top$, where $S$ is a word-similarity kernel from GloVe or a knowledge graph, has expectation $(SA)R(SA)^\top$. Every anchor row of $SA$ becomes a blend of several topics, so the corners disappear. This is our proposed explanation for the "target-solver mismatch" reported in Improving Topic Modeling by Distilling Soft Labels from Language Models, and it is directly testable.

The second component is selecting $K$ inside the anchor geometry. Greedy anchor search repeatedly picks the row of the row-normalized matrix that is farthest from the span of the anchors already chosen. Let $r_k$ be that distance at step $k$. We stop at the first $k$ where $r_k$ falls below $\tau_k$, the upper quantile of the same distance under a document-level bootstrap of $\hat Q_{\text{aug}}$. The idea is that a true new corner should remain far out under resampling, while a noise corner should not. The bootstrap is cheap because only the low-rank projections need recomputing. Cross-document pairing should lower $\tau_k$ by roughly the square root of the gain in pair count, from about $L^2$ pairs per document of length $L$ to about $|\mathcal{N}(d)|\,L^2$. This is the standard averaging argument, and it predicts that the method can resolve more topics as neighbors are added, until neighbor quality starts to flatten $\tilde R$.

Relation to Prior Work

Three geometric lines supply the machinery. The greedy anchor algorithm of A Practical Algorithm for Topic Modeling with Provable Guarantees provides the corner search and its guarantees. On-the-fly Rectification for Robust Large-Vocabulary Topic Inference (LR-JSMF) provides low-rank rectification of noisy co-occurrence matrices without building the dense $V\times V$ matrix. We reuse it unchanged on $\hat Q_{\text{aug}}$, because rectification addresses noise but cannot create co-occurrence that a sparse corpus never recorded. Low-dimensional Embeddings for Interpretable Anchor-based Topic Inference shows that greedy search in high dimension favors rare, bursty words, and fixes this with 2D/3D convex hulls that cap the number of topics. Our bootstrap threshold attacks the same failure differently: a bursty word's distance from the span is unstable under resampling. We will measure whether this removes the need for low-dimensional projection.

On choosing $K$, Geometric Dirichlet Means Algorithm for topic inference (nGDM) is the only geometric method in the file that estimates $K$. It penalizes polytope vertices over document points, and its guarantees require long documents because short documents collapse onto simplex edges. We work in word space, where cross-document pairing restores statistical support, and we replace a tuned penalty with a resampling threshold. Anchor-Free Correlated Topic Modeling: Identifiability and Algorithm relaxes the anchor assumption but concedes that its correlation estimates are unreliable on tweets. This motivates our focus on estimating the statistic well rather than on weakening the assumption.

Four short-text papers motivate the document-side principle and constrain it. Combating Label Sparsity in Short Text Topic Modeling via Nearest Neighbor Augmentation (kNNTM) and GloCOM: A Short Text Neural Topic Model via Global Clustering Context already borrow words from neighbors or clusters. They do so inside neural autoencoders with a fixed $K$ and no identifiability. We move the same intuition into a second-moment estimator where its effect can be stated exactly. DSL is the cautionary case: dense language-model targets broke a geometric solver, and our analysis predicts that this happens because the smoothing acts on the word side. Short Text Understanding by Leveraging Knowledge into Topic Model argues that external knowledge bases inject noise into short-text topics. Our formula agrees for word-side knowledge and predicts the opposite for document-side knowledge, where noise flattens $\tilde R$ instead of corrupting $A$. Earlier knowledge-integrated models, namely Incorporating Knowledge Graph Embeddings into Topic Modeling, Incorporating Word Correlation Knowledge into Topic Modeling, and OTLDA: A Geometry-aware Optimal Transport Approach for Topic Modeling, all inject word-level similarity into a likelihood or transport cost with a fixed $K$. They are the word-side family whose geometric consequence we test. The closest combination of anchors with neural context, Unsupervised Hierarchical Topic Modeling via Anchor Word Clustering and Path Guidance, uses fixed branching and evaluates only on long texts.

Research Program

The first component is the estimator and its analysis. We will derive the bias and variance of $\hat Q_{\text{aug}}$ as functions of neighbor count, neighbor purity, and document length, and state when $\tilde R$ remains invertible enough for recovery. Neighbor purity means the expected overlap of topic mixtures between a document and its neighbors.

The second component is the stopping rule. We will characterize $\tau_k$ under document resampling and prove, at least for the population-level separable model, that the rule recovers the true $K$ once the noise floor falls below the smallest true corner distance.

The third component is the implementation. We will pair LR-JSMF rectification with approximate nearest-neighbor search over sentence-encoder embeddings. This avoids the optimal-transport neighbor cost that makes kNNTM expensive. The per-topic word distributions are then recovered from the anchors in the usual way, and document mixtures are inferred afterward.

The fourth component is a controlled study of neighbor quality. We will interpolate neighbors from encoder-chosen, through partially shuffled, to random, and verify the predicted pattern: resolution is lost gracefully, and anchor identity is preserved.

Baselines

The naive reference point is the standard greedy anchor algorithm with LR-JSMF rectification on the raw within-document co-occurrence matrix of each short corpus, run at the true label count and at $K\in\{50,100\}$. We expect it to produce duplicated and bursty topics, and every other method must clear it.

The strongest existing short-text competitors are neural models with a fixed $K$. kNNTM reports a top-NMI of 0.440 on StackOverflow at $K=100$ versus 0.393 for its best baseline, and a topic quality of 0.365 on SearchSnippets at $K=50$. GloCOM reports a clustering NMI of 0.817 on GoogleNews, above kNNTM's 0.795. Mitigating Data Sparsity for Short Text Topic Modeling by Topic-Semantic Contrastive Learning (TSCTM) reports $C_V$ coherence of 0.445 and purity of 0.610 on TagMyNews at $K=50$. DSL reports StackOverflow purity rising from 0.265 for ProdLDA to 0.803, using a small language model at training time. All of these will be rerun from public code on identical preprocessing and vocabulary, using the same sentence encoder wherever the method uses one. Each method gets a matched hyperparameter search budget, with a grid of equal size per method, and results are reported over five seeds.

Because our method chooses $K$ itself, we compare in two ways. First, we compare at the competitors' $K$ by forcing our method to run to that $K$. Second, we compare at our chosen $K$ against each competitor's best $K$ selected on held-out coherence. Beating the neural models outright on NMI is not required for the claim. The claim is supported if our method matches kNNTM and GloCOM within their seed variance on NMI and coherence, while also selecting $K$ without tuning, running in a fraction of their training time, and keeping anchors stable across resamples. Clearly exceeding 0.440 NMI on StackOverflow would be a bonus. DSL is reported separately, because it uses a language model at training time, which our method does not.

For choosing $K$, the baselines are nGDM with its penalty tuned on held-out data, and a held-out-likelihood sweep over $K$ with the plain anchor algorithm. The file contains no reported number for nGDM on short texts.

Three ablations isolate the key ingredient. The word-side arm replaces cross-document pairing with embedding smoothing $S\hat Q S^\top$, built from GloVe and from WordNet neighbors, at matched total mass. The pooling arm concatenates K-Means clusters of the encoder embeddings into pseudo-documents, GloCOM-style, before running the anchor algorithm. The random-neighbor arm keeps the pair count but destroys semantic neighbor choice.

Why not just…?

Why not just pool short texts into pseudo-documents by clustering and run the ordinary anchor algorithm? This is the most serious threat. Hard pooling is a special case of our estimator, with block-structured weights, and it also leaves $A$ intact. GloCOM's need for a separate local document variable suggests that hard pooling blurs individual documents, but that evidence comes from a neural model, not from anchor recovery. The pooling ablation settles the question. If pooling with a tuned cluster count ties soft neighbor pairing, we will report pooling as the recommended estimator. The contribution then rests on the document-side versus word-side result and on the stopping rule, both of which apply to pooling equally.

Why not just smooth the co-occurrence matrix with word embeddings or a knowledge graph? Our analysis predicts that this specifically destroys anchors, and DSL's reported failure of a geometric transport solver on dense targets is consistent with that prediction. The word-side ablation tests it directly. We will measure anchor-word overlap with the ground-truth anchors in semi-synthetic data, and the rate of duplicate topics. If word-side smoothing recovers anchors as well as document-side pairing does, our central claim is false, and we will say so.

Why not just use a hierarchical Dirichlet process to get an unbounded number of topics? It is a reasonable reference, but the file contains no reported short-text result for it. The file does report that Gibbs-sampled LDA has erratic coherence across $K$ on short reviews (PTM), and that sampling took 10.5 minutes against 50 seconds for geometric inference on NIPS (GDM). We will include a Gibbs-sampled HDP run under a matched wall-clock budget and compare both the number of topics it infers and its coherence, rather than relying on these indirect arguments.

Why not just use kNNTM or GloCOM with a sweep over $K$? Sweeping multiplies their already high training cost, and it still yields no identifiability or anchor stability. The matched-budget comparison above reports quality, the cost of selecting $K$, and anchor stability across bootstrap resamples. If the neural sweep wins on quality at comparable cost, our method's remaining value is speed and interpretability, and we will state that limitation plainly.

Proposed Experiments

The decisive experiment is semi-synthetic, where the truth is known. We fit a separable model with known anchors and known $K\in\{20,50,100\}$ on long corpora: 20NG and the NYT corpus used by LR-JSMF. We then sample short documents of length 5 to 20 and measure recovery error of $A$, anchor precision, and the error in estimated $K$, while varying neighbor count and neighbor purity. Three predictions follow from the analysis. Document-side pairing should cut recovery error relative to raw co-occurrence as neighbor count grows. Word-side smoothing should raise anchor error even as it reduces variance. Random neighbors should drive the selected $K$ down toward one rather than producing wrong anchors.

The real-data experiments use StackOverflow, GoogleNews, SearchSnippets, TagMyNews, Twitter, and 20NGshort. We report NPMI and $C_V$ coherence, topic diversity, the topic-quality measure used by kNNTM, clustering NMI and purity of inferred mixtures against labels, and wall-clock time. For estimated $K$, the label counts give a sanity range, not a target, because labels and topics need not coincide. Selection is therefore judged mainly by whether coherence and NMI at the chosen $K$ fall within seed noise of the best $K$ found by sweeping.

A final stress test addresses PTM's concern about external noise. We swap the general sentence encoder for an off-domain one and check that our method degrades less than the word-side knowledge baselines on the online-review and biomedical short-text sets. If it does not, the robustness argument fails.