Data-Driven Earthquake Location Method Project...

6
Data-Driven Earthquake Location Method Project Report Weiqiang Zhu (06118474), Kaiwen Wang (06122739) Department of Geophysics, School of Earth, Energy and Environmental Science 12/16/2016 1 Abstract Earthquake location is one of the most funda- mental and important problems in Geophysics. Traditional earthquake location methods depend on dense array and high signal to noise rate of data. In this project, we try to apply machine learning algorithms trained on historical seismic wave records to locate earthquakes which only needs one or few stations and independent of prior physical knowledge. 2 Introduction Earthquake is one of the most commonly hap- pened disasters with devastating consequences and poses significant risks to human society. The ability to determine the time and location of an earthquake can provide valuable information for rescue guidance, hazard assessment and sci- entific study. After a destructive earthquake, an accurate earthquake location is the most im- porttance information needed for rescue. Earth- quakes also provide valuable information for sci- entists to study our Earth: the movement of plates, the property of rock in Earth’s interior and local geological background. The traditional way to get earthquake locations is to manually pick the first arrival times of seis- mic waves and run inversion algorithms based on seismic-wave velocity model of Earth (Figure 1). Input Seismic data Pick first arrivals Estimate velocity model Run inversion algorithm based on travel time Output Earthquake locations Input Seismic data Output Earthquake locations Learning algorithm trained on historical records Figure 1: Earthuqake location methods In this project, we tested two machine lean- ing algorithms to do earthquake locating: k - nearest neighbors( k -NN) algorithm and convo- lutional neural network (CNN) algorithm. The inputs of our data set are seismograms (the waveforms of ground shaking) of earthquakes recorded at seismic stations. The outputs are the latitudes and longitudes of the epicenters of these earthquakes. We expect the machine learn- ing methods to capture more features using the full waveforms of earthquakes, instead of only us- ing the first arrival times and figure out the rela- tionship between these features to predict earth- quake locations. 3 Related Work One of the current research direction of im- provement of earthquake locations is to deploy a dense array with bore hole stations (Hi-net in Japan) [1, 2]. The dense array provides more 1

Transcript of Data-Driven Earthquake Location Method Project...

Page 1: Data-Driven Earthquake Location Method Project Reportcs229.stanford.edu/proj2016/report/ZhuWang-Data-Driven... · 2017. 9. 23. · Data-Driven Earthquake Location Method Project Report

Data-Driven Earthquake Location Method

Project Report

Weiqiang Zhu (06118474), Kaiwen Wang (06122739)Department of Geophysics, School of Earth, Energy and Environmental Science

12/16/2016

1 Abstract

Earthquake location is one of the most funda-mental and important problems in Geophysics.Traditional earthquake location methods dependon dense array and high signal to noise rate ofdata. In this project, we try to apply machinelearning algorithms trained on historical seismicwave records to locate earthquakes which onlyneeds one or few stations and independent ofprior physical knowledge.

2 Introduction

Earthquake is one of the most commonly hap-pened disasters with devastating consequencesand poses significant risks to human society. Theability to determine the time and location ofan earthquake can provide valuable informationfor rescue guidance, hazard assessment and sci-entific study. After a destructive earthquake,an accurate earthquake location is the most im-porttance information needed for rescue. Earth-quakes also provide valuable information for sci-entists to study our Earth: the movement ofplates, the property of rock in Earth’s interiorand local geological background.

The traditional way to get earthquake locationsis to manually pick the first arrival times of seis-mic waves and run inversion algorithms based onseismic-wave velocity model of Earth (Figure 1).

InputSeismicdata

Pickfirstarrivals

Estimatevelocitymodel

Runinversionalgorithmbasedontraveltime

OutputEarthquakelocations

InputSeismicdata

OutputEarthquakelocations

Learningalgorithmtrainedonhistoricalrecords

Figure 1: Earthuqake location methods

In this project, we tested two machine lean-ing algorithms to do earthquake locating: k-nearest neighbors(k-NN) algorithm and convo-lutional neural network (CNN) algorithm. Theinputs of our data set are seismograms (thewaveforms of ground shaking) of earthquakesrecorded at seismic stations. The outputs arethe latitudes and longitudes of the epicenters ofthese earthquakes. We expect the machine learn-ing methods to capture more features using thefull waveforms of earthquakes, instead of only us-ing the first arrival times and figure out the rela-tionship between these features to predict earth-quake locations.

3 Related Work

One of the current research direction of im-provement of earthquake locations is to deploya dense array with bore hole stations (Hi-net inJapan) [1, 2]. The dense array provides more

1

