Students use AI for sample positioning at BioMAX

Students use AI for sample positioning at BioMAX

 

The samples at BioMAX beamline are very sensitive biomolecule crystals. It could, for example, be one of the many proteins you have in your body. They only last for a short time in the intense X-ray light before being damaged and needs to be placed exactly right before the researchers switch on the beam. In their masters’ project, Isak Lindhé, and Jonathan Schurmann have used methods of artificial intelligence to train the computer how to do it.

Hundreds of thousands of proteins

You have hundreds of thousands of different proteins in your body. They do everything from transporting oxygen in your blood to letting your cells take up nutrients after you’ve eaten or make your heart beat. And when things go wrong, you get prescribed medication. The pharmaceutical molecules connect to the proteins in your body to change how they work. To develop new pharmaceuticals with few side effects, the researchers, therefore, need to understand what different proteins look like in detail.

A tedious task

To get high-quality data from a sample it needs to be correctly positioned in the X-ray beam. The conventional model for finding the right position is to scan the sample in the beam to optimize the position. At MAX IV, the X-ray light is very intense, which is good because smaller crystals can be used. But at the same time, very often the sample can’t be scanned in the beam since it would be damaged long before the right position is found. The researchers, therefore, have to perform the rather tedious task of positioning it manually.

A new route using artificial neurons

Isak Lindhé and Jonathan Schurmann, two masters’ students of Lund University Faculty of Engineering (LTH), have used so-called artificial neural network computing, a method inspired by the architecture of the human brain, to find an alternative route.

A protein sample sticking to the sample holder. This is the type of sample that the artificial neural network can position in the X-ray beam.

The computing method has been around for a long time, but it’s not until recent years that we have access to enough computing power to really start using it, Isak explains.

A network consists of mathematical functions, called artificial neurons, used by the computer to solve a problem. To start, the students put a network together using building blocks already available. It then needs to be taught what to do.

In a network like ours, there are several million connections between the artificial neurons, says Jonathan, and there is no way we can control them manually.

So, Isak and Jonathan trained it, in a way just like you would train your dog to do tricks. They let the computer work with examples; it makes a guess and then gets the correct answer to compare. After doing this over and over, some connections between neurons get stronger and some weaker. Just like your brain or the brain of your dog, the network is shaped by what it’s used for.

The computing cluster here at MAX IV is powerful enough for us to be able to train our network, says Jonathan. If we were to just use our laptops, it would take forever.

The project was quite a challenge, and it took a couple of months to get the network to understand what it was supposed to do.

At first, it looked like we had been working a long time for something that just was not going to be possible, and we were ready to write a crash report, says Isak with a laugh. But then the network finally started to learn.

A lot of data is essential, says Jonathan. We have used ten to fifteen thousand images to train the network, and we had to collect them ourselves, so that was quite a big task.

A so called heatmap of the sample. The X marks the spot that the artificial neural network believes is the optimal place for the beam to hit the sample. The color scale goes from blue to red with blue being a point with the least probability of being the center of the sample (the big blue dot marks the center of all the blue points)

BioMAX already has a sample changer that can automatically switch between 300 samples, but the researchers have to do the positioning of each sample manually.

The optimal future version would be that you could just fill the sample changer with crystals and then with the help of our neural network let the computer

control the whole process, Isak concludes.

They both agree that what they learned a lot of useful skills from the project.

This is a new area, and a lot of things are happening with machine learning and neural networks. It’s been great to have the opportunity to apply it to something real, says Jonathan

The masters’ thesis will be presented at Lund University in May.

If you are interested in learning more about artificial neural networks, and after talking to Isak and Jonathan we definitely are, they recommend the Youtube channel 3Blue1Brown by Grant Sanderson.