Telling Excursions from Moves: A Switching Filter for Where People Go Next

Next-place predictors fail at the moment they matter most: when a person goes somewhere they have never been. When a stress test raised simulated users' exploration rate to one new place in every two visits, a standard self-attention predictor fell from 55.8% to 9.0% accuracy (A causal intervention framework for synthesizing mobility data and evaluating predictive neural networks). Two partial fixes exist. One routes each step through a classifier that guesses "routine or exploration" (CEPR). The other gives places continuous embeddings, so an unvisited venue can still be scored (Into the Unknown). Neither answers the question that decides what the predictor should do next: is this new place a one-off excursion, after which the person returns to their old habits, or the start of a lasting change in taste or home base? Treating every novel visit the same way forces a bad trade. Either old habits get forgotten too fast, or real change gets absorbed too slowly.

We propose to track that distinction explicitly. Each user's taste is a point in the space of place embeddings and is split into two parts: a slowly drifting core and a temporary excursion offset. A small discrete hidden "mode" (routine, excursion, or lasting shift) decides which part absorbs the evidence from each visit and how quickly the offset fades. Given the mode history, the taste vector follows simple linear-Gaussian dynamics, so it can be updated exactly with a Kalman filter, while particles track only the mode. This is the classic Rao-Blackwellized particle filter construction: sample the hard discrete part, solve the easy continuous part in closed form. The output is a calibrated probability for every candidate venue, including unvisited ones, from which a top-k list follows directly.

Core Claim

A mode-switching state-space model can do something a single forgetting rate cannot. Exponential recency discounting, used for pairwise preferences in Right Now, Wrong Then, applies one decay constant to all past evidence. A fixed fast/slow average applies two constants, but always in the same way. Our filter instead decides, step by step and with stated uncertainty, whether new evidence is transient or durable. The specific, testable prediction is this. When exploration bursts and permanent relocations look identical at onset, the switching filter will recover faster than fixed-gain alternatives after a permanent shift. It will also forget less of the old routine after a temporary burst. And it will match an embedding-based neural predictor in ordinary, stable periods. If a well-tuned two-timescale average matches it, the discrete mode is not earning its keep, and we will report that.

Model

Let $c_t$ be the user's core taste vector and $e_t$ their excursion offset, both in the $d$-dimensional embedding space of a frozen inductive place encoder. We use CaLLiPer, which aligns coordinates and venue text through contrastive learning (Into the Unknown). Let $m_t \in \{\text{routine}, \text{excursion}, \text{shift}\}$ be the hidden mode. The dynamics are

$$c_{t+1} = c_t + w^c_t,\quad w^c_t \sim \mathcal{N}(0, q_c(m_t) I), \qquad e_{t+1} = \rho(m_t)\, e_t + w^e_t,\quad w^e_t \sim \mathcal{N}(0, q_e(m_t) I),$$

where $q_c(m)$ and $q_e(m)$ are mode-dependent noise levels and $\rho(m)$ is the offset's persistence. The core's noise level is large only in shift mode. The offset persists during an excursion and decays toward zero once routine resumes. The mode follows a sticky Markov chain.

When a visit is to a new place, the chosen place's embedding $y_t$ is treated as a noisy reading of current taste:

$$y_t = c_t + e_t + v_t, \qquad v_t \sim \mathcal{N}(0, r I).$$

How that reading is split between core and offset depends on the mode, through the dynamics above. Because this observation is linear and Gaussian, the update of taste given the mode history is an exact Kalman step.

Particle weights use the actual choice probability. In routine mode, that is a per-user Markov model over places already visited. In the two exploratory modes, it is a softmax over unvisited candidates, scored by inner product with the predictive taste mean, with a variance correction. This split is deliberate. It keeps the continuous update exact while the weights reflect the real discrete choice. An ablation replaces the Gaussian proxy with a Laplace-approximated softmax update, to measure what exactness costs or buys.