Page 2: Data-Driven Earthquake Location Method Project Reportcs229.stanford.edu/proj2016/report/ZhuWang-Data-Driven... · 2017. 9. 23. · Data-Driven Earthquake Location Method Project Report

data and the bore hole stations have higher sig-nal to noice ratio. Since the cost of deploy-ing and maintaining high resolution seismome-ters are relatively high, it’s not practically pos-sible to cover the Earth with dense bore holearray. Another approach is the Double Differ-ence method [3], which locate earthquakes usingrelative locations. This method could reduce theerror based on a reference event. However, theevents must be close enough(within 1

2λ), and theerror of relocated events depends on the error ofthe reference event. Our goal is to apply ma-chine learning algorithms to locate earthquakeswith one or few stations using more and morehitorical earthquake location records.

4 Dataset and Features

Two datasets are used here: one in Califor-nia and the other in Japan. For the CAdataset, we use earthquakes between 5/11/2016and 11/11/2016 in Southern California (lat-itude range: 34.3∼39.3N, longitude range:135.7∼145.7E). The waveforms are recorded ata seismic station whose Network code is CI andstation code is Q0001. In total, there are 30events (Figure 2(a)). We use each of them astest set while the other 29 as training set. Forthe Japan dataset, we use earthquakes whosemagnitude above Mw 5 between 01/01/1998and 10/06/2016 in east asia (latitude range:21.0∼51.0N, longitude range: 117.1∼147.1E).Four seismic stations in Network IU of codes:MAJO, YSS, INCN and TATO are used. In to-tal, there are 2510 events (Figure 2(b)). We usethe first 100 data as validation set and the restas training set.

Figure 3 shows examples of the seismic records.Figure 3(a) is a record with high signal to noiseratio. Figure 3(b) is a record with low signal tonoise ratio. We can see clearly the waveform gen-erated by an earthquake. Figure 3(c) and 3(d)shows Hilbert transformation of the good andbad data. Figure 3(e) and 3(f) shows Wavelet

transformation of the good and bad data. Allrecords regardless of high or low signal to noiseratio are used in training at current stage.

33°N

33.5°N

34°N

34.5°N

118.5°W 118°W 117.5°W 117°W 116.5°W 116°W 115.5°W

(a) Dataset in California

25°N

30°N

35°N

40°N

45°N

120°E 125°E 130°E 135°E 140°E 145°E

(b) Dataset in Japan

Figure 2: Seismic stations

5 Methods

5.1 k-NN

k-nearest neighbors algorithm(k-NN) is firsttested to predict earthquake locations. Themethod is based on the fact that nearby earth-quakes are similar in waveforms. The similaritybetween two waveforms are expressed in corre-lation distance. The prediction of location is anaverage of the location of k nearest neighbors,weighted by the inverse of their correlation dis-tance to the query event.

This algorithm works as follows:

Step 1. Compute the distance in waveformsfrom the test example to training examples.

Step 2. Find the k-nearest neighbors of the testexample.

Step 3. Calculate an inverse distance weightedaverage of the k-nearest neighbors.

2

Page 3: Data-Driven Earthquake Location Method Project Reportcs229.stanford.edu/proj2016/report/ZhuWang-Data-Driven... · 2017. 9. 23. · Data-Driven Earthquake Location Method Project Report

−0.9

−0.6

−0.3

0.0

0.3

0.6 IU.INCN.00.BHZ

−0.6

−0.3

0.0

0.3

0.6IU.MAJO.00.BHZ

−0.6

−0.3

0.0

0.3

0.6IU.TATO.00.BHZ

2016-01-02T04:23:00 04:25:00 04:27:00 04:29:00

−0.6

−0.3

0.0

0.3

0.6IU.YSS.00.BHZ

2016-01-02T04:22:19.6 - 2016-01-02T04:30:39.569538

(a) Good raw data

−0.8

−0.4

0.0

0.4

0.8 IU.INCN.00.BHZ

−0.8

−0.4

0.0

0.4

0.8 IU.MAJO.00.BHZ

−0.8

−0.4

0.0

0.4

0.8 IU.TATO.00.BHZ

2016-01-20T21:55:00 21:57:00 21:59:00 22:01:00

−0.8

−0.4

0.0

0.4

0.8IU.YSS.00.BHZ

2016-01-20T21:53:41.5 - 2016-01-20T22:02:01.469539

(b) Bad raw data

0 100 200 300 400 5000.00.20.40.60.81.01.2

0 100 200 300 400 5000.0

0.2

0.4

0 100 200 300 400 5000.0

0.2

0 100 200 300 400 500Time [s]

