Predicting "when" and "where" an event will happen is a cornerstone of modern data science, with applications ranging from earthquake monitoring to crime prevention and high-frequency trading. These phenomena are typically modeled using Spatio-Temporal Point Processes (STPPs). However, most existing neural STPPs suffer from a major flaw: they excel at providing a single "best guess" (point prediction) but struggle to quantify their uncertainty.
A new paper introduces SMASH (Score MAtching-based pSeudolikeliHood), a framework that moves beyond simple point predictions to provide robust uncertainty quantification using score-matching techniques.
The Challenge of Traditional STPPs
Traditional STPP models usually attempt to maximize the log-likelihood of the data. To achieve this, the model must calculate a normalization term—essentially an integral of the event intensity over all possible times and locations.
For complex neural networks, this integral is intractable. Researchers typically resort to one of two compromises:
- Simplification: Using restrictive distributions (like Gaussian Mixtures) that are easy to integrate but fail to capture the messy reality of real-world data.
- Approximation: Employing numerical methods like Monte Carlo integration, which are computationally expensive and introduce approximation errors.
Furthermore, most models only output a single coordinate and timestamp. In high-stakes scenarios—such as predicting the location of a crime or the timing of an earthquake—a single point is insufficient. We need "error bars" (confidence intervals) to understand the inherent randomness of the process.
The SMASH Approach
The authors propose SMASH, which sidesteps the integration problem entirely by utilizing Score Matching.
1. Score Matching vs. Likelihood
Instead of trying to model the probability density directly (which requires the intractable normalization constant), score matching models the score function—the gradient of the log-density with respect to the input. Because the gradient of a constant is zero, the normalization term simply vanishes.
2. Pseudolikelihood Decomposition
To handle "marked" processes (where events have categorical types, like "theft" vs. "assault"), SMASH decomposes the joint intensity into three components:
- Event Time: Modeled via a score function.
- Event Mark: Modeled via a conditional probability mass function.
- Event Location: Modeled via a spatial score function.
3. Denoising and Sampling
To ensure stability during training, the authors use Denoising Score Matching, adding a small amount of Gaussian noise to the data. At inference time, they employ Langevin Dynamics—an iterative sampling process—to generate hundreds of possible future events. By analyzing the spread of these samples, the model can construct robust 95% confidence intervals for time and 2D confidence regions for location.
Key Insights and Ideas
- The "Mean" is Misleading: Event distributions are often multi-modal. A standard model might predict the "average" location, which could actually fall in a region where an event is highly unlikely to happen. SMASH’s confidence regions correctly identify these multiple clusters and provide a more realistic picture of potential outcomes.
- Normalization-Free is Faster: By avoiding numerical integration, SMASH achieves training speeds comparable to the fastest (but less accurate) baselines, while being orders of magnitude faster than models relying on ODE solvers.
- Unified Modeling: Unlike previous attempts that used separate decoders for marks and times, SMASH uses a unified intensity-based approach, better capturing the dependency between what happens and when it happens.
Key Results
- Superior Uncertainty Quantification: SMASH significantly outperformed all baselines in Calibration Score (CS). This means that when SMASH predicts a 90% confidence region, the actual event falls inside that region almost exactly 90% of the time, demonstrating highly reliable uncertainty estimates.
- Better Point Accuracy: Despite its focus on uncertainty, SMASH also achieved the lowest Mean Absolute Error (MAE) for event time and location across most evaluated datasets.
- Efficiency: On a real-world Crime dataset, SMASH trained in ~3 seconds per epoch, compared to ~480 seconds for NSTPP (a popular ODE-based model), representing a 160x speedup in training efficiency.
Limitations and Future Work
While SMASH represents a significant leap forward, the authors note a few areas for future development:
- Sampling Speed: While training is exceptionally fast, generating predictions via Langevin Dynamics requires multiple iterations, which can be slower than a single-pass feed-forward network during inference.
- Hyperparameter Tuning: The model relies on a weighting parameter to balance the time/mark and location losses, requiring careful tuning for different datasets.
- Parallelism: The current sampling is "cascaded" (time then location). While parallel sampling is theoretically possible, further optimization could make the model more viable for strict real-time applications.
Summary updated