An early warning system that detects changes to the Earth’s magnetic field before earthquakes and tsunamis strike has been developed by scientists.

The computer programme called deep neural networks (DNN) based on the human brain detects magnetic field anomalies that precede the natural disasters.

Earthquakes and tsunamis cause widespread death and destruction so having an early warning system is vital to save lives.

Japan and other nations in seismic hotspots do have warning systems.

But it is often the case that the S-wave (or secondary wave) – the later part of the quake – has already arrived when the warning is given.

So developing a more accurate warning system could give residents sufficient time to seek safety such as heading to higher ground or getting to earthquake shelters.

Associate Professor Kan Okubo from Tokyo Metropolitan University explained: “It is known that earthquakes and tsunamis are accompanied by localised changes in the geomagnetic field.

“For earthquakes, it is primarily what is known as a piezo-magnetic effect, where the release of a massive amount of accumulated stress along a fault causes local changes in geomagnetic field; for tsunamis, it is the sudden, vast movement of the sea that causes variations in atmospheric pressure.

“This in turn affects the ionosphere, subsequently changing the geomagnetic field.

“Both can be detected by a network of observation points at various locations.

“The major benefit of such an approach is speed; remembering that electromagnetic waves travel at the speed of light, we can instantaneously detect the incidence of an event by observing changes in geomagnetic field.

“However, how can we tell whether the detected field is anomalous or not?

“The geomagnetic field at various locations is a fluctuating signal; the entire method is predicated on knowing what the ‘normal’ field at a location is.”

So together with Yuta Katori, Prof Okubo set out to develop a method to take measurements at multiple locations around Japan and create an estimate of the geomagnetic field at different, specific observation points.

Specifically, they applied a state-of-the-art machine-learning algorithm known as DNN modelled on how neurons are connected inside the human brain.

By feeding the algorithm a vast amount of input taken from historical measurements, they let the algorithm create and optimise an extremely complex, multi-layered set of operations that most effectively maps the data to what was actually measured.

Using half a million data points taken over 2015, they were able to create a network that can estimate the magnetic field at the observation point with unprecedented accuracy.

And because DNN has a relatively low computational cost it could be paired with a network of high sensitivity detectors to achieve lightning-fast detection of earthquakes and tsunamis.

Prof Okubo concluded: “For years, researchers have been studying the relation between earthquakes and geomagnetic field signals using observation results.

“Following our continuous geomagnetic observation, this report describes geomagnetic signal changes generated by earthquakes and tsunami waves.

“Results show that detection of their occurrence using geomagnetic field measurement is effective for providing an early alarm system for disaster mitigation.”

The study was published in the journal IEICE Communications Express.