0.0

0.2

0.4

0.6

0.8

(c) Hilbert transformationof good data

0 100 200 300 400 5000.0

0.2

0 100 200 300 400 5000.0

0.2

0.4

0 100 200 300 400 5000.00.20.40.60.81.0

0 100 200 300 400 500Time [s]

0.0

0.2

0.4

(d) Hilbert transformationof bad data

(e) Wavelet transformationof good data

(f) Wavelet transformationof bad data

Figure 3: Examples of training set data

5.2 Convolutional neural net-work

Convolutional neural network (CNN) [4] is shiftinvariant and good at understaning the spatialrelationship inside a picutre. The seismic wave-form (Figure 3(a)) consists of many different fea-tures like: body waves, surface waves, P wave,S wave and many other phases [5]. All thesephases have different speeds and arrive at spe-cific times at different stations, so they have richinformation about the source locations. If CNNcan learn these features from seimic waveforms,it may be able to predcit the earthquake loca-tions.

6 Results

6.1 k-NN

First we try to run k-NN regression quick-and-dirty on raw data to get a main idea of what’shappening. We randomly chose an event to bethe query event from out set of 30 events. Theregression result is in Figure 4(a). The meanerror is shown in Table 1.We could see clearlythat finding better nearest neighbors account formost of the improvement. That is, our nextstep should focus on improving the accuracywhen calculating the distance between wave-forms. There are mainly two ways to achievethat. One way is to process the input waveformsand the other way is to choose a better distancefunction.

We first tried several ways to process our inputwaveforms. We tried removing the trend andmean, tapering, filtering with different frequencyband and Hilbert transformation. The best con-dition to process data is to remove the mean andtrend, taper, filter between 0.1 to 5 Hz, Hilberttransform and low pass filter under 2 Hz. Theregression result of the processed data is shownin Figure 4(b).

3

Page 4: Data-Driven Earthquake Location Method Project Reportcs229.stanford.edu/proj2016/report/ZhuWang-Data-Driven... · 2017. 9. 23. · Data-Driven Earthquake Location Method Project Report

Then we tried to choose a better distance func-tion. We found that correlation distance hassmaller error compared with Euclidean distance.We also chose a better k and further reducedthe mean error. The result is shown in Figure5(a). Using three-components data did not givea smaller error. Possibly because the Z compo-nent has better records of local earthquakes com-pared with the other two components.

We also applied the method to Japan dataset.The result is shown in Figure5(a). The mean er-ror is shown in Table 1. For the same reason asusing multiple components, using multiple sta-tions also did not reduce the error.

-118.5 -118 -117.5 -117 -116.5 -116 -115.5

Latitude

32.8

33

33.2

33.4

33.6

33.8

34

34.2

34.4

34.6

34.8

Lo

ng

itu

de

Traing events

Seismic station

Pridiction of test event

True value of test event

k-nearest events

(a) Input raw data

-118.5 -118 -117.5 -117 -116.5 -116 -115.5

Latitude

32.5

33

33.5

34

34.5

35

Longitude

Traing events

Seismic station

Pridiction of test event

True value of test event

k-nearest events

(b) Input processed data

Figure 4: Plots for prediction of a query event

-118.5 -118 -117.5 -117 -116.5 -116 -115.5

Latitude

32.8

33

33.2

33.4

33.6

33.8

34

34.2

34.4

34.6

34.8

Longitude

Traing events

Seismic station

Pridiction of test event

(a) CA dataset

25°N

30°N

35°N

40°N

45°N

120°E 125°E 130°E 135°E 140°E 145°E

x: True locations

x: Predicted locations

(b) Japan dataset

Figure 5: Predictions of CA and Japan dataset

6.2 CNN

6.2.1 CNN structure

The stucture of our CNN is show in Figure 6.The neural network consisits of two covolutionallayers, two max pooling layers and a fully con-nected layer with 50 percent drop out. The

Table 1: mean error of different improvements

Improvements Evlo Evla

Train on raw data(CA) 0.4066 0.5250

Data processing(CA) 0.2201 0.3822

Distance function(CA) 0.1351 0.2654

Parameter k(CA) 0.1371 0.2396

Three-components(CA) 0.4177 0.3313

CA data location limit 0.0342 0.0530

More events(Japan) 2.8803 2.9646

Four stations(Japan) 2.9505 3.8858

Japan data location limit 0.0601 0.0623

nurel network is trained using 2510 earthquakesaround Japan. The first 100 samples are usedas the validation data set. The mini-batch sizeis setted as 100. The start learning rate is 0.01and the decay rate is 0.99. Our CNN is imple-mented based on Tensorflow [6].

