Network Analytical Tool for Monitoring Global Food Safety Highlights China

Background The Beijing Declaration on food safety and security was signed by over fifty countries with the aim of developing comprehensive programs for monitoring food safety and security on behalf of their citizens. Currently, comprehensive systems for food safety and security are absent in many countries, and the systems that are in place have been developed on different principles allowing poor opportunities for integration. Methodology/Principal Findings We have developed a user-friendly analytical tool based on network approaches for instant customized analysis of food alert patterns in the European dataset from the Rapid Alert System for Food and Feed. Data taken from alert logs between January 2003 – August 2008 were processed using network analysis to i) capture complexity, ii) analyze trends, and iii) predict possible effects of interventions by identifying patterns of reporting activities between countries. The detector and transgressor relationships are readily identifiable between countries which are ranked using i) Google's PageRank algorithm and ii) the HITS algorithm of Kleinberg. The program identifies Iran, China and Turkey as the transgressors with the largest number of alerts. However, when characterized by impact, counting the transgressor index and the number of countries involved, China predominates as a transgressor country. Conclusions/Significance This study reports the first development of a network analysis approach to inform countries on their transgressor and detector profiles as a user-friendly aid for the adoption of the Beijing Declaration. The ability to instantly access the country-specific components of the several thousand annual reports will enable each country to identify the major transgressors and detectors within its trading network. Moreover, the tool can be used to monitor trading countries for improved detector/transgressor ratios.


Introduction
Food safety and security is a worldwide priority issue. In accordance with the Beijing Declaration, all signatory countries have agreed to develop comprehensive programs for monitoring food safety and security on behalf of their citizens. Market globalization, coupled with the information revolution, brings a number of challenges to monitoring food safety, such as comprehension and presentation of large and continuously growing (living) data sets. At the operational level, investigations are frequently necessary on data sets which are under daily or hourly expansion through a number of levels of complexity. Although some 5% of EU foodstuffs are recalled owing to contamination at source, the majority of alerts happen after export from checks at border crossings or during marketing [1]. While attempts have been made to regulate food safety at continental or global levels, rules and regulations are in effect at the local level (i.e. border control or market testing). Actions of individual counties, whether they are exporting or importing, are motivated by their own local interest, and they form the intricate pattern of the global food safety. This pattern is organically emerging from the individual actions and can only be studied with posteriori analyses using food alert logs.
Whilst food alert counts provide useful information, they tend to focus on a single element of this complex picture. Owing to the enormity and frequency of arrival of the data involved, the development of new monitoring systems is warranted to facilitate wider participation in food alerting and to provide early detection of potential 'epidemics' of contaminated foodstuffs (e.g. melamine in Chinese food products). The latter goal is particularly important when the reason for alert is a contamination that could endanger health, such as melamine, mycotoxins, nitrates, or heavy metals. There is a need to develop indicators that simultaneously take various factors into consideration such as the relationship between transgressors and detectors (i.e. in addition to the number of reports received, the model also takes the detector for each report into consideration), reason for food alerts, type of food (final product vs. ingredients) and time. Preliminary results from a small data set capturing 11 months in 2007 indicate that less than one dozen countries are major detectors in the food alert process [2], which currently suffers from a paucity of harmonisation and extensive inputs from limited participants. Countries with rigorous testing and reporting programs invest considerably in global food safety whereas other countries appear to be less equipped or concerned. The aim of this study was to extend our previous report on network analysis relating to food alerts [2] and develop a user-friendly analytical tool for ready access to food alert patterns that may in the future also be used as a searchable detection system for persistent producers of unsuitable foodstuffs. Targeted testing, informed by the proposed approach, will afford an increased likelihood of detecting foodstuff unsuitable for marketing and consumption.

