1 Introduction

The Gutenberg–Richter law (also known as ‘G–R law’, Gutenberg and Richter 1944) describes the relationship between earthquake magnitude and the number of earthquakes greater than or equal to that magnitude. It can be expressed as:

$$\log_{10} N = a - bM,$$
(1)

where M is the earthquake magnitude, N is the number of earthquakes with a magnitude greater than M, and a and b are constants. This relationship has been widely applied in seismological research, e.g., in assessing the frequency of earthquakes of different magnitudes (Wang et al. 2016), spatiotemporal variations of b-values before some M ≥ 6.0 earthquakes (Chan et al. 2012), the relationship between b-values and stress states (Wu et al. 2018), and using b-values as indicators for earthquake precursors (e.g., Gulia and Wiemer 2019; Wang 2021; Wang et al 2015; 2016).

Previous studies (Lay and Wallace 1995) indicated that the global average b-value is approximately 1.0. However, the b-value is spatial heterogeneous due to differences in regional geological structures and the earthquake data used. For example, Smith (1981) observed that regions near the epicenter of M ≥ 6.0 earthquakes initially showed an increase in the b-value, which then returned to normal. Conversely, some studies have shown that b-values decrease before M ≥ 6.0 earthquakes (e.g., Chan et al. 2012). As a result, the mechanism behind the variations of b-values in areas adjacent to impending earthquakes remains controversial.

Recent advances in integrated seismic networks have led to an improvement in the quality of earthquake detection by Taiwan’s regional observation network, making the earthquake catalog more comprehensive (Chang et al. 2012; Lai et al. 2016). Furthermore, due to the high seismic activity in Taiwan, there is a wealth of earthquake data available, providing a more detailed basis for precursor research. Previous studies (e.g., Chan et al. 2012; Chen et al. 1990; Lin 2010; Wu and Chiao 2006) investigated the variations in b-values before large earthquakes up to 2009. However, that research did not include post-2010 earthquakes. Moreover, the Central Weather Administration Seismic Network was upgraded in 2012, capable of recording more small earthquakes and providing a more precise earthquake catalog (Chang et al. 2012; Lai et al. 2016), potentially enhancing the quality of precursor research.

Given this context, this study aims to explore the spatiotemporal variations of b-values before moderate to large earthquakes with hypocentral depth less than 40 km in Taiwan using a more comprehensive and complete dataset. Initially, the 2018 Mw 6.3 Hualien earthquake sequence was investigated to understand the spatiotemporal variations of its preceding b-values and to clarify the feasibility of using b-values as a precursor index. Based on the experience from the Hualien case, this research further discusses the spatiotemporal variations of b-values before earthquakes larger than magnitude 6.0 in Taiwan from 1999 to 2021. Lastly, the study examined the March 2022 Yuli earthquake and the September 2022 Chihshang earthquake sequence as case studies to assess the feasibility of real-time monitoring of b-value earthquake precursors.

2 B-value estimation and earthquake catalog

The G–R law illustrates seismic activity in a region. In this study, we obtained b-values by using the maximum likelihood method (MLE) to regress an earthquake catalog (Aki 1965; Kijko 1988; Utsu 1965, 1999). MLE is a fundamental statistical method used to estimate the parameters of a statistical model given observed data. The MLE method involves maximizing the likelihood function, which represents the conditional probability of observing the given data under specific model parameters, denoted as \(\theta\). Under the G–R law, the formula calculated using the likelihood function is expressed as:

$$L\left( \theta \right) = \mathop \prod \limits_{i = 1}^{n} f\left( {y{|}\theta } \right),$$
(2)

where \(f\left(y|\theta \right)\) is the probability density function of the residuals \(y\), defined as the difference between the observed and modeled values (\(y={y}_{i}-\widehat{{y}_{i}}\)), given the parameter \(\theta\). Assuming that the residuals are normally distributed, the parameters \(\theta\) are typically the mean (\(\mu\)) and standard deviation (\(\sigma\)) of the distribution.

The goal of MLE is to find the parameter values \(\theta\) that maximize the likelihood function:

$$\mathop {\max }\limits_{\theta } L\left( \theta \right).$$
(3)

For normally distributed residuals, the probability density function is given by:

$$f\left( {y{|}\mu ,\sigma } \right) = \frac{1}{{\sigma \sqrt {2\pi } }}{\text{exp}}\left( { - \frac{{\left( {y - \mu } \right)^{2} }}{{2\sigma^{2} }}} \right).$$
(4)

Taking the natural logarithm of this function simplifies the computation and leads to the log-likelihood function, which is commonly used in MLE due to its computational advantages:

$$\ln L\left( {\mu ,\sigma } \right) = \mathop \sum \limits_{i = 1}^{n} \left( { - \ln \left( {\sigma \sqrt {2\pi } } \right) - \frac{{\left( {y - \mu } \right)^{2} }}{{2\sigma^{2} }}} \right).$$
(5)

In practical applications, maximizing the log-likelihood function is equivalent to minimizing the negative log-likelihood function. This can be efficiently performed using Python’s ‘scipy.optimize.minimize’ function, which minimizes a scalar function of one or more variables. The log-likelihood function can be minimized as follows:

$$\mathop {\min }\limits_{\mu ,\sigma } \left( { - \mathop \sum \limits_{i = 1}^{n} \left( { - {\text{ln}}\left( {\sigma \sqrt {2\pi } } \right) - \frac{{\left( {y - \mu } \right)^{2} }}{{2\sigma^{2} }}} \right)} \right).$$
(6)

This minimization is using the limited-memory BFGS (L-BFGS-B) algorithm, implemented in the ‘scipy.optimize.minimize’ function. Upon successful minimization, the results yield the most likely a- and b- value given the residuals (\(y\)).

To validate regression quality, we reported corresponding standard deviation of the regression (Aki 1965) as:

$$\sqrt {\frac{1}{n - 2} \times \frac{{\sum \left( {y_{i} - \hat{y}_{i} } \right)^{2} }}{{\sum \left( {m_{i} - \overline{m}} \right)^{2} }}} ,$$
(7)

where \(n\) is number of events, \({y}_{i}\) and \({\widehat{y}}_{i}\) are the observed and modeled values for magnitude \({m}_{i}\), \(\overline{m}\) is the averaged magnitude for the catalog.

