Abstract
We address the problem of predicting aggregate vote outcomes (e.g., national) from partial outcomes (e.g., regional) that are revealed sequentially. We combine matrix factorization techniques and generalized linear models (GLMs) to obtain a flexible, efficient, and accurate algorithm. This algorithm works in two stages: First, it learns representations of the regions from high-dimensional historical data. Second, it uses these representations to fit a GLM to the partially observed results and to predict unobserved results. We show experimentally that our algorithm is able to accurately predict the outcomes of Swiss referenda, U.S. presidential elections, and German legislative elections. We also explore the regional representations in terms of ideological and cultural patterns. Finally, we deploy an online Web platform (www.predikon.ch) to provide real-time vote predictions in Switzerland and a data visualization tool to explore voting behavior. A by-product is a dataset of sequential vote results for 330 referenda and 2196 Swiss municipalities.
Introduction
On election night, the "raw" national total is often a poor predictor of the final outcome because results arrive sequentially. Smaller, rural, or more technologically advanced regions often report their counts hours before large urban centers. Because these early-reporting regions are not representative of the whole country, simple weighted averages are biased. Existing predictive models often struggle with the "cold start" of a new election or are computationally too heavy for real-time updates. This paper introduces SubSVD-GLM, a framework designed to be efficient, flexible, and accurate by exploiting deep historical correlations between regional voting behaviors.
Methodology: The SubSVD-GLM Framework
The proposed algorithm operates in two distinct phases: an offline learning phase and an online prediction phase.
Stage 1: Learning Regional Embeddings (Offline)
The first stage involves analyzing a massive historical matrix of past votes across all regions. Using Singular Value Decomposition (SVD), the algorithm compresses this high-dimensional data into low-dimensional "embeddings." These embeddings serve as a latent political "signature" for each region, capturing how municipalities tend to vote similarly on various issues (e.g., identifying which municipalities align on social vs. economic topics).
Stage 2: Real-Time Prediction (Online)
During a live election, these regional embeddings remain fixed. As initial regional results ($y_{obs}$) arrive, the algorithm fits a Generalized Linear Model (GLM) using the pre-learned embeddings as features. This allows the model to find the "best fit" parameters for the current vote almost instantly. The final national prediction is then calculated as a weighted sum of the observed results and the predicted values for unobserved regions. The model is adaptable to different vote types through the choice of "link functions": Bernoulli for binary referenda and Categorical for multi-party parliamentary races.
Key Insights and Regional Representations
A major finding of this research is the remarkable stability of political geography. While specific ballot issues change, the relative ideological distance between regions remains consistent over decades. The SVD effectively maps the "political DNA" of a country.
Projecting the Swiss regional embeddings onto a 2D plane reveals clear clusters that correspond to the country's linguistic and cultural boundaries. Most notably, the model captures the Röstigraben—the cultural divide between French and German speakers—and identifies the distinct voting patterns of Italian-speaking Ticino. Furthermore, the research highlights that data granularity is a significant advantage; using finer-grained data (e.g., 538 districts vs. 16 states in Germany) allows the model to capture more nuanced correlations and reach high accuracy faster.
Experimental Results
The model was evaluated across three political landscapes: Swiss referenda, U.S. Presidential elections, and German legislative elections.
In the Swiss context, the SubSVD-Bernoulli model achieved 95% accuracy with only 10 municipalities reporting. It reached 100% accuracy after observing just 10% of all municipalities. For the U.S. 2016 election, the model outperformed simple weighted averages and standard matrix factorization after observing results from only two states. The system was also deployed live at www.predikon.ch, where it predicted the February 2020 Swiss referenda outcomes with an absolute error of ~1% hours before official counts were finalized.
Conclusion
SubSVD-GLM provides a robust framework for real-time election forecasting by decoupling the learning of regional characteristics from the fitting of specific election data. Future work will aim to address the "cold start" problem by incorporating pre-election polls and implementing Bayesian inference to provide confidence intervals for predictions.
Summary updated