Results
We used two different algorithms to calculate the transgressor indices [TI] and detector indices [DI]: i) Google's PageRank algorithm [3] and ii) the HITS algorithm of Kleinberg [4]. Both measures are normalized so the sum of all TI and all DI separately is always equal to 1 at any given time as described under Methods. Our analytical tool is on open access via the Internet [http:// staffnet.kingston.ac.uk/,ku36087/foodalert/]. Its interactive visualization application enables users to rapidly access information about the patterns of reports over a wide range of parameters using user selected durations. These include: reporting countries, reported countries, extent of reporting activity and networks in reporting at the country level. Our results are visualized in an interactive graph that makes all food report connections transparent at once while allowing the user to focus on a selected country at any given time. As shown in Figure 1A, the levels of reports against a country can be instantly plotted from the first alert against the given country to the selected end period.
The growth and changes in global food alerts, as reported from an EU perspective, are illustrated in Figure 2. Food alert reports adopt an 'infringement' approach, focusing on the frequency and trends in reasons for food alert. Network analysis highlighted differences in the underlying structures of food alerts that otherwise would have remained hidden. As seen in Figure 2B [and Table 1], the number of alerts for each country frequently do not correspond to the impact on other countries as shown by the TI indices. For example, comparing China to Iran, the latter has the highest number of alerts but has a lower impact relative to the total transgressions over a given period. On the other hand, China has a major increase in alerts against its produce over the period as shown by annual sampling in Figure 3. The impact of transgressor countries is further highlighted when limiting the weight of edges taken into consideration from below [ Table 2]. Although several transgressor countries have impact on some 25 detector countries with no cutoff, only China impacts on above ten detector countries when only edges with weight .5 are taken into account.
Although countries' ranks on the three lists [ Table 1 and  (quantified by the TI indices and the number of countries involved) for some food producer countries. Whilst the number of food alerts appears to level off after 2006 with no significant seasonal variation, the number of countries involved in the food alert system has grown from 94 to 151. Although, based on the TI/DI values, the new countries appear to be insignificant transgressors, their appearance has contributed to the complexity of global food alerts. Thus, whilst the numbers of alerts are relatively easy to compare, obtaining information on impact requires a network approach. The importance of having information on the latter aspect is underscored by highly concerning incidents, such as the recently discovered melamine contamination in Chinese milk and milk-based products; or the Salmonella contamination of peanut butter and related products in multiple countries in 2009. The latter incidents have resulted in a critical evaluation of the currently disjoint US food safety system. In keeping with the increasing complexity, the intention is to modernise the system by adding the ability to handle complex information from multiple sources and implement preventive measures [5].

Discussion
The approach taken for this project from the EU perspective could complement the work of the International Food Safety Authorities Network (INFOSAN) to assist researchers and provide information on food safety in relation to exporting countries for interested individuals. Our approach highlights the advantage of the network approach over simple frequency counts in that it takes into consideration not only the number of reports received by the transgressor country but also the number of reporting countries (detectors) related to alerts from the transgressor. The results can be obtained and downloaded as figures for any country for any selected time period starting from the first alert. Our unbiased program provides stakeholders (policy makers, health and food safety authorities and researchers) with a systematic, rigorous but user-friendly approach to i) capture complexity, ii) analyze trends, and iii) predict possible effects of interventions. The usefulness of moving from simple frequency counts to a more complex methodology cannot be illustrated with a better example than the groundbreaking work on extending the simple ''citation and backlinks to a webpage'' method into a more informative measure, namely Google's PageRank [3]. Using a similar approach to characterize a country's behavior regarding food safety, we developed two indices (the transgressor and the detector indices, denoted by TI and DI, respectively) that quantify the extent and role of involvement of a country in global food safety. High TI means that numerous alerts are issued against that country by others, while high DI denotes countries that issued many food alerts against food products from other countries.
This study reports the first development of a network visualization approach to inform countries on their transgressor and detector profiles as a user-friendly aid for the adoption of the Beijing Declaration. The ability to instantly access the countryspecific components of the several thousand annual reports will enable each country to identify the major transgressors and detectors within its trading network. Moreover, the tool can be used to monitor trading countries for improved detector/ transgressor ratios. Our program allows facile handling of enormous quantities of data that arise from food alerts and recalls in line with the needs of countries that are adopting and implementing food security measures. Future developments will include an optional filter by reasons for alerts and in case of contaminations, an optional display of information on the amount of contamination found in foodstuff that triggered the alert. These extensions may be used for monitoring purposes. The data behind the visualization tool is a living data set, currently spans from 2003 to 2008, but is expandable as new reports arrive. The next major step in our approach is to develop and implement a data interchange format between food alert systems and agencies which  Table 2. Impact on countries by selected transgressors at edge-weight cut-off value of 0 and 5. should include standardization. Visualization in real time arising from a standardized data interchange format would enable public health agencies and researchers to process food alerts as they are issued from multiple agencies.

Methods
The data used for the analyses presented in this report were taken from Rapid Alert System for Food and Feed (RASFF) logs between January 2003 and August 2008. Thus the results are from an EU perspective and do not amalgamate data from parallel food alert systems such as in the USA and Australia. Thus, these countries appear only as transgressors in the RASFF system. The study did not require ethical approval.

