On the 7th of March, the Swiss population voted on a ban for full face coverings, the e-ID Act, and an economic partnership agreement with Indonesia. As with all Swiss referendums since 2019, the EPFL election prediction tool Predikon generated real-time predictions for the vote outcomes.

Where does Predikon come from?

The Predikon project began in 2014 at EPFL’s Laboratory for Information and Network Dynamics (INDY) with former PhD students Vincent Etter and Julien Herzen under the supervision of Prof. Matthias Grossglauser and Prof. Patrick Thiran. The initial project mined data from SmartVote to study Swiss legislative elections and introduced an early model to predict referendum votes. This model made binary predictions: it predicted “Yes” or “No”, as opposed to the percentage of “Yes” votes currently in place.

When analysing the average prediction accuracy per municipality in 2014, the team at INDY lab found that Ebikon, a town of 12,000 inhabitants in the canton of Lucerne, had the highest average prediction accuracy. In fact, using Ebikon’s vote results to predict the national outcomes reached an accuracy of 95.9%. The researchers explained that, although surprising, these results can be partly explained by the characteristics of Ebikon: located in the heart of Switzerland, it is quite representative of the overall diversity of the country. It has around 20% of foreigners and both an urban and rural population. The name of the prediction tool Predikon is actually a combination of prediction and Ebikon.

The project took a significant turn in 2019 when the Swiss Federal Statistical Office began publishing the vote results in real time. This enabled Predikon to make real-time predictions. Since then, this impressive tool has made significant progress. Indeed, the algorithm is able to predict the national result with less than 1% of error with about 5% of the municipal results. In addition to this, since the last referendum in November 2020, the Predikon algorithm now provides error margins and predicts the “double majority” of people vote and cantonal vote.

More than satisfactory results after improvement

The results of this new version of Predikon remain mostly satisfactory: for instance, the vote on the free agreement with Indonesia sees only a 0.11% difference between the prediction and the final result. However, the vote for eID, although correctly predicted, saw the largest gap among the total of 14 votes Predikon has predicted, with a 2.39% difference.

To explain this difference, one hypothesis is that no votes were previously held on topics related to electronic identification. ecall that Predikon relies on the history of past votes to learn ideological representation of the municipalities and the votes, and it uses these representations to make predictions. Without historical data about this topic, the model was unable to learn an accurate representation for the vote.  However, although it had some difficulties at the beginning, it quickly corrected its prediction, as shown in  the following image.

Predikon also took into account the double majority of the cantons, i.e. the fact that in order to change the constitution, not only a majority of the people, but also a majority of the number of cantons is required. This double majority rarely affects the vote results but it was, to the surprise of many, the reason why the initiative for responsible businesses was rejected in November 2020, as a result of lack of canton majority. Retroactively, the new version of Predikon would have correctly predicted the number of cantons (8.5 cantons, counting the “half-cantons”) that accepted the initiative.

Among the other areas of improvement we discussed in our previous article, the team planned to add confidence intervals to their predictions. As a reminder, a confidence interval provides a margin of error to a prediction, rather than a single point-estimate.. The team obtained margins of error by making their model Bayesian: The model predicts a probability distribution, whose mean gives the most likely outcome and whose variance provides a margin of error.

Although Predikon seems to be increasingly effective, there are still areas for improvement. Uncertainty is hard to estimate, and it will be necessary to refine the model’s hyperparameters, knobs that tune the behaviour of the model.

Another notable fact is that Zürich, the largest municipality in Switzerland with more than 400’000 inhabitants – almost twice as large as the second largest municipality in Switzerland, Geneva – has a major influence on the predictions. This is due to the fact that the model uses the squared population size. Dealing with this influence will be further developed in the future.

Finally, the team is currently exploring how to make predictions before the day of the votes. Several directions are being explored, and a Master student in Computer Science at EPFL is working on this aspect for a Master semester project.

What applications outside of academia?

Predikon is a very interesting proof-of-concept, but its use can transcend purely academic applications. As it is, it can of course already help citizens to see the trend for a vote that has taken place, but with the improvement of predictions in advance, it could be used to perform simulations, for example by political parties, to see if their campaigns and ideas would have an impact on votes.

Another approach, important within C4DT, would be fraud detection, a major issue in all democracies. If the results of the prediction differ significantly from the actual results, one may wonder about the tampering of votes by an external actor.

Finally, an interesting application would be for use as an analytical tool, in collaboration with political scientists or sociologists. This tool would eventually enable researchers from social sciences to learn more about voting patterns and voter behavior.

The future of Predikon is still open-ended. At the moment, it remains an academic side project within the INDY Lab, but one can imagine it evolving by spreading to other countries, or as being used by non-governmental organizations, for humanitarian purposes.

For now, the adventure is clearly not over for Predikon. Feel free to check out the results of past votes at predikon.ch, and follow us for more stories on our social networks, Twitter and LinkedIn.

This article is the last in a series about Predikon. Read the rest of the story here: