
The day after tomorrow we will once again head to the ballot box, however old-fashioned that may sound (and essentially be). For better or worse, the age of the Bulgarian Robot Party is still a long way off, but artificial intelligence is here to change everything, and there is no way it will skip this part of our lives.
Institutions argue over why 40 shovels are needed, and the shovels turn out to be laptops (in Bulgarian the two words sound almost alike). Yes, we live in strange times, but with all the possibilities technology gives us today, can we really not take measures so that the next elections are fairer, more impartial and free of obvious violations?
This is not about politics but about technology. Not propaganda and campaigning, but data science and artificial intelligence. About how they can be of direct use in a matter so important to all of us.
Some of the leading researchers in the country got together to test exactly that. A week ago the Data Science Society, headed by Sergi Sergiev, held a daylong hackathon to discuss and try out what today's AI can do in this important and fascinating direction. What came out of it is more than intriguing, and the experiment is described for us by another of its organizers, Viktor Botev, well known to readers of Digital Stories.

House of Paper
Every serious undertaking involving artificial intelligence starts with data. Here we have made some progress, because we vote so often that information piles up fast. Jokes aside, since 2021 the Central Election Commission (CEC) has published a fair amount of open data, though in a format that is far from ideal to work with, Viktor says.
It will hardly surprise anyone, but paper ballots mean an enormous amount of manual work, and that in itself means plenty of room for mistakes. “Even if we set aside for the moment any idea of malice or some kind of deliberate violation, the chances of errors in this process are quite high, and at many points,” he adds.
The hackathon focused on three directions: scanning and automatically checking the paper tally sheets, monitoring the video recordings from the polling stations, and statistical analysis of the vote.

Say Cheese
We all know that one of the main problems today has to do with the tally sheets and the way they are processed. The idea the specialists came up with was to use text recognition technology—OCR. A member of the polling station commission photographs the completed sheet, and an app reads it and checks whether the numbers add up. Mistakes are caught on the spot, before they ever reach the district commission.
Putting it into practice turned out to be trickier. “We built an AI app with an OCR model that does relatively well. But if we simply call models through requests, the accuracy is between 65% and 85%. And if we use open-source models, another problem appears—it gets slower and considerably more expensive,” Viktor says. That is why actually deploying it before the elections requires infrastructure that is not yet available.
The CEC has also promised to create its own app for filling in the tally sheets, but the question is that it most likely won't manage to do it in time, the specialist believes.

A Film Without an Audience
The second direction, video surveillance, proved more fruitful. Before getting to any solutions, the team ran into an interesting puzzle. There are supposed to be almost 13,000 polling stations with video surveillance, yet there are only a little over 7,000 videos, and a huge number of them have vanished and are not kept anywhere online. Viktor says he foresaw this last year and saved all the videos while they were still available.
These are the very recordings the specialists used at the hackathon to discuss how AI could help make video surveillance actually mean something. Their idea: a browser app that lets volunteers follow a large share of the videos in real time.
“People can install an extension in their browser, follow the videos, and the AI tells them whether there is movement, whether the camera has been covered, and other problems that can be flagged.” You don't have to watch nonstop—the AI watches for you, and the volunteer only confirms the alerts and, at their discretion, reports an irregularity to the relevant district commission.
“On the one hand, this will guarantee that we end up with videos; on the other, it will have a certain educational effect. When alerts start coming in, commission members will know that the cameras are working and someone is watching.”
Audio analysis is added too. With modern technology it turns out to be quite easy to monitor when a row or a quarrel breaks out; the system sends an alert and volunteers can turn their attention to that particular video.

Putting It All on the Map
The third direction Viktor talks about was born as an idea from the hackathon participants themselves.
Imagine a map of every polling station in the country. Each comes with additional data: which parties had representatives on the commission, whether there was video surveillance in the previous elections, how long it worked, whether there were errors in the tally sheets. From this data a risk coefficient is calculated.
“If this map is published, anyone who goes to vote can check their own polling station—what rating it has, what problems. And if they aren't satisfied, it can be useful to them, for example, to be more careful and vigilant. If the problems persist, they can move to another polling station or simply apply to become a commission member,” Viktor adds.
“After all, serving on a polling station commission is paid, and the people who take part should be held accountable for how they did their job. Their pay comes from the taxpayer, and the taxpayer has the right to demand.” For now it is not certain whether this app will appear before these elections, but the next ones, the regular presidential elections, are not that far away.

Anomalies, Oh My
Statistical analysis is the last big direction in which the specialists found room for artificial intelligence to shine. Their idea was inspired by the analyses in the United States known as “swing states”—the ‘suspicious’ states that suddenly and sharply shift their vote compared with previous elections.
The AI specialists used the official data and managed to build a similar map at the level of provinces. “Perhaps somewhat contrary to expectations, No. 1 was Kardzhali,” a southern province with a large ethnic Turkish population. “People think everyone there votes for a single party, but that's not quite the case. Of all the provinces, that is where the swings in the vote are largest,” Viktor says by way of example.
Their next idea is to make such a map at the level of municipalities and even individual polling stations. Then specific places where unexpected and telling changes occur could be pinpointed.
Of course, in our part of the world this task comes with extra difficulties because of political peculiarities. Parties appear and disappear very quickly, others change their names and enter all sorts of coalitions. But then again… isn't that exactly why we need artificial intelligence, which knows how to find patterns invisible at first glance?

Choices
Which of these undertakings is ready for the coming elections? “We'll manage to develop the system that helps video surveillance volunteers and sends alerts. The map of risky polling stations will probably be ready after that, but a lot depends on whether there is enough public interest for it to be used widely.”
Everything described so far could be solved easily by making one decision that supposedly everyone likes. “Apart from the statistical analysis, for video surveillance and for scanning the tally sheets there would be no need for AI if we had machine voting. We all saw it—there was one election with machines in which there were no invalid ballots.”
It is time we realized that technology changes everything, elections included. And advanced artificial intelligence is here, with all the challenges and opportunities it brings.
“AI will certainly change democracy, just as it is changing every other part of our lives. For better or for worse? In my view the answer is rather neutral, because, like any technology, it can be used by one side as well as the other,” Viktor says.
And every attempt to discuss it, to look for new and meaningful applications, can “pull” the pendulum toward the better side. What matters most, I believe, is that we don't give up…




