The use of Artificial Neural Networks to estimate seismic damage and derive vulnerability functions for traditional masonry

This paper discusses the adoption of Artificial Intelligence-based techniques to estimate seismic damage, not with the goal of replacing existing approaches, but as a mean to improve the precision of empirical methods. For such, damage data collected in the aftermath of the 1998 Azores earthquake (Portugal) is used to develop a comparative analysis between damage grades obtained resorting to a classic damage formulation and an innovative approach based on Artificial Neural Networks (ANNs). The analysis is carried out on the basis of a vulnerability index computed with a hybrid seismic vulnerability assessment methodology, which is subsequently used as input to both approaches. The results obtained are then compared with real post-earthquake damage observation and critically discussed taking into account the level of adjustment achieved by each approach. Finally, a computer routine that uses the ANN as an approximation function is developed and applied to derive a new vulnerability curve expression. In general terms, the ANN developed in this study allowed to obtain much better approximations than those achieved with the original vulnerability approach, which has revealed to be quite non-conservative. Similarly, the proposed vulnerability curve expression was found to provide a more accurate damage prediction than the traditional analytical expressions.


Introduction
Large-scale seismic vulnerability assessment methods are often based on a few empirical-based parameters defined through the statistical analysis of large sets of postearthquake damage data [1], and normally uses simplified expressions, which are very easy to implement in Geographical Information Systems (GIS software), being a worldwide adopted approach. Some of these methods have been reviewed and discussed in depth in recent review articles [2,3]. However, the inability of traditional statistical methods to handle missing or noisy data, as well as to manage nonlinearities and to identify certain behavior patterns, opens up space to the use of innovative computer-based solutions. In the last couple of years, the use of Artificial Neural Networks (ANNs) is becoming increasingly popular in many civil engineering applications [4][5][6], namely in the field of earthquake engineering [4][5][6][7][8][9][10][11][12][13][14][15][16][17]. Traditionally, ANNs are used as "black boxes" to obtain a problem solution without a clear understanding about the mathematical relations between the inputs and the outputs, which are often considered as being a handicap for engineering purposes. Moreover, as discussed by Estêvão [18], the precision of the results obtained from ANNsbased approaches is very dependent on the dimension of training data set required, which often makes it impossible to use this kind of techniques when only small data sets are available. Trying to overcome this issue and taking the best of these two important group of approaches, a simplified large-scale seismic vulnerability assessment approach and an ANN are used together. It is worth noting that the ANN is used herein, not only to obtain a problem solution, as usual, but also as a guiding line function to develop a new simplified vulnerability curve expression with a good approximation to the observed damage data. Despite not solving the above mentioned "black box" problem, using the proposed approach opens the possibility of deducing new simplified expressions using the well-known mapping capabilities of ANNs to better correlate input and output variables. For such, a set of computer routines were developed to find an expression that best fits the results of a Multi-layer Feed-Forward Neural Network (MFFNN), which was previously trained with data obtained from a post-earthquake damage data set collected in the aftermath of the 9th of July 1998 Azores earthquake. A comparative analysis between the vulnerability functions derived from the application of a widely used seismic vulnerability assessment approach and an approach based on the use of ANNs was carried out to understand how capable an ANN is to find a problem solution, even when using a low number of training sets. This comparative analysis was carried out by evaluating the relative deviations between observed damage and the damage estimated by both approaches. Results shows that the ANN solutions are more accurate than the ones obtained with traditional approaches. Moreover, it was also possible to develop a computer routine that uses the ANN as an approximation function, which led to another simplified expression, yet with almost the same precision obtained with the ANN. More than simply deducing a new simplified expression, which domain of validation is obviously limited to Azores and just for the effect of a single earthquake, in this paper is presented a new approach for developing worldwide simplified expressions to describe vulnerability, namely if more data are used to train an ANN.
2 The earthquake of July 9, 1998 With a macroseismic intensity VII on the Modified Mercalli Intensity (MMI) scale [19], the July 9th 1998 Azores earthquake is considered one of the most destructive events in the recent seismic history of Portugal, having affected a total of more than 5000 people, within which 8 fatalities, 150 injured and about 1500 homeless were reported [20]. Final estimates reported that about 70% of the building stock of Faial, Pico and S. Jorge islands was buffeted by this earthquake. From the technical and academic point of view, the 1998 event allowed to gather an unprecedented amount of good quality postearthquake data concerning different variables related with the building stock, namely concerned to their main architectural and constructive features, damage report, and the costs associated with repair and/or retrofitting interventions. The database (hereinafter mentioned as "Faial database") resulting from the 10-year reconstruction process of Faial Island, which was carried out under the supervision of the Society of Promotion for Housing and Infrastructures Rehabilitation (SPRHI), was gathered in 2007 by the Regional Secretariat for Housing and Equipment (SRHE) of Faial Island and subsequently assembled in the book edited by Oliveira et al. [21].
The quality and uniqueness of this database in both national and international context have encouraged the development of several advanced studies throughout the following years. Even though the authors were allowed to access the full database, a complementary field work was conducted to understand the evolution and the diachronic process resulting from rehabilitation interventions implemented since 1998 [21]. Zonno et al. [22] presented a proposal of a macroseismic intensity distribution map for the Faial island, which was constructed on the basis of the post-earthquake field survey and observation campaigns that followed the earthquake of July 9, 1998.
As referred in the introductory section, this extensive database was used in this work to compare the feasibility of the vulnerability function proposed by Bernardini et al. [23] with that resulting from an innovative approach based on the use of ANNs. Using as input data the same vulnerability parameters that compose the vulnerability index method, ANNs were trained to predict the damage grade for a given macroseismic intensity, I EMS-98 . The data set of 90 stone masonry buildings is distributed in Table 1 by the four observed macroseismic intensities mapped for the island of Faial (from I EMS-98 = V to VIII).
The traditional stone masonry buildings comprised in this sample are considered representative of the Azorean vernacular heritage, not only in terms of material and constructive technology, but also in terms of typology, which differs significantly depending on whether the building is located within a rural or an urban environment. The following Table 2 presents the distribution of these buildings by parish and the respective frequency in terms of observed discrete damage grades, D i , which are classified according to the European Macroseismic Scale, EMS-98 [24].
As one can observe, about 60% of the considered buildings present a damage grade ranging between D 1 and D 2 , which corresponds to "negligible" and "moderate damage", 25% show a damage grade between D 3 and D 4 , which corresponds to "substantial" to "very heavy damage", and finally, about 11% present a damage grade D 5 , corresponding to a "total or near total collapse". The remaining 4% don't present any damage (D 0 ).

