Image copyright Getty Images

Scientists have used machine learning to calculate the pattern of aftershocks following an earthquake.

Aftershocks are further quakes that follow the "main shock". They are by definition smaller, but sometimes not by much.

This is the first time a machine learning method has been used to work out where they might happen.

Researchers hope this and similar techniques will improve our understanding of earthquake behaviour.

"If you think about making forecasts of earthquakes," says study co-author Prof Brendan Meade of Harvard University, "you want to do three things; you want to predict when they're going to be, you want to say something about how large they're going to be and about where they're going to be.

"What we wanted to do is to tackle the last leg of this problem - that is where aftershocks are going to be."

Image copyright Science Photo Library Image caption Earthquakes frequently occur along tectonic plate boundaries

The team used a database of over 100,000 earthquakes and aftershocks, including Japan's 2011 earthquake, to train a neural network to recognise aftershock patterns.

They then set it to predicting these patterns in other earthquakes it hadn't seen before.

Neural networks are modelled on the processes and patterns of the human brain. So rather than putting data about the main earthquake through a set of calculations, which is how aftershocks are currently forecast, the network had the processing power to explore many possible pathways.

It could determine which areas around the fault - a fracture in the Earth's crust along which earthquakes occur - were likely to experience at least one subsequent shaking event after a main shock.

Image copyright Science Photo Library Image caption The San Andreas Fault runs through much of California

"The neural network just did better," says lead author Dr Phoebe DeVries, from the University of Connecticut.

Dr Elizabeth Cochran, a seismologist with the United States Geological Survey (USGS), who was not involved in the study, described it as "an interesting approach".

"It does give you a really nice picture of where around the the fault you should expect aftershocks to be," she told BBC News. However Dr Cochran noted that its prediction of a greater number of aftershocks closest to the fault was not surprising.

So, how will this help?

"We're quite far away from having this be useful in any operational sense at all," says Dr DeVries. "We view this as a very motivating first step."

It's not an approach that can integrate with initiatives like the US west coast's ShakeAlert early warning system just yet, but neural networks may offer a new way to process the extensive information collected about earthquakes and their aftershocks.

The aftershock chasers

Image copyright Elizabeth Cochran Image caption Hands on: a sensor deployed by geologists in Oklahoma

But where does this data come from in the first place?

Many earthquake prone areas, like California, have their own permanent network of seismometers. These detect and record all ground shaking activity.

But sometimes seismologists want a little more information, and that's where the aftershock chasers come in.

A little more sedate than storm chasing, it's never the less a scramble for geologists to get out to the site of an earthquake and set up equipment which can detect the thousands of aftershocks which will follow.

Dr Cochran has travelled to earthquake sites in California, Oklahoma and Mexico to place seismometers, and there are teams around the world who mobilise as soon as the news hits.

"You get most of your aftershocks in the first hour or day after the main shock, and the rate goes down after that. But aftershock sequences can last for months," she told the BBC.

"We try and get there relatively quickly but that can be between hours and days."

Image copyright Elizabeth Cochran Image caption Dr Cochran and colleagues set up a solar powered sensor in the Yuha Desert, southern California, after the 2010 El Mayor Cucapah earthquake

Sometimes the instruments can send back live data which can be used to inform residents of subsequent shaking, but the main goal is to learn more about the earthquake site itself and better understand future activity.

"Because there's a whole bunch of aftershocks, you get waves travelling across the fault in many directions... it's kind of like a CAT scan of the fault zone," Dr Cochran explains.

Rather than threatening to take her job, she feels that machine learning can only aid aftershock chasing in the future.

"As much as I'd like not to have to dig holes in the desert... I'm not out of a job yet."

"To me that type of machine learning is really exciting because that takes a huge amount of [processing] work off my plate, and I can get into the science of what's after."

The study was published in Nature.

Follow Mary on Twitter.