Two side benefits follow from the construction. First, the Kalman covariance depends only on the mode sequence, not on the observed embeddings. Particles that share a recent mode history therefore share covariances, which can be cached. This sidesteps the per-particle covariance cost that The marginalized particle filter identifies as the main expense of these filters. Second, the filter yields a posterior probability that the current step is exploratory. That gives a direct, graded replacement for CEPR's hard binary router, which errs about 20% of the time.

Ranking enters as a constraint, not as the core. Scoring many candidate venues naively invites reasoning over all orderings, an $n!$ space that the Mallows literature handles only with top-k truncation (Mallows Models for Top-k Lists) or factorized approximations (Pseudo-Mallows). For a single next visit, Recall@k and NDCG@k with one relevant item depend only on each venue's probability of being chosen. The best list is therefore simply the venues sorted by their predictive probability under the particle mixture. We state this reduction explicitly and do not build a distribution over orderings. Listwise drift over multi-item sessions, where the factorial structure would genuinely bite, is left as future work.

Relation to Prior Work

Three groups of prior work bear on this, each in a different role.

Two papers motivate the gap. CEPR and HGARN both separate returns from exploration, using a hard classifier and a heuristic history-confidence label respectively. HGARN's authors concede the model weakens on unseen places, and neither paper carries uncertainty or distinguishes durable from transient change.

Two papers supply the method, but only for fixed targets. Goal inference with Rao-Blackwellized Particle Filters marginalizes an agent's motion with a Kalman filter while sampling its single fixed goal. Learning and Inferring Transportation Routines runs a hierarchical filter over GPS data and flags novel behavior against a generic prior. Both assume a stable set of destinations, and the second was evaluated on one user. We keep their construction but let the target itself, the user's taste, drift, and we score destinations never seen before.

Two papers constrain the design. Revealing an Inherently Limiting Factor reports Scouters (heavy explorers) at often below 20% next-place accuracy, with removal of exploration visits lifting this above 70%. The tension it raises with CaLLiPer's inductive gains is that exploration may be partly predictable from place embeddings but never fully. Our evaluation therefore reports exploration steps separately and does not claim to break this ceiling.

Research Program

We first fit the filter's few parameters per dataset by maximizing the filter's own marginal likelihood on training users: the three mode-transition rates, the noise levels, the persistence values, and $r$. The filter's marginal likelihood is a standard by-product of particle filtering. The embedding encoder stays frozen and is shared with the strongest baseline, so any gain comes from the inference, not the representation.

We then run the filter online on held-out users with a fixed particle budget. We study how accuracy and calibration scale with particle count, and we compare against an otherwise identical filter that samples the taste vector directly instead of marginalizing it.

Finally, we build controlled stress tests with the DT-EPR simulator, a mechanistic generator of exploration and return behavior calibrated on real GNSS tracks (A causal intervention framework). We add one intervention the original framework lacks: matched pairs of transient exploration bursts and permanent relocations that begin identically and diverge only afterward. These pairs isolate the question of whether the filter attributes evidence to the right part of the taste vector.

Baselines

The naive reference point is a per-user second-order Markov model over visited places. It cannot assign any probability to unvisited venues, so its accuracy on exploration steps is zero by construction. That makes it the floor that shows how much of each dataset is exploration.

The strongest existing method on unvisited places is CaLLiPer (Into the Unknown). It feeds inductive embeddings into a self-attention sequence model. On the Gowalla inductive split, with 10% of locations held out, it reports relative gains of +11.22% to +16.73% over CTLE and TALE across Acc@k and MRR. No absolute Acc@k or MRR value for CaLLiPer was found on Lacuna, so we will reproduce it on identical splits and report both numbers ourselves. It receives the same frozen encoder, the same training users, and a tuning budget matched in GPU-hours to our parameter fitting plus particle-count sweep. Beating it means higher Acc@5 and MRR on exploration steps of the inductive split with no loss on routine steps, averaged over five seeds with paired bootstrap intervals.

