Back
natural sciencesNews

Paweł Sobocinski: With a Different Kind of Mathematics, We Can Create Better Software

software
Paweł Sobocinski: Estonia is a cool place to come home to, it's cosy, safe and friendly here. Photo: Karl-Kristjan Nigesen
Share

Paweł Sobocinki is a Polish-born, Australian-educated European computer science professor with a research career focused on the reliability of software and artificial intelligence and the training of a new generation of software scientists.
While he has become a patriot of Estonia, he is a welcomed speaker at many conferences because he has one rather special approach: to design software programming with different mathematics and to develop artificial intelligence together with philosophers and ethicists.

You grew up and studied in Australia, but you’ve worked in many places in Europe. What brought you to Estonia?

I had contacts here from conferences, and when the IT Academy was launched, researchers from abroad were recruited for four computer science professor positions in Estonia. It was a very good offer because usually job offers in higher education are related to a specific project, but this time I was offered both a job and funding to create my own research group, and the field of research was also quite free. When I came to TalTech in the fall of 2019, I was immediately able to hire three postdoctoral fellows and six doctoral students, so the research group grew big fast, there was a lot of energy and visitors.

Where is your home?

(Chuckles.) I think it’s here now. Estonia is a cool place to come home to, it’s cosy, safe and friendly here.

At TalTech, you are leading a research group, manage the laboratory of compositional systems and methods, program coordinator of a doctoral program, and also supervising doctoral students. Describe your typical week.

(Laughs out loud.) It changes a lot. Last year and the beginning of this year have been very different because we are putting together a big Horizon project for the Estonian Center for Safe and Trustworthy Artificial Intelligence (ECSTAI). I’m a researcher and for the past 20 years, my bread and butter has been solving problems and writing them up, exchanging ideas getting inspired with colleagues at conferences – the typical life of a scientist. But now I felt more like a politician. We have an idea to make this center the heart of Estonian artificial intelligence, where ministries and other state offices are involved. The vision is big and much more than just research, so I had to put myself in meetings and roles I’m not used to.

You will also participate in the newly created Estonian Center of Excellence for Artificial Intelligence, which is coordinated by the University of Tartu. What is the main goal of this center and how do you contribute there?

Estonia is a small country and it would be silly if researchers in the same field did not cooperate and help each other. In the Center of Excellence, top groups in the field from different Estonian universities meet and work together on joint projects. From TalTech, four groups are participating – Tanel Tammet, Rain Ottis, Tanel Alumäe and me. The whole idea of the center is to do research – doctoral students and postdoctoral fellows do research and publish scientific articles, raise their level as experts. My vision is that I work with the logic of probabilistic systems.

How is it different from the ECSTAI? Why do we need another center of excellence?

It is true that it helps us to do everything that we do together with Tartu in the Estonian center of excellence already described, but it will do much more. One of my favorite parts is building a PhD school in artificial intelligence. Together with a consortium of four universities, we are putting together a completely new curriculum of courses on reliable AI, created by top researchers from TalTech, the University of Tartu, the Technical University of Munich (Germany) and Radboud University (The Netherlands), and we will train a new generation of top-class PhDs. The life of doctoral students is often quite isolated, but in the doctoral school, experts from very different fields and groups come together with their knowledge and approaches. There you not only create high-quality researchers, but also build an international reputation, which in turn attracts the best students.
I am also excited about the school of advanced studies. This means we invite top international experts who are working on some very complex problems in the field, and we give them an opportunity in Estonia to switch off completely and separate themselves from the rest of the world to work on it for a month, for example.

In a forest cabin somewhere?

Yes, for example in a forest cabin. Such centers already exist in the world and they generate a lot of energy and excitement. It would be very cool to create something like this in Estonia.

Would you be the manager of this center?

I am not ready to leave science and become a manager. I want to get back to thinking and publishing.
The most exciting problems for me are the ones I can see an application to, so I’m not interested in making a perfect theory just for the sake of a perfect theory. My research is in mathematics and theorems, which one day hopefully will reach practical use, but they cannot be directly transferred to industry, their technological readiness level is very low.

What exactly does your research group do?

It’s a bit difficult to explain. We deal with programming languages. A program is a structure written in some agreed language that a computer can interpret and act on. We study how to design these languages.

Pawel Sobocinski valemeid täis tahvli ees
Paweł Sobocinski: The math that we use helps solve a wide variety of problems in software science, not only in programming, but also in quantum computing. Photo: Karl-Kristjan Nigesen

We already have several programming languages, why do we need more? What do you want to do differently?

