Tomorrow’s physics test: machine learning
Machine learning is becoming an essential part of a physicist’s toolkit. How should new students learn to use it?
When Radha Mastandrea SB ’19 started her undergraduate physics program at MIT in 2015, she knew she was going to need some new computing skills.
As she made her way through her coursework, she took a class in the computer language Python and taught herself some coding. But when she landed an internship at MIT Lincoln Laboratory, her supervisors asked her to take on a task she had not anticipated. They asked her to identify types of stars by training a neural network, a type of machine learning that teaches computers to process data like the brain processes information.
Mastandrea had to learn on the fly. She looked up tutorials online and spent hours researching problems with her code. The work was frustrating and difficult.
At the end of the project, she was relieved to go back to learning about the universe from textbooks and equations. She thought she’d never want to use machine learning again.
“That was very wrong,” Mastandrea says. “Now I use machine learning every day.”
As a doctoral student at the University of California, Berkeley, Mastandrea is now writing algorithms that can hunt for signatures of unknown new physics in data from the Large Hadron Collider. She says that without machine learning, this type of search, called anomaly detection, would be nearly impossible.
As Mastandrea shifted from machine-learning skeptic to regular user, so too did much of the rest of physics. That meant a constant flow of interesting new challenges. “It’s a lot easier to be excited about it when everyone is working on it,” she says.
The change took place over the last five to 10 years, says Kazuhiro Terao, a staff scientist at the US Department of Energy’s SLAC National Accelerator Laboratory. The increased use of machine learning—a subset of artificial intelligence—is changing what current students need to learn, what kinds of opportunities they’ll have when they graduate, and how they will in turn need to educate the physicists of the future.
“The level of maturity is still in early days,” Terao says. “We have to bring up the standards of machine learning and statistics much higher than where we are right now.”
The need for data science
To some extent, physics students have always needed to be part data-scientist. Unlike scientists in many other fields, particle physicists and astrophysicists can often see what they study only as data points on a chart or computer screen. As the tasks involved with analyzing that data continue to grow more complex, so too do the tools that scientists need to use. One of those tools is machine learning.
Unlike traditional algorithms, machine-learning algorithms can improve over time as they devise their own rules based on the data they’re fed. This improvement could speed up analysis processes that currently take several years, expanding the possibilities of what physics students can accomplish during their limited time in school, Terao says.
When the neutrino experiment MicroBooNE began operating in 2015, for example, scientists initially expected to have their first results right away, Terao says. But even though the experiment successfully collected the data the scientists needed, analyzing it was so difficult that the collaboration didn’t publish any results until 2021.
For Terao, who was already an established physicist, the delay meant spending more time working on analysis techniques. But for the graduate students whose few years of research overlapped with that downtime, the delay meant missing out on contributing to new findings at all.
Those long timelines “seriously limit the way we think” about the structure of physics education, Terao says. Faster analyses, powered by machine learning, could help. “I want to accelerate what we can do so that students can experience more things.”
From physics to industry
Even when progress is slow, gaining experience in machine learning can open new opportunities for students outside of science.
As an undergraduate, Kylie Ying majored in computer science and physics. After graduation, she took a web-development job that allowed her time to focus on her passion: figure skating. But once the pandemic hit, she decided to return to physics by completing a one-year master’s.
She joined a lab that was colliding heavy ions in order to recreate the incredibly hot, dense environment that existed immediately after the Big Bang, known as the quark-gluon plasma. To learn more about the characteristics of the QGP, the scientists trace particle jets as they move through it. Despite having little experience in machine learning, Ying dove into a project developing an algorithm to decipher which types of particles initiated the jets.
She loved the science, but she was frustrated at how distant her work felt from a meaningful result. “Physics is really cool, and really inspiring,” she says. “But to me, I felt like the impact of my really hard work was pretty minimal.”
She still found a way to use the experience. She took the computation skills she’d learned to Wing, an autonomous drone delivery company owned by Google’s parent company, Alphabet, where she’s now working on the drones’ computer vision.
Physicist Lucas Borgna also found a way to apply his research experience outside the lab.
As an undergraduate engineering physics major, he spent a year on the ATLAS experiment at the LHC through a work-experience program. Later, as a graduate student at University College London, he helped develop neural networks that could distinguish bosons from quark jets in the ATLAS data.
After switching to the CMS experiment for his postdoc, Borgna did a six-week internship with a startup called Faculty, which matches science and engineering students with businesses in need of artificial-intelligence expertise. Borgna matched with a London housing company.
Using natural language processing, Borgna helped the company analyze data on the use of its buildings in order to improve tenants’ standards of living. The experience opened his eyes to the possibilities of machine learning beyond physics.
“I love physics and I found it fun, and I think all the things that are coming are really interesting,” Borgna says. “But at the same time, there are all these other industries using very similar techniques and tools that are also challenging and having lots of interesting results.”
Rethinking physics training
Like Ying and Borgna, Andrew Hard first encountered machine learning on the job. As a graduate student, Hard worked with a team that was creating tools to search for signs of the Higgs boson in ATLAS data by identifying a specific decay of the particle to two photons.
Starting in 2011, the team developed neural networks for photon identification and event classification. Suddenly, Hard’s analysis became much more sensitive to Higgs decays. “It was just an incredibly powerful algorithm,” Hard says. “That’s what gave me this idea that there was something to all this talk about neural networks.”
Like most physics students at the time, Hard had no formal education in machine learning, or even coding—he had taught himself the computer languages Python and C++. “It was exciting but really challenging,” Hard says. “It was probably the biggest gap in my physics education.”
As part of his doctorate, Borgna did eventually take both machine-learning and data-science courses, which he found beneficial. Having formal course requirements “is really helpful, given the prevalence of these algorithms and how often they’re being used,” Borgna says.
To ensure students get the training they need, Terao at SLAC is advocating for all physics programs to adopt more structured approaches to machine-learning education.
Students can get only so far learning by experimentation and practice. To truly use machine learning successfully, Terao says, they also need to develop a strong understanding of the statistics and math behind the algorithms. “We as a field have to offer these courses,” he says. “They are becoming essentially requirements for PhD research.”
In summer 2023, Terao co-organized the annual SLAC Summer School Institute, which was focused that year on the theme of “Artificial Intelligence in Fundamental Physics.” Unlike in years organized around different themes, Terao says, many of the speakers were early in their careers—largely because the latest developments in machine learning are so novel, even to senior scientists.
The workshop was a good start to providing students organized opportunities to learn about physics and machine learning, Terao says. But the field needs to do more.
“What’s important for us is to provide more opportunities for them to try,” Terao says. “We need to provide access to lots of research challenges, share lots of datasets, and prepare the stage for new people.”
Other major physics organizations are starting to offer training as well. In 2022, the American Physical Society’s Group on Data Science began hiring physics doctoral students to write introductory machine-learning tutorials based on Google Golab, an open-source, sharable software platform. Scientists are creating similar resources at CERN, Mastandrea says.
“People really want undergrads to get their hands dirty with these tools,” Mastandrea says. “The earlier you start using them, the more fluent you’ll be with them.”
An array of opportunities
When he was a doctoral student working on a physics analysis for ATLAS, Sean Gasiorowski used machine learning to better characterize background clutter in searches for pairs of Higgs bosons, setting the stage for better traditional analyses of signals.
He hadn’t intended to focus on machine learning. But the more he used it, the more it drew him in. “It’s pretty satisfying when the pipeline comes together and you’re able to start seeing the results you want,” he says.
Machine-learning skills can help a student land a position in a physics lab, especially now that funding agencies are offering physicists grants to encourage work in machine learning. But physics labs aren’t the only ones hiring.
Gasiorowski is now a postdoc in SLAC’s machine-learning group, which works with projects across the multi-program national laboratory. Part of his research is working with Terao on analysis tools for the Deep Underground Neutrino Experiment, but he also supports researchers in fields like materials science.
Whether they stay in academia or not, students gain unique expertise by developing machine-learnings skills in the context of particle physics or astrophysics.
Part of that is the sheer amount of data they have to use. In some research areas, a data scientist might have only hundreds or thousands of data points on which to train their model. At a telescope taking hundreds of high-resolution images of the sky each night, or at an accelerator experiment observing hundreds of millions of collisions each second, a scientist can have access to much more. “How good your model is is usually pretty directly related to how much data you have to train on,” Gasiorowski says.
Many of the skills physicists need to learn easily transfer into other industries, Ying says. For example, physicists must learn to identify quality information. They must learn to precisely formulate their research questions and ensure the available data can answer them. And, Hard says, physicists must learn to understand the math behind their analyses, which helps them understand the principles behind neural networks.
Mastandrea, for her part, is eyeing a new kind of career path: She’s hoping to become a joint professor in physics and computing, a rare position that universities began to advertise in only the last few years.
At the end of 2023, Mastandrea attended a relatively new workshop called Hammers and Nails, which explores how current problems in physics—the “nails”—can be addressed with machine-learning architectures—the “hammers.” The program was founded in 2017 and has been held only four times so far.
“It’s a really exciting time to be in the field,” Mastandrea says. “We have more tools than we know what to do with.”