Network representation of food alerts
Our earlier work focused on summarizing food alerts in a simple and concise network representation. In the present context, a food alert is considered to be a formal warning issued by a reporting country on another country regarding some faulty foodstuff that is believed to originate from that country. Every alert has a unique issue date assigned to it and we make use of the identity of the two countries involved and the issue date when we derive the network of food alerts.
The network representation is composed of vertices (representing countries) and edges (representing food alerts). Edges are directed and always point from a reporting country to a country being reported on. Edges also have weights, capturing the intensity of food alerts between the two countries at the two endpoints of the edge. In the simplest case, the weight of an edge pointing from country A to country B is the number of alerts A issued on B within the considered time frame. Based on this network representation, we can derive numeric scores for each country to describe their roles within the network; e.g., the total weight of outgoing edges adjacent to a given node may denote how actively that country participates in the detection of hazardous foodstuff. The exact scores we used will be described later.
Food alerts are issued almost every day, thus it is reasonable to assume that the network is not static; it evolves in time as new alerts are issued. If we want to obtain an accurate picture of the network at a given time instance t, we must consider all alerts issued up to t and derive edge weights in a way that considers not only the number of food alerts between two given countries but also the time when those alerts were issued. Intuitively, more recent food alerts should be taken into account with a larger weight than those that have occurred months ago. From now on, we assume that time is measured in days, thus t denotes the number of days that have passed since the day of the first food alert in our dataset. The weight of a single food alert issued at time instance t 0 will be assigned a weight of l t2t0 at time instance t if t. = t 0 and zero if t,t 0 . l is an arbitrary positive constant that is strictly less than 1. This means that the weight of a food alert is exactly 1 on the day it is issued, l one day later, l 2 two days later, l k k days later and so on. In other words, the weight of a food alert decays exponentially as time passes and the rate of decay is controlled by l. The weight of an edge from country A to country B at time instance t is then simply defined as the sum of the weights of all food alerts issued by country A on country B at time instance t. This way, we take into account both the number and the age of food alerts when deriving edge weights. In the calculations described in this paper, we used l = 0.5 1/180 = 0.9961 as this means that the weight of a food alert is halved every 180 days.

Transgressor and detector indices
For each country in the network, we will define two indices: the transgressor and the detector index (TI and DI, respectively). The transgressor index of a country is high if many alerts are issued against that country by other countries, while the detector index is high if the country issues many useful food alerts against other countries. Since there is no baseline value against which we can assess individual countries, we normalize the indices to ensure that the sum of the both the transgressor indices and the detector indices over all the countries equals 1. We consider two different  Table 1

Transgressor and detector indices based on the HITS algorithm
The basic idea of this algorithm can be formulated in the domain of food alerts as follows: a country should have a high transgressor index if there are many reports on this country issued by countries having a high detector index; similarly, a country should have a high detector index if this country issues many reports against countries with high transgressor indices. Formally, let a i denote the transgressor and b i denote the detector index of country i. Let w ij be the weight of the edge from country i to country j (w ij is zero if there is no edge from country i to country j). The indices can be calculated by the following procedure: w ij a j 4. Normalize a i to make its sum exactly 1. 5. Normalize b i to make its sum exactly 1. 6. Go back to step 2 until the process converges.

Transgressor and detector indices based on the PageRank algorithm
The PageRank algorithm calculates transgressor and detector indices separately. The key idea here is based on a random walk over the vertices and edges of the network. A random walker starts from any arbitrary vertex, and in each step, it either chooses one of the outgoing edges of that vertex and jumps to the other endpoint of that edge with probability c, or jumps to another randomly selected vertex with probability 1-c. c is typically set to 0.85 and the probability of choosing an outgoing edge is proportional to the weight of that edge. Vertices that have many incoming and few outgoing edges are harder to escape from, therefore the probability of being at vertex i after infinitely many steps is a suitable transgressor index for that vertex. 1-c denotes the probability of taking a completely random jump on the network, and it is necessary for the random walker to escape from nodes having no outgoing edges. With c = 1, the random walker could be stuck forever in such ''sink'' vertices. The exact formula for calculating PR i (the PageRank score of vertex i) is as follows: w ji PR j The equation system above can also be solved iteratively and it always converges to a unique solution that is independent from the initial conditions. Similar reasoning shows that the PageRank scores of the network that is obtained from the original one by reversing all the edges is a suitable detector index.

Author Contributions
Conceived and designed the experiments: AP DPN. Analyzed the data: TN AP DPN. Contributed reagents/materials/analysis tools: TN. Wrote the paper: TN AP DPN.