Shift or New Topic? Forward-Only Topic Tracking on Frozen Text Encoders

A deployed system that groups a stream of short texts (tweets, headlines, queries) into topics is disturbed by two kinds of change, and they call for opposite responses. Sometimes the way people write shifts: new slang, a new platform style, or a cheaper quantized encoder swapped in on a device. Every text then lands somewhere slightly different in embedding space even though the subjects are unchanged, and the right response is to correct the geometry and leave the topics alone. At other times something new is being discussed, and the right response is to open a new topic. Current methods cannot distinguish the two. Test-time adaptation methods, which recalibrate a frozen model's features from unlabeled data during inference, treat every change in the average embedding as a domain shift. Streaming topic models with a growing number of topics treat every unfamiliar region as a new topic.

We propose a forward-only topic tracker that runs on top of a frozen sentence encoder. It assigns each document to exactly one topic drawn from a fixed-size bank of slots, and it separates the two kinds of change in closed form. A shared geometric shift is estimated from how documents deviate from the centers of the topics they are confidently assigned to, not from how the overall embedding mean moves. Only mass that stays unexplained after this correction may claim a new slot. Old slots fade through evidence-weighted forgetting and are recycled, so memory stays fixed. The central claim is that estimating the shift inside the mixture, rather than on the pooled stream, lets one system avoid both failure modes: it does not spawn spurious topics under pure style shifts, and it does not erase real topic trends the way global feature alignment does. It also needs no backpropagation and no iterative sampling.

Where the four directions meet, and what is missing

Streaming short-text topic models already combine temporal smoothing with one topic per document. Temporal smoothing here means carrying the previous time window's topic estimates forward as a prior for the next. The Dynamic Clustering Topic model (Dynamic Clustering of Streaming Short Documents) assigns each document a single topic and derives Dirichlet priors for window $t$ from the posteriors of earlier windows. It fixes the number of topics for the whole timeline, and its authors name this as the limitation that forces new content into old topics. The Twitter tracking models (Online topic model for Twitter considering dynamics of user interests and topic trends, TimeUserLDA) make the same fixed-count assumption. Two models relax the count with Dirichlet-process mixtures, which open a new cluster whenever a document fits no existing one well enough. The first is OSDM (An Online Semantic-enhanced Dirichlet Model for Short Text Stream Clustering), which adds exponential decay and evicts inactive clusters. The second is TSDPMM-L (TSDPMM), which seeds each window with the previous one's posteriors. These papers motivate the proposal, since they show that single-topic assignment with temporal priors works on short streams. All of them, however, run on bag-of-words counts, and none can tell a change in writing style from a change in subject. For word-count models the distinction barely exists. For a frozen neural encoder it is central.

The gradient-free test-time adaptation literature supplies our correction machinery. UMFC (UMFC) subtracts domain bias vectors from vision-language embeddings. PEA (Architecture-Agnostic Test-Time Adaptation via Backprop-Free Embedding Alignment) models shift as translation, scaling and rotation, and undoes it with a whitening-coloring transform stabilized by moving averages. Both estimate the shift from pooled target statistics. That is safe for classification over fixed classes, but it is exactly wrong for topic streams, where the pooled mean moves whenever topic proportions change. This is the main design constraint the proposal answers.

BTTA-DG (Bayesian Test-Time Adaptation via Dirichlet Feature Projection and GMM-Driven Inference) and BCP (Multi-Label Test-Time Adaptation with Bayesian Conditional Priors) show that closed-form Bayesian updates of running statistics can replace gradient steps. BTTA-DG fits a Gaussian mixture over Dirichlet-projected predictions from a memory bank. BCP corrects logits using running label co-occurrence counts. Both keep a fixed label set, and BTTA-DG reports that its density estimates degrade under class imbalance, which is the normal state of a bursty topic stream. TDA's cache of confident examples (Efficient Test-Time Adaptation of Vision-Language Models) degrades when wrong pseudo-labels accumulate. This constrains how we update slots: we gate updates by confidence and never let a single hard assignment write its full weight.