General formulation
The seismic vulnerability assessment approach used in this work was originally developed in Italy and has been successfully applied during the past 25 years in several research works all over the globe, particularly in Europe. Most recently, it was adapted and calibrated to the Portuguese masonry building stock reality by Vicente et al. [25] and Ferreira et al. [20], respectively. In conceptual terms, the methodology is based on the calculation of a vulnerability index that results from the weighted sum of the 14 evaluation parameters given in Table 3, each of which focused on a specific aspect related to the seismic response of the building.
As presented in Table 3, the 14 parameters that compose the method are distributed over 4 vulnerability classes, C vi of growing vulnerability: A, B, C, and D. Each class is associated to a weight, w i , that reflects the importance of that parameter in particular; ranging from 0.5 for the less important to a 1.5 for the most important. A complete discussion on the relative importance of each parameter can be found in Ref. [25].
Equation (1) gives the seismic vulnerability index associated to each building, I * v . The higher the vulnerability index, the more vulnerable is the building. For ease of use, it is usually normalized to fall within the range of 0 to 100, assuming from that moment on the notation, I v .

Damage estimation
Based on the above-presented vulnerability index formulation, mean damage grades, D , can be estimated for Salão ( number and percentage of buildings 4 (4.4%) 32 (35.6%) 22 (24.4%) 16 (17.8%) 6 (6.7%) 10 (11.1%) different seismic hazard scenarios. To this end, an analytical expression that correlates macroseismic intensities with the mean damage grade, D , of the damage distribution in terms of the vulnerability value, I v , was proposed by Bernardini et al. [23]. Such formulation is expressed by Eqs. (2) and (3): where I EMS-98 is the seismic hazard described in terms of Macroseismic Intensity [24], V is the vulnerability index used in the Macroseismic Method [26], given in Eq. (4), and f (V, I EMS-98 ) is a function depending on the vulnerability index and intensity, which was introduced in the expression to adjust the trend of the vulnerability curves for the lower extremes of the macroseismic intensity grades, namely for I EMS-98 £ V. This expression was proposed within the framework of an innovative macroseismic approach allowing the vulnerability analysis of building typologies defined according to the European Macroseismic Scale, EMS-98 [24], and relate it to its vulnerability classes. Moreover, this expression has been widely used and validated in literature, see for example Ref. [22].
To simplify the interpretation of the mean damage grade value, D , and to compare it with the discrete damage grades, D i , used in Section 2, these two descriptors can be indirectly correlated through a set of damage factors, DF, which represent the cost of returning a building to its original condition. To this purpose, a probabilistic distribution of damage, derived from the discretisation of the beta distribution defined within the range of 0 to 5, can be assumed. This correspondence was carried out herein resorting to the correlation proposed by Ref. [27], which can be approximated by the analytical function given by Eq. (5): Using the damage factors proposed by Ref. [27] as threshold values in Eq. (5), it is then possible to establish a correspondence between the discrete damage grades, D i , defined in the EMS-98 [24] and different ranges of the mean damage grade value, D : D 0 (no damage) ¼ f0£ D < 0:50g; D 1 ¼ f0:50£ D < 1:42g; D 2 ¼ f1:42£ D < 2:50g; D 3 ¼ f2:50£ D < 3:50g; D 4 ¼ f3:50£ D < 4:00g; D 5 ¼ f4:00£ D < 5:00g.

Comparison between estimated and observed damage
To analyze the ability of the vulnerability index approach to correctly estimate the mean damage grades suffered by the buildings, it was applied to each one of the 90 buildings that compose the data set presented in Section 2. From that application, presented in Fig. 1 (colored in black), a damage distribution mean value of 1.28 was obtained, with a standard deviation of 1.07. It can be observed that about 85% of the buildings evaluated with the vulnerability index approach resulted in a mean damage grade, D , ranging between "no damage" and "moderate damage" (D 0 to D 2 ), and about 14% present a mean damage grade, D , between 2.5 and 4.0, which corresponds to "substantial" to "very heavy damage" (D 3 to D 4 ). Using the vulnerability index approach, only one building resulted in a mean damage grade, D , between 4.0 and 5.0, i.e., in a damage grade corresponding to "total or near total collapse" (D 5 ). From Fig. 1 one can also observe that the vulnerability index approach tends to underestimate the observed damage (colored in gray), an observation that is particularly evident at the extreme ends of the mean damage grade distribution. The largest differences were found in the case of damage grades D 0 (-28.9%), D 1 (11.1%), and D 5 (10.0%).
An alternative way of analyzing the ability of the vulnerability index approach to estimate the mean damage grade suffered by the buildings is through the confront/ comparison between the observed mean damage grades and the vulnerability functions given by Eq. (2) for different macroseismic intensities, as shown in Fig. 2. Following this procedure, it is possible to plot a point cloud for each one of the four macroseismic intensities felt (from I EMS-98 = V to VIII) and to analyze its mathematical correlation with the corresponding vulnerability functions. Regarding the macroseismic intensities considered in this work, it is important to stress out that these intensities can be seen as the most relevant ones considering the main objectives of the analysis to carry out, since for macroseismic intensities below V the potential level of damage is very low and for intensities above IX it is expected that most traditional masonry buildings will reach levels of severe damage (total or near total collapse).
The analysis of the results presented in Fig. 2 corroborates the idea that the mean damage values estimated through the application of the vulnerability index approach tend to be less conservative than those observed in the field survey, particularly for lower intensities. This can be clearly seen in Figs. 2(a) and 2(b), where most points are significantly shifted by excess from the corresponding vulnerability curves.
To quantify the differences found between analytical and observed damage, Fig. 3(a) presents the relative and the average deviations obtained respectively for each building assessed and for each macroseismic intensity (identified with the red dashed lines and the pink area). As can be observed in Fig. 3(a), the average relative deviations per intensity range from 6.1%, for intensity VIII, up to 20.3%, for intensity V, whereas a maximum relative deviation value of about 55.3% was obtained for intensities V and VI (identified with the black dashed line). Figure 3(b) shows the histogram and the best-fit Gaussian curve resulting from the statistical analysis carried out. Hence, in statistical terms, a mean relative deviation value of about 15.75, with a standard deviation of 15.84, was obtained. In about 59% of the cases, the relative deviation found between analytical and observed damage falls within the range of AE20%, highlighted in pink in Fig. 3(b), and in about 36% of the cases such deviation was found to be equal or lower than 10% (highlighted in light red).

General formulation
ANNs are computing systems inspired by the biological neural networks, which can progressively improve their performance (learn) to do tasks by considering examples, Fig. 1 Observed versus estimated discrete damage grade distributions, using the vulnerability index approach.
Tiago Miguel FERREIRA et al. Damage and vulnerability analysis based on ANNs generally without task-specific programming. According to Drew and Monson [28], there are many learning algorithms available depending on the type of ANN and its intended application. However, among those, the Paul Werbos's backpropagation algorithm [29] is one of the most frequently used. This learning algorithm attempts to minimize the least mean square difference over the entire training set, which is constituted of a large number of cases for which the outcome is already known. The first layer of neurons represents the preselected input parameters whereas the middle layers are referred to as hidden because they have no direct contact with data other than through the input and output neurons, as shown in Fig. 4.
When the network is set up, random weights are assigned to the connections between the neurons in the input and the hidden layers, and the ANN outputs are produced and compared with true data. The error obtained from this comparison is then back propagated through the network, changing the weights of the connections to reduce the least mean square error, i.e., the best fit with the data. This process is repeated until the error is minimized. As explained in Ref. [28], the degree of adjustment per learning routine is set before the training period. To improve the capacity of the ANN to detect subtle patterns within the data, such adjustment should be proportionally inverse to the complexity of the problem, otherwise the ANN will tend to overcompensate, and the error curve will oscillate widely, rather than oscillating to a minimized degree as the error approaches the global minima.
A general MFFNN was adopted for this work, which is composed by two artificial neurons (AN) in the input layer, 16 AN in one hidden layer, and one AN in the output layer. The number of artificial neurons in the hidden layer was chosen by a trial and error process. The ANN was trained using the common error back-propagation algorithm. Each artificial neuron (AN) of an ANN is a computational element, as shown in Fig. 5, which transforms the input signals (x i ) in an output result (trying to reproduce the behavior of a brain cell).
The activity v j of one AN is given by Eq. (6), which is the result of the combination of the input signals and the weights (w i ) of each connection. v The output result is dependent on the computation of the activation function f(v). It is usual the adoption of a sigmoid function (Eq. (7)), so this was an obvious choice for the present study. f ðvÞ ¼ During the training process, the implemented backpropagation algorithm tries to adjust the connection weights (Eq. (8)), iteratively, to minimize the network errors Z ij .
The algorithm convergence rate is ruled by the learning parameter, η. If the value of this parameter is small, the convergence rate is low, otherwise the rate will be increased. A momentum α factor (0£α£1) can also be used to increase the algorithm convergence rate.
As depicted in Fig. 6, the set of training vectors was composed by the normalized vulnerability index values (I v ) and the macroseismic intensity values (I EMS-98 ), as the input data, and the mean damage grade ( D ), as the output result, corresponding to the 90 buildings referred in Section 2. The level of training was empirically adjusted, trying to avoid the over-training of the ANN (training with η = 0.05 and α = 0.1) to assure a good mean estimation of damage. The NEUNET software [30] was used in this work for training and processing the ANN.

Comparison between estimated and observed damage
The accuracy of the ANN developed in the scope of this work is analyzed and discussed in the present section. The application of the ANN to the same building sample resulted in a damage distribution characterized by a mean value of 2.03 and a standard deviation of 1.03, which is about 58.6% higher than that estimated through the vulnerability index approach. From the mean damage grade distribution obtained with the ANN alone (colored in black in the following Fig. 7), it is possible to observe that about 71% of the buildings present a discrete damage grade ranging between D 0 to D 2 , about 22% present a discrete damage grade between D 3 and D 4 , and the remaining 7% a discrete damage grade of D 5 , correspond-    ing to "total or near total collapse". When opposing the mean damage grade distribution obtained with the ANN to that of observed damage (also in Fig. 7), it is possible to see that, in global terms, the ANN developed in this work is able to reproduce the observed damage distribution with quite a good precision. In fact, with the exception of discrete damage D 3 for which the difference found between observed and estimated damage was about -11%, for all other damage grades such difference is lower than 5%.
Similarly to what has been done in the previous Section 3, the comparison between observed mean damage grades and the vulnerability functions derived by the ANN for macroseismic intensities in the range of I EMS-98 = V to VIII, is shown in Fig. 8.
From the analysis of Fig. 9, one can observe that a very satisfactory agreement between the mean damage values estimated through the use of the ANN was achieved, particularly for the higher macroseismic intensities (I EMS-98 = VII and I EMS-98 = VIII), depicted in Figs. 8(c) and 8(d), respectively. Furthermore, it is also possible to observe that no overfitting has occurred, since the curves do not reveal a particular adjustment to any individual point (or group of points) of the data set. This is also clear in the bar chart presented in Fig. 9(a), where the relative and the average deviations obtained for each building assessed and for each macroseismic intensity are illustrated. As one can observe in this figure, the average relative deviations range from 1.4% to -3.2%, respectively, for intensities VIII and VI. In comparative terms, these values reflect the significant improvement of the approximation achieved through the ANN when compared with that obtained with the traditional vulnerability index approach, shown in Fig. 3(a). The maximum relative deviation obtained with the ANN is also lower, falling from about 55.5% to 31.3%. In statistical terms, it was obtained a mean relative deviation value of about 0.8%, with a standard deviation of 14.14.
The histogram and the best-fit normal curve resulting from the statistical treatment of this data are given in Fig. 9(b), from where it is possible to observe that in about 81% and 56% of the cases, the relative deviation found between analytical and observed damage falls within the range of AE20% and AE10%, respectively (highlighted in pink and light red), representing an improvement of about 22.2% and 20% in relation to the values obtained with the traditional vulnerability index approach, presented in Fig. 3(b). The distribution presented in Fig. 9(b) is characterized by a mean value of 0.80 and a standard deviation of 14.84.

Proposal of a new analytical expression for damage estimation
The fact that the original formulation for estimating damage in traditional masonry buildings, given by Eq. (2), somehow resembles a sigmoid function (Eq. (7)), has led to the idea of programming a series of routines to obtain the parameters that best fits the ANN results. First, the inflection point of the curve was identified for each macroseismic intensity. Then, the Least Squares Method (LSM) was applied to obtain the function I o ðI EMS-98 Þ, in Eq. (9), which will center the curve, and the function lðI EMS-98 Þ, in Eq. (10), which will adjust the slope of the sigmoid function: lðI EMS-98 Þ ¼ 0:037 þ 0:004 Â I EMS-98 , As the original expression proposed by Bernardini et al. [23], in Eqs. (2) and (3), the vulnerability curve expression proposed herein (Eq. (11)) estimates the mean damage grade, D , as a function of the macroseismic intensity, I EMS-98 , and the vulnerability index, I v .
where 0 ðI EMS-98 Þ is a third-degree polynomial that defines the upper limit of the vulnerability function, given by Eq.
The analytical vulnerability function obtained through Eq. (11) is presented in Fig. 10 for different macroseismic intensities, I EMS-98 . As can be seen in Fig. 10, the resulting vulnerability function follows a characteristic "S-shaped" or sigmoid curve.
This configuration can be interpreted as a good indicator of the suitability of the parameters defined for Eq. (11), not only because it follows the same spatial shape of the original expression, but also, and more important, because the configuration of the sigmoid curve adjusts very well to the theoretical progression of seismic damage in masonry buildings: low levels of damage for lower intensities (I EMS-98 £V), a sudden increase of the level of damage for the central intensities (V < I EMS-98 £X), and final stabilization of this increase for higher intensities (I EMS-98 > X).
The final comparison between the observed mean damage grades, D , for the building stock described in Section 2, and the new analytical vulnerability functions given by Eqs. (2) and (11), are presented in Fig. 11, for macroseismic intensities from V to VIII. To simplify the analysis, the cases for which the deviation found between observed and analytical damage is lower than 20% and 10% are given in following Fig. 11, colored in pink and light red, respectively.
As it is possible to observe, the analytical vulnerability function derived through the ANN developed in this work, given by Eq. (11), presents a better adjustment to the observed damage than that resorting to the traditional mean damage grade formulation expressed by Eq. (2). Actually, only in 17% of the cases (15 out of 90 buildings) the deviation found between the analytical value, obtained through Eq. (11), is higher than 20%, whereas, in the case of the traditional mean damage grade formulation, in Eq. (2), that percentage increases to 41% (37 out of 90 buildings). Moreover, it is important to note that this better approximation is observed for all the macroseismic intensity spectrum, not only for certain subsets of its domain.
Finally, Fig. 12 shows the vulnerability curves obtained with the new proposed analytical expression for different vulnerability index values, I v .

Final remarks
The present paper discusses the potential of using alternative strategies to estimate seismic damage in traditional masonry buildings through the comparative analysis of two different approaches, a widely used vulnerability index method and an innovative approach based on the use of ANNs. Post-earthquake damage data collected after the 1998 Azores earthquake was used to generate a data set of real damage evaluation for traditional stone masonry buildings, which was then critically compared with analytical results obtained through the referred approaches. Furthermore, a new analytical expression for damage estimation was derived from the ANN results. In general terms, the ANN adopted in this study, a general MFFNN composed by two AN in the input layer, 16 AN in one hidden layer, and one AN in the output layer, allowed to obtain much better approximations than those obtained with the original seismic vulnerability index approach. In fact, whereas the vulnerability index-based approach has revealed to be quite non-conservative, presenting a tendency to underestimate damage, particularly for the extreme upper and lower bounds of the mean damage distributions (D 0 and D 5 ), the approximation obtained with ANN was quite accurate. As discussed in Section 4.2, despite a slight tendency to overestimate the damage for damage grade D 3 , for which the difference found between observed and estimated damage was about -11%, for all other damage grades such differences are lower than 5%.
The analysis of the deviations found between analytical and observed damage, presented respectively in Fig. 3 for   the vulnerability index method and in Fig. 11 for the ANN has confirmed the better performance of the ANN, with a mean relative deviation value of about 0.8% against 16%. The standard deviation obtained with the ANN was slightly lower than that obtained with the vulnerability index approach, 14.14 over 15.84.
Finally, when compared to the original expression of Bernardini et al. [23], it is clear that the new analytical expression, presented in Eq. (11), provides a much more accurate prediction of damage for the data set herein analyzed. However, this expression cannot be seen as a universal alternative, being naturally limited not only to the Azorean traditional masonry building typology, but also to the earthquake of July 9, 1998. In any case, the research process herein idealized can be seen as a representative and compelling example on how ANN might be used to obtain optimized vulnerability functions for a specific building typology, whenever in the possession of sufficiently large post-earthquake damage data sets.