Machine Learning method turns ‘pixie-dust’ into reality for ISIS experiment
16 Feb 2021
- Shikha Gianchandani and Rebecca Humble



Cross-department collaboration between ISIS and SCD leads to the development of a machine learning-based solution for super-fast analysis of results.


​​​​Professor Toby Perring in front of TS2 at ISIS.


To celebrate the collaborative community fostered at STFC, communications placement students Shikha Gianchandani and Rebecca Humble talked to Keith Butler (SCD) and Toby Perring (ISIS) about their latest project to use Machine Learning (ML) to understand the huge experimental dataset generated from an ISIS experiment.

When asked where the idea came from to apply a Machine Learning technique on a neutron scattering experiment, Toby's response was; “I'd heard about Machine Learning and I knew about the hype– but, as with everything, there's a promise and then there's reality. I was a receptive sceptic, but I wanted to see the plan in action." 

And this is how Keith Butler, a senior data scientist in the Scientific Machine Learning (SciML) group in the Scientific Computing Department, and Toby Perring, Individual Merit scientist at ISIS Neutron and Muon Source, together with ISIS colleague Duc Le, collaborated on the first-ever study to directly apply a neural network to an inelastic neutron scattering experiment. “Part of the reason I persuaded Toby about the project was because my background is in computational materials science and, for me, it's interesting to see how Machine Learning can be used to push the boundaries of fundamental science," said Keith.

“The Machine Learning technique used for the study is based on image recognition. It works just like our human brains when we distinguish objects. Say we're looking at one cat and one dog. Our human brains can instantly tell the difference between the two."

But how? They both have one tail, two ears and four legs. Well we have learnt to how to distinguish these as we've developed and, through the use of computer algorithms, computers can learn to do the exact same thing. However, instead of cats and dogs the computer had to learn to distinguish between two possible models for the magnetic material structure, called a half-doped manganite, used in the original ISIS experiment. And instead of one image of each of the possible two models, there were 3000 of each!

“The simulated images were labelled as either model A or B and they were used to train the network. When the network was fed the actual experimental data, it correctly picked up that the magnetic material structure was model A," said Toby, who went on to add, “What was interesting is that when I did the original experiment it took me three years to find the correct answer by combing through the data by hand. The machine learning model did it in a couple of weeks."

This was an astonishing result, and raised the question of how reliable the machine learning technique was. Keith explains, “Often with these ML models you train them to say A or B, that's all they know. What we wanted to know is how confident the model was that it was A or B." To test this, they fed the model fake inelastic neutron experimental results, which had very similar characteristics to the real data. The result of which, when the model was deciding its classification, it concluded, “I'm not confident it belongs to any of the classes that you've shown me."

Toby says, “This is important as there may be a classification we haven't yet seen, such as C." He continues, “It's persuaded both me and my colleagues that Machine Learning, which was previously thought to be 'pixie dust', has got real potential to change the way we analyse our data. If we can get the time to analyse an experiment and into the public domain down from two years to two months, it will significantly enhance the impact of the work that we do at ISIS."

For Keith, he says “The real value to the SciML Group was working with people who were willing to try ML. The questions the scientists were asking really encouraged us to come​ up with the answers and build the solutions for them. What we want to do in SciML is to make things that are actually useful to scientists!" 

So what's next in this collaboration? Toby answers, “I would like to see something that is a general tool for ISIS users which is available as part of our analysis armoury." Keith continues, “We have an open source repository associated with the paper, which has the code that can be used to generate our results. We believe to have maximum impact, we need to make sure people can reuse it."

Further information:

Shikha and Rebecca's article made it British Computing Society's website. Click here to find out more on the topic.​

​Full publication available here.​​

Contact: Gianchandani, Shikha (STFC,RAL,ISIS)