We treat the fixed topic count as a deployment constraint rather than a flaw. The file notes that a variable number of topics conflicts with static tensor compilation and edge runtimes. We therefore keep a fixed array of $K_{\max}$ slots and let topics be born and die inside it.

Core Mechanism

A frozen encoder maps each document to a unit vector $x$. Each slot $k$ holds a mean direction $\mu_k$, a spread, and a decayed pseudo-count $n_k$ that plays the role of the Dirichlet prior mass carried from window to window. Each document gets a single hard topic label for output. The count and mean updates, however, use the posterior responsibility $r_{dk}$, the model's probability that document $d$ belongs to slot $k$, and only when this exceeds a confidence gate. This limits the damage from a wrong hard assignment, a known weakness of single-topic models.

The shift estimate is the key ingredient. In window $t$, let $C_t$ be the set of confidently assigned documents. The shared translation is the responsibility-weighted average of within-topic residuals:

$$ \hat{b}_t = \frac{\sum_{d \in C_t} \sum_k r_{dk}\,(x_d - \mu_k)}{\sum_{d \in C_t} \sum_k r_{dk}}. $$

Because each residual is measured against the document's own topic, a change in how often topics occur leaves $\hat b_t$ unchanged, while a change in style that moves all topics together shows up in it. Incoming embeddings are corrected by subtracting a smoothed $\hat b_t$ and renormalizing. A diagonal scale term is estimated the same way. Full rotation is deferred unless the diagnostics call for it.

Forgetting is per slot, not global. Each window, $n_k \leftarrow \lambda_k n_k + \sum_d r_{dk}$. Here $\lambda_k$ is the retention factor for slot $k$, set in closed form from how well slot $k$ predicted its recent documents compared with its long-run average. A slot that keeps predicting well keeps its memory. A slot whose documents have become surprising forgets faster. This targets the decay-rate brittleness that both the test-time adaptation and topic-smoothing literatures list as open.

Documents that still have low likelihood under every slot after correction go into a small candidate buffer. A new topic is born only when a compact group of at least $m$ buffered documents forms. It takes the slot with the lowest $n_k$, and that slot's old contents are retired. The minimum-size and compactness requirement suppresses the singleton over-proliferation that Dirichlet-process mixtures show under noise. Every operation is a forward pass plus $O(K_{\max})$ arithmetic per document.

Research Program

We will build the tracker with two frozen encoders. The first is a general sentence encoder. The second is the tweet-adapted RoBERTa from TweetEval, which reports a global score of 65.2 against 61.3 for generic RoBERTa, evidence that encoder domain matters for tweets. We will first measure the confound directly. On streams whose topic mix changes over time but whose style does not, we compare the pooled-mean shift that PEA or UMFC would estimate with the within-topic estimate $\hat b_t$. The within-topic estimate should stay near zero while the pooled estimate should not. We then ask whether per-slot adaptive forgetting removes the need to tune a global decay rate, by sweeping stream speed. Finally, we check whether the slot budget $K_{\max}$ can be set loosely, somewhat above the true number of active topics, without hurting quality.

Baselines

The naive reference point is a frozen-encoder system that does nothing at test time. It runs k-means on the first window and assigns later documents to the nearest fixed center. This measures how much any adaptation helps.

The strongest existing method is OSDM (An Online Semantic-enhanced Dirichlet Model for Short Text Stream Clustering). It is the only method in the file that already combines single-topic streaming, decay-based forgetting and a variable number of topics, and it reports Homogeneity of 0.951 on the News stream against 0.833 for Dynamic Topic Models. The file gives no exact NMI numbers for OSDM on News, Reuters or Tweets, so we will rerun OSDM ourselves on identical stream orderings. We will tune its decay rate and spawning threshold with the same grid budget that we give our own few hyperparameters, and report NMI together with the number of clusters produced.

Beating OSDM means higher NMI on the bursty streams News-T and Reuters-T at a comparable or smaller cluster count. Homogeneity alone does not count, because it rewards over-splitting. We also require a clear win on the injected-shift streams described below.