We have several languages, but also many bugs and problems. The design of the programming language itself is important.
In science, there is a concept called the emergence effect, which means that if you put two simple systems together, the slightly more complex result behaves unpredictably different than the two simpler ones. This applies not only in computer science, but also elsewhere, in chemistry, physics. One famous example from mathematics is fractals – infinitely magnifiable works of art, ever-continuing patterns created by an extremely complex and unpredictable solution to a very simple mathematical equation. They are very beautiful, but we want to avoid that and try to build systems without the emergence effect. We want to design languages and systems in a way that we understand all of its parts and how the larger composition works, so that its behavior is predictable. It is deeply related to mathematical logic.

So you take a practical problem – systematic errors in programming from the emergence effect -, go back to the very beginning and start fresh with a new approach, a new math?

Exactly. This way we have a mathematical guarantee, we can prove that the program does what’s expected. It is important to build systems in such a way that safety is already built in and there’ll be no unexpected behaviour. The math that we use helps solve a wide variety of problems in software science, not only in programming, but also in quantum computing. For example at ECSTAI, one of the research topics will be how to use these methods to develop and understand artificial intelligence. AI is an evolving language based on probability. At the simplest level, machine learning, also the famous Chat GPT, works in such a way that when creating a text, it calculates the probability of which word should come next at each moment. It has worked through a huge amount of texts and it just goes by probability. So probability is the core of artificial intelligence, but we don’t yet have very good logical ways to reason about probability. One challenge I can contribute to in the future is probabilistic logic, where we can determine the properties of Chat GPT-like systems.

Nowadays, AI is being integrated with other systems, including Chat GPT, and it’s like the wild west, everyone just acts as they see fit. The Estonian public sector has a technologically ambitious reputation and quite a lot of pressure to continue it. There’s a lot of potential for a lot of things to go wrong, but also a lot of potential for us to figure out how to make these systems trustworthy. Not only for people like me – I have a very mathematical approach to the theory and logic of programming languages – but we want to involve cyber security specialists, artificial intelligence experts, philosophers, ethics people… Aive Pevkur, whose background is philosophy and ethics, has worked with me the most on this request. We look at it a little differently than the rest of the world, so I hope we can build something unique.

A few years ago, we talked about the problem that software scientists didn’t trust AI because they couldn’t understand how the machine reached its decisions. Yet they themselves had developed this machine. Should we trust machines that we have taught to think for themselves?

It reminds me of an artificial intelligence course in the 90s where we had to write a simple board game. I remember the first time the program I wrote beat me. It’s a very strange feeling when something you built is better than you. But your broader question is a very big topic right now.
The European Union has a brand new piece of legislation, the AI act, and in addition to the rule that artificial intelligence should not decide things on which, for example, people’s lives, health and jobs depend, one principle is that there has to be an opportunity to get explanations for decisions. But this leads to another interesting problem: the explanation could be two billion pages long. Who will read it? Maybe a human is too dumb to read it at all? Maybe another machine has to verify if the decision is well justified?

Or a machine reads it and creates a one-page summary for a human?

Yes. Anyway, the explanation can’t just be mathematical, it’s also a philosophical idea that a person should understand, even without being an expert. This is a very big source of problems and a very exciting area of research.

Pawel Sobocinski
Paweł Sobocinski: The world is a probabilistic place where nothing is ever 100% guaranteed unless it is a mathematical theorem. Photo: Karl-Kristjan Nigesen

But there are many exceptions in life, and in a probabilistic approach, every exception is a problem.

But it’s the best we can do. The world is a probabilistic place where nothing is ever 100% guaranteed unless it is a mathematical theorem. Currently, computers are built to be non-probabilistic, and in order to create probabilities in normal software, you have to simulate “chance”, but the random numbers chosen by the computer, for example, are never really random. It’s a poor system.
So in computer science, where we’re interested in reliability, verifiability, and correctness, we’re increasingly dealing with probability. This is a big challenge for all of us. And just like poorly made furniture doesn’t hold up to use, neither does poorly made software. To get better software, we need to build better tools. And that’s our job, besides teaching programmers how to use these tools properly. But we can’t stop someone from writing a bad program or malware.

You don’t just talk about the need for new specialists, you also contribute yourself as the ICT doctoral program coordinator. How is this program doing and who is studying there?

I inherited this program from Maarja Kruusmaa, who had already made a thorough revolution there, so I got a very well-functioning program. I am trying to continue her good work. For example, one nice thing: for the annual certifications of doctoral students, we go somewhere to far end of Estonia – far from Tallinn – and we have presentations and discussions from researchers all over the curriculum, so that each student receives comprehensive constructive feedback on their work, they also get advice and help if they are stuck.