The input data are the raw data, data afterhilbert transform and data after wavelet trans-form. Because 4 stations are used in this paper,the input data consist of four channels. Due tolimitiation of computatioal power, we have to ap-ply down-sampling of the origial data. The datashape of each channle is 1 × 1000 for raw dataand data after hilbert transform, 25×50 for dataafter wavelet tranform.

The output data are predicted coordinates: log-itudes and latitudes. L2-norm of difference be-tween true and predicted coordinates is used asthe loss function.

6.2.2 Predicted results of CNN

The training errors using data after wavelettransform is shown in Figure 7. The predicted

4

Page 5: Data-Driven Earthquake Location Method Project Reportcs229.stanford.edu/proj2016/report/ZhuWang-Data-Driven... · 2017. 9. 23. · Data-Driven Earthquake Location Method Project Report

Figure 6: Convolutional neural network struc-ture

earthquake locations of the validation data set isshown in Figure 8. Most of the predicted loca-tions are very near to their true locations. TheCNN method achieves a very high prediction ac-curacy.

The comparison of training erros between rawdata, data after hilbert transform and data afterwavelet transform are shown in Figure 9. Theresult of data after wavelet transform shows thelowest training error on valid data set.

0 500 1000 1500 2000 2500Iterations

0

10

20

30

40

50

60

70

Mean squared error

Validation setTraining set

Figure 7: Training errors of data after wavelettransform

25°N

30°N

35°N

40°N

45°N

120°E 125°E 130°E 135°E 140°E 145°E

x: True locations

x: Predicted locations

Figure 8: Predicted earthquake locations

13.52

10.45

5.16

0246810121416

Rawdata Hilberttransform Wavelettransform

Meansquareerror

Figure 9: Training errors of different input datatypes

7 Conclusion and FutureWork

In this report, we have successfully appliedmathine learning methods to earthquake loca-tions,which has never been tried before. Both al-gorithms (kNN and CNN) show reasonable pre-diction results. CNN has better accuracy whiletesting on the data in Japan. But currently thetwo algorithms could not provide as accurate re-sults as traditional methods. Possible reasons formislocating may include: 1. background noise 2.not enough historical data. 3. errors of find-ing nearest neighbor. 4. errors in down sam-pling of input data. Further improvements wouldbe required to put them into practical applica-tion.

To find out the main reason for high error ofkNN, we applied error analyses. Due to the limitof events catalog, the perfect result(if we findall the k-neighbor correctly) should have a meanerror of (0.03,0.05)(shown in Table 1), which isstill a magnitude lower to current error. Thus,for future research, the most room for improve-ment is still finding k-nearest neighbor more pre-cisely.

For CNN, higher data sampling rate and deeperneural network may help to improve the accuracyfurture as it can capture more accurate informa-tion of different arrival times of phases.

5

Page 6: Data-Driven Earthquake Location Method Project Reportcs229.stanford.edu/proj2016/report/ZhuWang-Data-Driven... · 2017. 9. 23. · Data-Driven Earthquake Location Method Project Report

References

[1] Yoshimitsu Okada, Keiji Kasahara, SadakiHori, Kazushige Obara, Shoji Sekiguchi, Hi-royuki Fujiwara, and Akira Yamamoto. Re-cent progress of seismic observation net-works in japanhi-net, f-net, k-net and kik-net. Earth, Planets and Space, 56(8):xv–xxviii, 2004.

[2] Kazushige Obara, Keiji Kasahara, SadakiHori, and Yoshimitsu Okada. A denselydistributed high-sensitivity seismograph net-work in japan: Hi-net by national researchinstitute for earth science and disasterpre-vention. Review of scientific instruments,76(2):021301, 2005.

[3] Felix Waldhauser and William L Ellsworth.A double-difference earthquake location al-gorithm: Method and application to thenorthern hayward fault, california. Bul-letin of the Seismological Society of America,90(6):1353–1368, 2000.

[4] Yann LeCun and Yoshua Bengio. Convolu-tional networks for images, speech, and timeseries. The handbook of brain theory and neu-ral networks, 3361(10):1995, 1995.

[5] Peter M Shearer. Introduction to seismology.Cambridge University Press, 2009.

[6] Martın Abadi, Ashish Agarwal, PaulBarham, Eugene Brevdo, Zhifeng Chen,Craig Citro, Greg S Corrado, Andy Davis,Jeffrey Dean, Matthieu Devin, et al. Ten-sorflow: Large-scale machine learning onheterogeneous distributed systems. arXivpreprint arXiv:1603.04467, 2016.

6