We add a gradient-free adaptation baseline built from our own backbone. It applies a PEA-style whitening-coloring alignment of the pooled stream statistics (PEA) and then uses the same slot mechanism. This tests the claim that pooled alignment harms topic tracking.

Three ablations isolate the ingredients. The first removes the shift term $\hat b_t$ and is the key test. The second replaces per-slot forgetting with one global decay rate, tuned on held-out streams. The third disables births, which yields a fixed-count temporally smoothed model in the spirit of DCT and serves as the fixed-cardinality comparison.

All methods see the same documents in the same order, use the same encoder where applicable, and run on the same CPU. We report per-document latency and peak memory.

Why not just…?

Why not just run online DP-means with moving-average centers on the embeddings? This is the most serious threat. It is almost our method with the shift term and the birth buffer removed, and on clean streams it may match us. The difference should appear only under style or encoder shift, where every document suddenly looks far from all centers and a distance threshold will open many spurious topics. The shift-injection experiment settles this. If DP-means with moving averages produces no more spurious births than our method there, our central claim fails and we will say so.

Why not just use OSDM, which already handles topic birth and decay? OSDM works on word co-occurrence and term weighting. Its similarity is therefore unaffected by embedding shift, but it also cannot use pretrained semantics, and it depends on hand-tuned thresholds that the file notes struggle with uneven stream speed. Its reported 0.951 Homogeneity on News may be near the ceiling for that metric, so beating it on News is not guaranteed. Our decisive comparisons are NMI on the bursty variants and robustness to style perturbations that fragment word counts, such as casing, abbreviations and hashtags.

Why not just apply existing backprop-free feature alignment and then cluster? PEA and UMFC estimate the shift from pooled statistics. When a topic surges, the pooled mean moves toward it, and alignment partly subtracts the very trend we want to detect. The confound measurement and the pooled-alignment baseline test this directly. We expect estimated topic proportions under pooled alignment to track true proportions worse than ours on News-T, where topics dominate briefly and then vanish.

Why not let the number of topics grow freely instead of using a slot budget? On a server this is reasonable. The fixed budget is justified by static-memory deployment rather than by accuracy. We will therefore also report an unbounded variant, so readers can see what the budget costs.

Proposed Experiments

We will use the News (11,109 titles, 152 topics), Reuters (9,447 documents, 66 topics) and Tweets (30,322 posts, 269 topics) streams, and the bursty reorderings News-T and Reuters-T, all from the OSDM paper. We will also use 20 Newsgroups and Reuters-21578 processed sequentially, as in TSDPMM, which reports a 5.8% relative NMI gain over plain Dirichlet-process mixtures. The 369-million-tweet stream used for DCT has relevance judgments we cannot reproduce, so it is out of scope. The file reports no result for any frozen-encoder method on these streams.

To test the shift-versus-new-topic distinction, we inject controlled label-preserving shifts partway through each stream. Two are text transformations: lowercasing with punctuation removed, and hashtag or abbreviation insertion. The third swaps the encoder for an 8-bit quantized copy mid-stream, a realistic edge-deployment shift that changes geometry but not meaning.

The metrics are NMI and Homogeneity over sliding windows, the number of active topics compared with the ground truth, spurious births per injected shift, birth latency (the number of documents before an emerging topic gets its own slot), the correlation between estimated and true topic proportions, per-document latency, and peak memory.

The decisive checks are three. First, under injected shifts with no new topics, our method should produce far fewer spurious births than OSDM and online DP-means while keeping NMI near its pre-shift level. Second, on News-T and Reuters-T, it should give new topics their own slots faster and reach higher NMI than the no-birth fixed-count ablation. Third, removing $\hat b_t$ should reproduce the spurious-birth failure, and replacing it with pooled alignment should reduce the correlation with true topic proportions. If only the first two hold, the gain comes from forgetting and births rather than from separating shift from novelty, and the paper's claim narrows accordingly.