It’s like they have a whole bunch of supervisors.

They are not their daily supervisors, but they provide a valuable outside perspective, and it often happens that we find topics that the supervisor has not noticed. In my opinion, this is a very effective method and a guarantee of great quality.
I am amazed at how good the doctoral students are at TalTech, they do a wonderful job, both Estonians and students from other countries. Three of the PhD students I hired in my first year have now graduated, one working at Oxford, one at Pisa. Researchers, especially at the beginning of their careers, have to work in different countries and universities, only this way they can gather diverse ideas, methods and inspiration. We also have some industrial PhD students who work most of the time in the company, but 1-2 days a week they come here and do research, their supervisors are also in the companies and their work is related to the company.

Why do industries need people with PhDs? At least in Estonia, this need is not seen, companies hire second-year bachelor’s students, and we no longer see them at the university…

For some reason, Estonian students really don’t come to doctoral studies easily, they think that it is not necessary and that a master’s degree brings a good enough salary. It was the same in Southampton, where I worked as a professor before TalTech. I remember that most of the students already had a future employer in their second year – they went to an internship in the summer and signed an agreement that they would come to work for us after graduation.

In Estonia, they go to work long before graduation.

Oh. This is the current state of the labor market. We need more people with PhDs and that is a challenge. We have many PhD students from Estonia, but there should be many more. I have two answers to this.

First, we need to sit down as a university and find ways to get more students. It’s good for both the students and the country. If we look at top AI labs and companies around the world, PhD is the minimum requirement. If we don’t want to be technology slaves in Europe and Estonia, but to build our own technologies, we must have high-level experts and that requires PhD level.

Secondly, we need to explain to the students that money is not the most important thing in life. We already offer a decent salary to a starting researcher. If ECSTAI receives funding, we hope to offer internationally competitive scholarships. When you’re 22 years old, that’s the best time in life to challenge yourself, to spend four years doing a really deep dive into a challenging topic. This is an opportunity that you won’t get later in life.

Easy for you to say, you are lucky because you are very passionate about software. Do you remember the first time you sat in front of a computer?

It was a ZX Spectrum 48K in 1983 with a rubber keyboard, I was five years old. I was fascinated by programming, there was something intoxicating about it, that if you learn the right things, you can make a computer do anything. I remember writing paragraphs in the rudimentary Basic programming language. It’s very easy for “spaghetti code” to happen there. This means a situation where a new command line of code sends the computer back to some previous line to repeat some action, but there will be a lot of these “goto” commands and pretty soon you are in a situation where you no longer understand what is happening, and the program no longer does what you planned. This is called “You got lost in the spaghetti”. This is where my passion comes from today: we need programming languages that avoid the spaghetti mess.

Pawel Sobocinski arvuti taga
Paweł Sobocinski: To get better software, we need to build better tools. Photo: Karl-Kristjan Nigesen

I didn’t know that I would become a scientist, but I reached a point where instead of listening to information in a lecture, some things start to interest you, you start asking questions, and not only your lecturers don’t know the answers, but by googling and researching books, it turns out that there are no answers to these questions yet. The thought comes, “Maybe I should find out for myself?” It was very addictive for me, to be on the front line of the unknown. Somehow this spirit must be brought to the students because we need more people who are world-class experts. This can only be done with a PhD.

At the other end of this scale is the definition of a specialist: someone who knows more and more about less and less until they know everything about nothing.

That may be true, of course. At one point I had to choose between doing a PhD in mathematics or computer science. Mathematics was very attractive, but it would have taken me very deep into mathematical theory, I would have sat at a desk for eight hours a day and seriously pondered complex problems, and in the end the beautiful mathematics I would have written would have spoken to 3-4 people around the world. It happens, of course, that theories from a hundred years ago and declared useless at the time find applications now, for example the idea of the Hubble telescope and the quantum mechanics and quantum computing based on it. Maybe I would have been happy with this, but it sounds very lonely. However, computer science is a very young field, people are interacting with each other, and since technology is developing so quickly, there are always new interesting things to discuss.

I am sure that you use artificial intelligence on a daily basis. What do you use it for and where do you have crises of trust or performance?

In fact, I don’t use it at all, just for fun or testing. Personally, I’m a little worried about artificial intelligence in our lives. When you stop exercising, your muscles shrink, but the brain is also a muscle and we have to use it to stay fit. Also, I don’t like the language of Chat GPT, it’s boring, tasteless and characterless.
When I started as a researcher, I wasn’t good at writing, but you have to write articles about your research and it better be good and interesting for people to read. Over time I’ve learned to enjoy it and I want to write introductions to papers myself, even when most of  the research is done by students. When you write, you have to be interesting, you have to engage the reader, surprise them, please them, it’s not just plain giving information. And for me Chat GPT can’t do it yet, it’s boring and predictable.