Investigating the b-value evolution relies on high-quality earthquake records. In Taiwan, the broadcast of earthquake information is officially overseen by the Central Weather Administration (CWA), formerly known as the '’Central Weather Bureau’ before September, 2023. The Central Weather Administration Seismographic Network (CWASN), established in 1991 (Shin 1993), became fully operational by 1993. Before 2012, the CWASN primarily used short-period sensors and some strong-motion sensors with 12-bit resolution (represented as triangles in Fig. 1c). Since 2012, these sensors have been upgraded to 24-bit resolution. To enhance the detection of both strong and subtle seismic activity, a variety of sensors have been deployed, including short-period, broadband, and strong-motion types. These sensors were strategically placed at different locations: on the surface, in boreholes, and even on the ocean floor (Hsiao et al. 2014). The network's coverage and density were further enhanced by integrating the ‘Broadband Array in Taiwan for Seismology’ (https://bats.earth.sinica.edu.tw) network, managed by Academia Sinica, and a Japanese station named YOJ (represented as triangles in Fig. 1d). In the CWASN catalog, the magnitude scale of each earthquake is in local magnitude (Shin 1993). We are aware that the local magnitude scale might be saturated for large events. However, most of the events used in our b-value calculations are smaller than magnitude 6.0 (events with M ≥ 6.0 were considered as target events for the precursory index).

Fig. 1
figure 1

Spatial distribution of earthquake magnitude completeness in Taiwan for the periods. a 1994–2011 and b 2012–2021, along with the distribution of seismic stations and seismicity for the same periods, shown in c and d, respectively

Considering the complexity of Taiwan’s tectonic setting, which includes two subduction systems, we focused on shallow seismic activity in the crust. We selected earthquakes with depths shallower than 40 km, corresponding to the average depth of the iso-velocity line of the P-wave velocity of 7.5 km/s from tomography (Huang et al. 2014).

Earthquakes with smaller magnitude occur more frequently (Gutenberg and Richter 1944). However, due to observational quality constraints, small magnitude earthquakes are difficult to be recorded comprehensively. The smallest earthquake magnitude that a network can observe completely is referred to as the minimum complete earthquake magnitude. To ensure the quality of the earthquake catalog, we followed the procedure of the maximum curvature method proposed by Wiemer and Wyss (2000) that assessed the minimum magnitude at which all events are recorded (known as the magnitude of completeness or “Mc”) across various observation periods. To determine Mc, we counted the number of events in each magnitude bin and identified the magnitude with the highest event count as Mc.

To understand the spatial distribution of Mc, we divided the study region into grid points with latitude and longitude intervals of 0.1°. We then searched for earthquake data within 0.15° of the center of each grid point, presenting the spatial distribution of Mc for the periods 1994–2011 and 2012–2021 (presented in Fig. 1a and b, respectively). During 1994–2011, the Mc for inland Taiwan was mostly around 2.0, while it approached 3.0 further away from the island (Fig. 1a). From 2012 to 2021, due to the improvement in seismograph quality and station coverage (Fig. 1d), the Mc for inland Taiwan was mostly below 1.5, and around 2.0 off the coast, with only a few areas nearing 3.0 (Fig. 1b). Overall, the Mc on inland Taiwan is lower than that off the island, and there was a noticeable decrease in Mc after 2012. This indicates that the quality of observations improved after the integration of the seismic network. Based on the above analysis, this study will use the earthquake catalog, considering the completeness over time, space, and magnitude, to calculate the b-value.

3 Examining the 2018 Hualien earthquake sequence

To understand the spatiotemporal evolution of the b-value prior to M ≥ 6.0 earthquakes, we first examined the 2018 Mw 6.3 Hualien earthquake sequence. The mainshock of this sequence occurred on February 6, 2018, at 15:50 (UTC). Prior to this earthquake, there were seven foreshocks with ML greater than 5.0. The earliest of these foreshocks took place on February 4, 2018, at 13:12 (UTC) with ML 5.3, and the largest foreshock (ML 5.9) occurred on February 4, 2018, at 13:56 (UTC). Considering that this earthquake sequence encompasses foreshocks, the mainshock, and aftershocks, it presents an ideal case for studying the behavior preceding a large earthquake.

This study utilizes the complete part of earthquake catalog for precise b-value assessment in each analysis. We determined the Mc for events in the grid cell, including those with M ≥ Mc in the calculation (Fig. 2). The b-value was reported for cells with over 100 events. From the b-value map of the year before the Hualien mainshock (Fig. 2a), the b-value at the epicenter cell of the Hualien earthquake was found to be 0.73, ranking in the lowest 15th percentile in Taiwan. This illustrates a relatively low spatial value prior to the significant seismic event, below the global average of 1.0 as noted by Lay and Wallace (1995).

Fig. 2
figure 2

a Distribution of b-values, b their corresponding standard deviation at each grid point, and c the magnitude–frequency distribution for the grid cell associated with the 2018 Hualien earthquake. The analysis uses the catalog data from 1 year prior to the 2018 Hualien earthquake. Blue and green dots represent the cumulative and discrete numbers of observations, respectively, while the red line illustrates the regression of the G–R law. The Mc is considered for each grid point

To investigate the temporal distribution of the b-value before the Hualien earthquake, we initially calculated the time variation of the b-value over the 5 years prior (Fig. 3), aiming to understand if the b-value at the epicenter changed systematically over time. The results revealed a significant drop in the b-value over the 5 years leading up to the earthquake (from 0.99 to 0.86). The value then stabilized (within the standard deviation range) until 1 year before the earthquake, when the b-value sharply decreased again (from 0.87 to 0.73). To further validate significance of the temporal variations, we followed Utsu (1999) and implemented ∆AIC, represented as:

$$\Delta AIC = - 2\left( {N_{1} + N_{2} } \right)\ln \left( {N_{1} + N_{2} } \right) + 2N_{1} \ln \left( {N_{1} + \frac{{N_{2} b_{1} }}{{b_{2} }}} \right) + 2N_{2} \ln \left( {N_{2} + \frac{{N_{1} b_{2} }}{{b_{1} }}} \right) - 2,$$
(8)

where N1 and N2 are numbers of events in two groups, b1 and b2 are b-values in two groups. Typically, a ∆AIC exceeding approximately 2 is viewed as indicating significant variation, and a ∆AIC of 5 or more is considered highly significant, indicating that the two groups have different b-values. According to the temporal distribution of b-value, standard deviation, and ∆AIC (Fig. 3), there was a decrease in the b-value during the 5 years preceding the earthquake, particularly noticeable in the fourth and final years, which exhibited significantly high ∆AICs values of 4.06 and 55.98, respectively. This analysis considered yearly earthquake catalogs, which lacked finer temporal resolution. Consequently, the activity characteristics of the foreshock sequence were not discerned.

Fig. 3
figure 3

The b-value (solid line) and standard deviation (dotted line) of the epicenter for the 5 years preceding the 2018 Hualien earthquake, with the lowest b-value being in a year before the earthquake. For each year, we presents the percentile of the corresponding b-value in Taiwan, the Mc, and the count of events with M ≥ Mc. The ∆AIC between each pair of years is also reported

To gain insight into the finer temporal variations of the b-value and its feasibility as an earthquake precursor indicator, we computed the b-value for every 100 (green lines in Fig. 4) and 200 (black lines in Fig. 4) earthquakes within 30 km of the Hualien earthquake epicenter in the year leading up to the mainshock, shifting by one earthquake each time, and analyzed the continuous time variation of the b-value (Fig. 4). Although larger b-value variations were obtained for the calculation using smaller number of events, their temporal trends are similar with those using larger number of events, that earthquakes greater than magnitudes 4.0 (blue stars in Fig. 4) or 5.0 (orange stars in Fig. 4) could lead to rapid drops in the b-value, even though most of these earthquakes were not followed by larger ones. Approximately 3 days before the mainshock (on February 3rd), a series of intense foreshocks initiated (Fig. 4b). During this foreshock period, the lowest b-value appeared near the Mw5.9 foreshock. For most of the time leading up to the main shock, the b-value was significantly below 1.0.

Fig. 4
figure 4

a The continuous time variation of the b-value in the year preceding the 2018 Hualien earthquake and the b-value at the time of larger magnitude earthquakes. b The continuous time variation of the b-value 3 days before the earthquake. The green and black lines represent the temporal distribution of the b-value for every 100 and 200 earthquakes, respectively, occurring within 30 km of the epicenter of the Hualien earthquake. The blue and orange stars represent earthquakes with magnitudes of 4.0–5.0 and 5.0–6.0, respectively. The blue lines indicate the time period 3 days prior to the earthquake

In the case of the Hualien earthquake, the b-value continuously declined over the 5 years preceding the earthquake (Fig. 3), with a further decrease during the foreshock sequence (Fig. 4b). Spatially, the epicenter appeared to consistently exhibit a low b-value before the earthquake (Fig. 2a). This case suggests that earthquake sequences with foreshocks, or those showing temporal and spatial characteristics of low b-values, may act as earthquake precursors. To determine whether this hypothesis applies to most large earthquakes, we applied this procedure to other earthquakes with magnitudes greater than Mw 6.0, as detailed below.

4 Spatiotemporal variation of b-values prior to M ≥ 6.0 earthquakes in Taiwan from 1999 to 2021

To summarize the spatiotemporal characteristics of the b-values in pre-seismic periods of large earthquakes, this study considers earthquakes in Taiwan with magnitudes greater than 6.0 that occurred between 1999 and 2021. In this period, Taiwan recorded 62 earthquakes exceeding magnitude 6.0. During this timeframe, if an earthquake of magnitude greater than 6.0 happened within 1 month and 30 km of a prior one, it was classified as an aftershock of the earlier quake and omitted from the analysis. Consequently, after removing these aftershocks, 46 earthquakes were subject to analysis (Table 1 and Fig. 5a). To enhance the reliability of b-value calculations, we have chosen to present only 31 events (highlighted in italic in Table 1) that are located in cells with an event count exceeding 100.

Table 1 The parameters of the earthquake implemented in this study
Fig. 5
figure 5

a The spatial distribution of b-values calculated based on the catalog from 1999 to 2021, alongside the epicenters of M ≥ 6.0 events, and b temporal distribution of the average b-values at the epicenters in the 5 years leading up to an M ≥ 6.0 earthquake, with the dotted line indicating plus or minus one standard deviation of the b-values for each respective year. The parameters of the M ≥ 6.0 events are detailed in Table 1. The temporal evolution of the b-value for each event is shown in Supplementary Material 1

The average b-value at the epicenters of these earthquakes showed a slight decreasing trend over the 5 years leading up to each earthquake (Fig. 5b). The b-value 1 year before the earthquakes was the lowest at 0.82, a difference of 0.09 from the b-value 5 years prior. However, when considering the standard deviation (approximately ± 0.2), this decreasing trend in b-values is not statistically significant.

Although the temporal changes in the b-values at the epicenters over 5 years were not particularly noticeable, spatial variations were more significant. The average b-value of 0.82, obtained 1 year prior to the earthquakes, is lower than the global average of 1.0, as documented by Lay and Wallace in 1995. To further illustrate the distribution characteristics of b-values at the earthquake epicenters and across other regions in Taiwan in the year leading up to each quake, we employed the Molchan diagram (Molchan 1990). This was done to statistically investigate the significance of low b-values in the epicentral regions. In the Molchan diagram (Fig. 6), the horizontal-axis represents the alert rate (fraction of alarm-occupied space), i.e., the b-value percentiles of the grid locations of each earthquake. The vertical-axis shows the success rate (fraction of forecasting), which is the ratio of the number of successfully predicted and actually occurring earthquakes to the total number of actual earthquakes. By marking different forecasting results on this diagram, we can compare the efficacy of various forecasting methods. The diagram is ordered according to the percentiles of the epicenter b-values across Taiwan, from lowest to highest. Ideally, a point in the upper left side of the diagram indicates a high success rate at a low alert rate. Conversely, a random or non-predictive method would have data points along the diagonal. The Molchan diagram offers a clear and intuitive way to compare the applicability of different forecasting models.

Fig. 6
figure 6

The Molchan diagram illustrates the percentile of the b-value for each M ≥ 6.0 earthquake and the percentile position of each earthquake in the entirety of Taiwan. b-value calculation is based on the catalog 1 year prior to the earthquake. The sequence number of each earthquake is indicated by numbers, with specific parameters for each event detailed in Table 1. Note that we only display 31 events that are situated in cells containing more than 100 events. The blue curve represents the 99.9% confidence interval for random guessing, showcasing the expected distribution under the null hypothesis for comparative purposes. The b-value for each event and the corresponding fraction of alarm-occupied space (ranked in percentiles) are shown in Supplementary Material 1

To take the case of the 2018 Mw 6.2 Hualien earthquake as an example, the b-value in the epicentral cell was 0.73, placing it in the lowest 14.8 percentile across Taiwan (Fig. 2a). Therefore, the alarm-occupied space fraction for this location is 14.8%, making it the 9th lowest among 31 events. This equates to a forecasting fraction of 27.4% (shown as red rectangle in Fig. 6). Drawing from the Hualien case experience, we computed the b-value for the cell associated with each M ≥ 6.0 earthquake. The results of the 31 events (Fig. 6) indicate that most points are located in the upper left side, suggesting that earthquakes tend to occur in areas with low b-values. About 70% of M ≥ 6.0 earthquake epicenters are situated within the lowest 50th percentile throughout Taiwan, while approximately 50% fall within the lowest 30th percentile. This suggests that most of large earthquakes are in the areas with low b-values, implying the feasibility of using b-value spatial distribution as a precursor indicator for earthquakes. By comparing our results with the 99.9% confidence interval curve of the null hypothesis (blue curve in Fig. 6), we found that most events fall outside this range, indicating that the null hypothesis can be rejected with 99.9% confidence.

5 Discussion

Although we found that large earthquakes tend to occur in regions with low b-values (Fig. 6), the findings of this research indicate that during the 5-year period leading up to the earthquake, b-values near the epicenters of the M ≥ 6.0 earthquakes exhibited no general trend over time, given that this decrease remains within the limits of calculation uncertainty (Fig. 5b). This observation suggests that large earthquakes tend to primarily occur in regions with low b-values (Fig. 5a), irrespective of their temporal evolution.

To more precisely analyze distribution characteristics, we utilized the Molchan diagram, which shows the percentile of the b-value from the 1999 to 2021 catalog (red rectangles in Fig. 7). Comparing this with the 99.9% confidence interval curve of the null hypothesis (blue curves in Fig. 7), 22 out of 45 events pass the null hypothesis. When we juxtapose these findings with those derived from the catalog 1 year prior to the earthquake (green rectangles in Fig. 7, identical to Fig. 6), the latter demonstrates slightly improved performance for events with a smaller fraction of alarm-occupied space. This suggests that considering a more recent catalog before a large earthquake could better indicate earthquake precursors, corresponding to the temporally decreasing trend in b-values (as shown in Fig. 5b).

Fig. 7
figure 7

The Molchan diagram shows the percentile of the b-value for each M ≥ 6.0 earthquake, alongside each earthquake’s percentile position. This is depicted using two sets of data: catalogs from 1 year prior to the earthquake (represented by green rectangles) and comprehensive catalogs spanning from 1999 to 2021 (indicated by red rectangles). The sequence number of each earthquake is indicated by numbers, with specific parameters for each event detailed in Table 1. The blue curve represents the 99.9% confidence interval for random guessing for 31 events, showcasing the expected distribution under the null hypothesis for comparative purposes. The b-value for each event and the corresponding fraction of alarm-occupied space (ranked in percentiles) are shown in Supplementary Material 1

This study showed that the temporal changes in b-values are insignificant (Fig. 5b), consistent with findings from previous research (e.g., Schorlemmer et al. 2004; Nanjo et al. 2016). The lack of a significant temporal trend in b-value (Supplementary Material 1) might be attributed to the unique nucleation process of each large earthquake. For example, as stress accumulates continuously, it may lead to a decrease in b-value, in line with Suyehiro’s (1966) theory. Additionally, seismic behavior might conform to the Knopoff–Burridge spring-slider model, where the b-value initially rises, reaches a peak, and then falls prior to a large earthquake, consistent with the conclusions of Wang et al. (2016).

According to previous studies (e.g., Scholz 2015), changes in the b-value are negatively correlated with stress accumulation. To more accurately predict future earthquake activity characteristics, it is recommended to include other factors, e.g., the Coulomb stress model (King et al. 1994; Toda et al. 2011), for combined assessment. Ruptures on fault planes lead to deformations in the vicinity, which can translate to changes in Coulomb stress. An increase in Coulomb stress may trigger aftershocks or even subsequent larger earthquakes. Incorporating the Coulomb stress model into the analysis might provide a deeper understanding of the likelihood of earthquakes and reduce uncertainties in perception.

Our study utilizes the earthquake catalog from the CWASN, which records a larger number of smaller earthquakes, providing a more comprehensive catalog. To implement real-time b-value analysis for earthquake precursor evaluation requires a rapid report catalog. It should be noted that using the real-time system, identifying smaller earthquakes becomes challenging, leading to increase of magnitude of completeness Mc. Previous studies utilized the rapid report catalog of the CWA (https://www.cwa.gov.tw/V8/C/E/index.html) to produce significant b-value anomalies using the same calculation process for the Taiwan region. These studies conducted an in-depth examination of the 2022 Mw 6.7 Yuli earthquake and the 2022 Mw 6.8 Chihshang earthquake, as proposed by Chen et al. (2022) and Chen and Chan (2022), respectively. These cases demonstrate that monitoring b-value evolution can provide insights into the progression of an earthquake sequence and indicate the potential for larger mainshocks during the foreshock period.

6 Conclusions

The estimated b-value could easily vary depending on the lower boundary of the magnitude Mc used in the earthquake catalog. Thus, this study chose to compute Mc on a grid-by-grid basis (that examples are shown in Figs. 2a, 7a) to minimize biases in the b-value calculations. After verifying the feasibility of the forecast method based on b-values with the 2018 Hualien earthquake, this study sequentially computed the b-value changes before earthquakes with magnitudes greater than 6.0 that occurred in Taiwan from 1999 to 2021. The Molchan diagram (Fig. 6) showed that 70% of earthquake epicenters from the previous year are located within the lowest 50th percentile of all of Taiwan, and 50% are within the lowest 30th percentile. Additionally, most earthquakes with a magnitude of 6.0 or higher occur in areas with lower b-values than the curve, within a 99.9% confidence interval of the null hypothesis. This suggests that most earthquake epicenters were located in regions with low b-values.