“Trial and error is expensive – and sometimes dangerous”

Training your AI with huge amounts of data is a slow and costly process. Ali Beikmohammadi studies methods to make the training process smarter, cheaper and more robust.

AI could also use a set of training wheels, according to Ali Beikmohammadi.

Reinforcement learning is a key concept in Ali Beikmohammadi’s research. It is a way of teaching computers by trial and error.

“Think of a child learning to ride a bike. Nobody gives them a manual, right? They wobble and fall a lot, until they figure out how to stay up,” Ali Beikmohammadi says with a smile.

“A reinforcement learning program learns the same way. It tries different actions, gets a ‘reward’ when something goes well, and over time finds a strategy that earns as much reward as possible.”

The problem is that this kind of machine learning is slow, he explains. A program might need millions of attempts before it does anything useful.

“That could be fine in a video game, but not for a real robot or a real building, where every try costs time and money.”

Beikmohammadi’s PhD thesis deals with this problem. He uses mathematics to prove that his methods work, and computer experiments to test the methods.

Training wheels for the AI

For a child learning how to ride a bike, training wheels that come off later can cut the number of attempts a lot. Similarly, AI could also use a little help at the start.

“Federated learning is a way to speed things up. In federated learning, many devices learn together and share what they’ve learned. They can do this while sending much less data. And working together still pays off, even when each device faces slightly different conditions,” says Ali Beikmohammadi.

Ali Beikmohammadi, DSV.

Ali Beikmohammadi is interested in making machine learning smarter, cheaper and more robust.

For basic tasks, “ordinary” machine learning is usually simpler and works better. A basic task could be to decide whether an animal in a photo is a cat or a dog when there are plenty of examples with the right answer – photos that have already been labelled “cat” or “dog”.

Reinforcement learning, on the other hand, fits whenever you make a series of decisions and the effect only shows up later. Some examples are working with humanoid robots, heating and cooling in buildings, energy systems, traffic lights, or recommending what video to watch next. It’s also part of how today’s AI chatbots are trained to give more helpful answers.

You can’t let a self-driving car learn by making a million mistakes

“But trial and error is expensive – and sometimes dangerous. You can’t let a self-driving car learn by making a million mistakes.”

“My methods let these systems learn with fewer attempts and less data traffic, which makes them cheaper and saves energy. Companies can also give the program the rough rules of thumb they already use, so it doesn’t have to start from zero. And devices that learn together only send what they’ve learned and keep their own data, which is good for privacy. In the future, hospitals could for example learn from each other without sharing patient records,” says Beikmohammadi.

So far, he’s only run his experiments in simulations. The next step is to take this into real systems, where you also have to deal with safety, fairness and unreliable networks.

Research put to practical use

In parallel with finishing his PhD thesis, Ali Beikmohammadi has been working as an AI Tech Lead at Seco Tools, a brand withing the Sandvik Group, for the past year and a half. The company makes cutting tools for the metalworking industry.

“I would say that the habits I picked up in research help me every day. I talk to business stakeholders to find out what the real problem is, and I make sure something really works before I trust it.”

After the thesis defence, Ali Beikmohammadi plans to keep one foot in academia.

“I supervise student projects and write papers with my old research group, because I see research as my hobby. In the future I’d like to stay in both worlds and keep thinking deeply about ideas that can help society in the long run,” he says.

Key terms explained

AI – artificial intelligence – mimics human thinking, learning and decision-making. AI systems allow computers to operate with various levels of autonomy, and perform tasks that used to require human intelligence.

Machine learning is a type of AI. Instead of giving the computer explicit rules on what to do, you let it train on huge amounts of data. It will find patterns and learn how to draw conclusions from the data provided.

Reinforcement learning is a specific method in machine learning. The AI learns by trial and error, and is “rewarded” or “punished” depending on the outcome. Reinforcement learning is useful in dynamic settings like robotics, gaming and energy systems.

Federated learning is a method for organising machine learning on many devices or units. Instead of sending all data to a central server, the devices train their own local models and only send the results. This is a technically advanced method, but also more efficient and privacy-preserving.

“It was intense – but in a good way”

Ali Beikmohammadi has been a PhD student at the Department of Computer and Systems Sciences (DSV). We were curious to hear how he chose this path, and what the journey has been like.

How did you become interested in machine learning?

“Before my PhD, I worked on deep learning for images – for example teaching a computer to recognise plants from photos of their leaves. It was fun, but those systems can only learn from examples that someone has already labelled. Reinforcement learning caught my attention because the computer learns by trying and failing, which feels much closer to how we humans learn. I wanted to properly understand how it works, and a PhD gives you time to go deep into one problem,” Ali Beikmohammadi explains.

Why did you choose DSV for your doctoral studies?

Ali Beikmohammadi, DSV.

Ali Beikmohammadi, DSV.

“I did my master’s in digital electronics, a branch of electrical engineering, at Amirkabir University of Technology in Tehran, Iran. The programme was mathematically heavy, but at the same time we did applied machine learning. I got interested in the PhD position at DSV because I saw reinforcement learning as a very relevant next step. It needs both strong mathematics and the applied side at the same time. Talking to Sindri Magnússon made me more confident, since he also has a background in electrical engineering.”

What was it like for you to do a PhD?

“It was intense – but in a good way. I was lucky with my supervisors. Sindri was always open to new ideas but very careful about doing things properly. Sarit Khirirat was like an extra supervisor to me and worked closely with me on most of the papers. The Data Science Research Group is a friendly place, and my colleagues there made the hard days a lot lighter. In the end I worked with more than fifty co-authors, which I never expected when I started!”

What’s your main takeaway from the PhD journey?

“The first page of my thesis has a quote from Wernher von Braun: ‘Research is what I’m doing when I don’t know what I’m doing.’ I picked it because it describes my PhD pretty well. Lots of ideas looked great on Monday and were wrong by Friday, and I had to start over. I’m a lot more patient now than when I started, and I trust that a hard problem usually opens up if I stay with it long enough,” says Ali Beikmohammadi.

Sindri Magnússon, Ali Beikmohammadi and Panagiotis Papapetrou, DSV.

A PhD student and his DSV supervisors at the “nailing ceremony”. From left to right: Sindri Magnússon, Ali Beikmohammadi and Panagiotis Papapetrou.

More about Ali’s research

Ali Beikmohammadi will defend his PhD thesis at the Department of Computer and Systems Sciences (DSV), Stockholm University, on 16 October 2026.

The title of the thesis is “Toward Scalable, Robust, and Efficient Reinforcement Learning: Theoretical Foundations and Algorithms for Sample-Efficient, Communication-Aware, and Heterogeneity-Robust RL”. It is a compilation of six scientific papers.

The defence is open to the public.
More information about the defence

Download the thesis from DiVA

Joni Pajarinen, Aalto University, Finland, is the external reviewer at the defence.

Sindri Magnússon, DSV, is the main supervisor and Panagiotis Papapetrou, DSV, is the co-supervisor.

Ali Beikmohammadi also works closely together with Sarit Khirirat, Mahidol University, Thailand, who serves as an informal co-supervisor.

Contact Ali Beikmohammadi

Contact Sindri Magnússon

Read about research and education at DSV

Last updated: 2026-10-16

Source: Department of Computer and Systems Sciences