On the stress-test setting the reference figures are self-attention at 55.8% under the training distribution and 9.0% at exploration probability 0.5, and an LSTM falling from 55.0% to 7.9% (A causal intervention framework). We will rerun these models on our generated agents rather than reuse the figures. A meaningful result is degrading far less than this collapse at 0.5. A stronger one is beating a self-attention model that was itself trained under randomized exploration rates.

For routing, the baseline is a CEPR-style classifier (CEPR), trained on the same features of unique-place count, visit entropy, and novelty of the previous check-in. It is scored against our mode posterior by exploration-detection error, with CEPR's reported error of around 20% as context. HGARN (Activity-Aware Human Mobility Prediction) is included on Foursquare NYC and Tokyo, where it reports 12–19% and 11–20% gains on Recall@K and NDCG@K. Those gains are reported over its own baselines and are not absolute numbers.

Three ablations isolate the key ingredient. The first is a single-gain exponential average of chosen embeddings, the NS-DPO-style forgetting rule. The second is a two-timescale fast/slow average with tuned fixed gains. The third is our filter with the mode fixed to "excursion always," which equals a two-component Kalman filter without switching. A further ablation drops the Rao-Blackwellization at equal particle counts, and another swaps the Gaussian proxy update for a Laplace softmax update.

Why not just…?

Why not just use a fast and a slow moving average of embeddings? This is the most serious threat. A two-component Kalman filter with fixed noise settles to exactly such fixed-gain averaging, so on steady data the two should tie. The case for switching rests entirely on onsets where a burst and a relocation look alike. The matched burst/relocation interventions measure this directly, through time to recover after a relocation and accuracy lost on old routines after a burst. If the two-timescale average is within confidence intervals of the filter on both, we will conclude the discrete mode is unnecessary and say so.

Why not just train a Transformer on data with varied exploration rates? The 9.0% collapse in A causal intervention framework came from training at one distribution and testing at another. Training across many exploration rates might remove most of it. We therefore include CaLLiPer-style self-attention trained under randomized exploration rates as a baseline. The filter's remaining argument is per-user adaptation online with calibrated uncertainty and an explicit exploration probability. That argument holds only if the filter's calibration and post-shift recovery beat this baseline, which we test.

Why not just fix CEPR's router with a better classifier? A better classifier still makes a hard decision at every step and still cannot say whether an exploration is durable. The classifier and the filter's mode posterior are compared on the same features and the same steps. The routing-error comparison and the burst-versus-relocation test separate these two issues.

Why not just apply NS-DPO-style discounting? NS-DPO works on pairwise comparisons with a single decay set from an assumed amount of drift (Right Now, Wrong Then). Its natural analogue here is the single-gain average ablation, which we expect to trade routine retention against responsiveness to change along one curve. The filter should sit off that curve.

Proposed Experiments

The decisive check is the matched burst/relocation study on DT-EPR agents calibrated to the SBB Green Class tracks. We report accuracy over a window after onset, the steps needed to regain pre-intervention accuracy after a relocation, and the accuracy retained on returns to old anchors after a burst. Results are given for the switching filter, both fixed-gain averages, and the variance-trained Transformer. Success means the filter is the only method that does well on both halves of the matched pairs.

On real data, we report Acc@1, Acc@5, and MRR on the Gowalla inductive split and on Foursquare NYC and Tokyo, always broken down into routine and exploration steps. We separately report per-user results for Scouters, Regulars, and Routiners on the aggregated GPS data (Macaco, Privamov, Geolife), using the user typology of Revealing an Inherently Limiting Factor. There, the honest target is gains for Scouters on the exploration steps, not a claim to beat the predictability ceiling.

Calibration of the predicted probabilities, measured by expected calibration error and negative log-likelihood, and calibration of the mode posterior are reported throughout. Wall-clock cost per update with and without covariance caching addresses deployability.

A negative result on the matched-pair study would be informative on its own terms. It would show that, for human mobility, a correctly tuned forgetting rate is all the "drift model" one needs.