It is predictable because it’s made to predict!

Probably. But if you put everything in a blender and mix it together, you won’t get anything interesting. And that’s why I’m skeptical and still prefer to use my own brain.

Paweł Sobocinski: Computer science is a very young field, people are interacting with each other, and since technology is developing so quickly, there are always new interesting things to discuss. Photo: Karl-Kristjan Nigesen

Artificial intelligence monitors our consumption behavior, helps communicate with the state, etc. What is a reasonable balance between developing digital life into even more spheres and ensuring the reliability and security of existing applications?

When the technology is out, it cannot be put back in the box. But I am hopeful because we have learned from previous technological revolutions. The previous one was the advent of the internet in the mid-90s. It was said to change humanity, we all would have access to the world’s information. Now that’s the way it is, we can read anything on the phone at any time, anywhere, and communicate with the whole world, democratic access to means of communication has expanded over time. In the 90s, all researchers were extremely optimistic about this.

But if you look at the world now, we have ruined it. Are people happier now than they were in the 90s? Teenagers are losing their minds over Instagram, in fact everyone is driven a little crazy by social media. I think we got burned because we didn’t notice the downside. For example, the fact that a guy like Donald Trump was elected president of the United States is absolutely insane. In the pre-social media era, this kind of political polarization in society could not have happened, but it is happening in many areas today. Algorithms give their amplification – if you watch one or two videos, similar content is recommended again and again, you dig deeper and deeper into the hole, and if you are not aware or careful, soon you will only see such content and it will take over your life. And right-wing populists around the world are ready to take advantage of this.

One of the most scandalous abuses of AI has been a company called Cambridge Analytica, which was involved in getting Trump elected president, and they were also involved in “electing” dubious people to power in Africa. They have artificial intelligence algorithms that use Facebook, get to know people there, and find easily influenced users. And it’s scary.

Wait, you said you were hopeful.

Yes. I am hopeful because now we all know that while technology has many benefits, it also has negative side effects. We are smarter now, and when I read articles or talk to people about AI, they are cautiously optimistic.

It has been said that Estonia would not be able to go back to paper governance, there are simply no resources for that. Is it the right way to burn bridges and depend on servers, databases and artificial intelligence instead of tangible materials?

My experiences with the Estonian government and e-state have been extremely positive, the people who work with it are very good, responsible and talented, so I think we are in a good place. But I’m worried about the future, there is a lot of pressure to use artificial intelligence and I hope we have good people for it. That is why it is so important that we constantly “produce” new top specialists here: the country needs data scientists, artificial intelligence scientists, especially those who focus on security and ethics, i.e. the foundations of reliability.

And so we got back to the beginning. You speak very patriotically about Estonia. How Estonian have you become in four years?

There is a lot to love in Estonia. It is safe and cozy here and I really like Estonian food. My favorite parts from three directions meet here: fish culture from Scandinavia, various sausages from German cuisine and all kinds of salads from Slavic cuisine.

I like the sauna too and thank heavens there’s finally some more daylight again. The darkness is quite terrible, but then again the summer in Estonia is absolutely wonderful, lots of Sun and that Jaanipäev vibes where everyone is happy… Maybe when I’m famous and rich enough, I’ll live half the year in Estonia and half somewhere in the south… But it would be cheating, yin and yang work only together. I guess if you’re not suffering and stressed of the darkness in January, Jaanipäev can’t make you so happy either.

And something here reminds me of my childhood in Poland. I like that children can walk on the streets on their own. In Anglo-Saxon countries it is considered dangerous. During my childhood in Gdansk, after school we played outside with our friends, made big fires, and at six o’clock mothers started calling their children to dinner from the windows. In Australia, I had to go straight home from school and the only time I got together with my friends was when we went to overnight visit. I like the sense of security in Estonia, which is given by the freedom of children to move around on their own.

This article was originally published on the Tallinn University of Technology’s (TalTech) webpage. Author: Mari Öö Sarv (TalTech) – Copywriter, Editor-in-Chief of Mente et Manu, Communications Specialist for Sustainability – Centre of Communications: Marketing and Communications Office.


Read more about how to integrate artificial intelligence into your company HERE.

Read more

Get our monthly newsletterBe up-to-date with all the latest news and upcoming events