key: cord-0978300-9zq6546y authors: Ouyang, Liwei; Yuan, Yong; Cao, Yumeng; Wang, Fei-Yue title: A novel framework of collaborative early warning for COVID-19 based on blockchain and smart contracts date: 2021-04-08 journal: Inf Sci (N Y) DOI: 10.1016/j.ins.2021.04.021 sha: bf79dca432a36b50c834e2104a37bbb6c11d1c38 doc_id: 978300 cord_uid: 9zq6546y Early warning is a vital component of emergency repsonse systems for infectious diseases. However, most early warning systems are centralized and isolated, thus there are potential risks of single evidence bias and decision-making errors. In this paper, we tackle this issue via proposing a novel framework of collaborative early warning for COVID-19 based on blockchain and smart contracts, aiming to crowdsource early warning tasks to distributed channels including medical institutions, social organinzations, and even individuals. Our framework supports two surveillance modes, namely, medical federation surveillance based on federated learning and social collaboration surveillance based on the learning markets approach, and fuses their monitoring results on emerging cases to alert. By using our framework, medical institutions are expected to obtain better federated surveillance models with privacy protection, and social participants without mutual trusts can also share verified surveillance resources such as data and models, and fuse their surveillance solutions. We implemented our proposed framework based on the Ethereum and IPFS platforms. Experimental results show that our framework has advantages of decentralized decision-making, fairness, auditability, and universality, and also has potential guidance and reference value for the early warning and prevention of unknown infectious diseases. Historically, the global outbreak and epidemic of acute infectious diseases have been witnessed to directly affect public health and socioeconomic development. Currently, the coronavirus disease 2019 (COVID-19) pandemic continues to spread globally. As of December 2020, it has already caused more than 70 million confirmed cases and one million deaths worldwide(WorldHealthOrganization). It is generally believed that the key to the prevention and control of infectious diseases is the long-term surveillance and rapid response of abnormal occurrences or increasing trends of infectious diseases by using early warning technologies and systems (Lederberg, Hamburg, Smolinski et al., 2003) . However, controlled by specific centralized organizations like national governments or Centers for Disease Control and Prevention (CDC), most of the existing early warning systems (EWS) for infectious diseases are passive and disease-specific, resulting in numerous isolated systems lacking reliable information sharing mechanisms. As such, they inevitably have the risks of single evidence bias and decision-making errors, and can thus only haphazardly pick up currently unknown diseases such as severe acute respiratory syndrome (SARS) and COVID-19 (Morse, 2007) . Introducing distributed collaboration into the EWS can give full play to the crowd intelligence to break the resource and capacity limitations of the existing centralized systems. For example, influenza and Ebola surveillance based on crowdsourced public reporting data proves to be more proactive and timely than surveillance based on diagnostic data from medical institutions (Smolinski, Crawley, Baltrusaitis, Chunara, Olsen, Wójcik, Santillana, Nguyen and Brownstein, 2015; Lwin, Vijaykumar, Fernando, Cheong, Rathnayake, Lim, Theng, Chaudhuri and Foo, 2014) . Since infectious disease surveillance and early warning is highly interdisciplinary, spanning a wide range of expertises, technologies, and data sources, it is widely believed that it is necessary to further integrate this collaboration of multiple contributors into the lifecycle of early warning. Therefore, there is an urgent need to establish a decentralized EWS to leverage the distributed contributions of multiple parties, support various early warning technologies, and monitor multi-source surveillance data. Furthermore, in an open, dynamic and complex environment, the EWS should be able to: 1) provide a secured and private collaboration environment for participants without mutual trust; 2) provide fair incentive mechanisms that promote sustained and effective contributions; 3) ensure the auditability, traceability, and credibility of surveillance data, models and early warning results to detect and eliminate malicious behaviors. This research is targeted at filling in this important gap, and our contributions can be summarized as follows. First, to break the resource constraints in centralized and semi-centralized systems, based on techniques including blockchain, smart contracts and artificial intelligence (AI), we propose a novel and decentralized framework of collaborative early warning for COVID-19 that meets the above requirements. Specifically, blockchain can help establish a trustless collaborative environment, smart contracts can encapsulate and execute scalable warning rules and incentive mechanisms, and AI enables a variety of pluggable surveillance models. Second, to make full use of major contributing forces of medical institutions and social participants (i.e., organizations and individuals), we design two surveillance modes in a unified framework, i.e., medical federation surveillance based on federated learning and social collaboration surveillance based on learning markets. Therefore, multi-source data collected from medical channels and social channels with different data features and privacy sensitivity can be separately analyzed but collaboratively surveilled. Specifically, it is hoped that by using our framework, medical institutions can train better federated surveillance models with privacy protection, while social participants without mutual trusts can share verified surveillance resources such as data and models, and fuse their solutions. Accordingly, their combination can enhance the quality of decision-making and improve the performance of early warning. Third, to evaluate our proposed framework, we explain our design in detail, compare it with the existing EWSs, and preliminarily implement and analyze it based on the Ethereum and IPFS platforms. An early warning scenario for COVID-19 based on open-source chest X-ray data sets is set up to comprehensively verify the functionalities of the framework, and the performance with multiple quantitative and qualitative indicators is discussed. Experiments show that the proposed framework can successfully unite the distributed medical and social surveillance forces, and provide them with fair incentives and trusted information sharing mechanisms, thereby reducing the risk of decision bias. Also, our framework with advantages of auditability and universality can further help the early warning and prevention of other unknown infectious diseases. The remainder of this paper is organized as follows. Section 2 reviews the existing early warning technologies and systems, basic concepts of blockchain and smart contracts, as well as blockchain-based federated learning and learning markets; Section 3 elaborates our novel framework of collaborative early warning for COVID-19; Section 4 presents an illustrative implementation of our framework based on Ethereum and Inter-Planetary File System (IPFS) platforms and analyzes its performance; Section 5 discusses our future work, and Section 6 concludes. In this section, we briefly review the basic concepts and recent advances of existing early warning technologies and systems, blockchain and smart contracts, as well as blockchain-based federated learning and learning markets. The major task of early warning for infectious diseases is to detect notable aberrations via analyzing surveillance data with specialized surveillance technologies, and on this basis, send out warning signals related to possible outbreaks before or at an early stage of the events to protect people from potential health risks (Yang, 2017) . According to the different surveillance data, the existing infectious disease EWSs can be divided into indicator-based and event-based (Paquet, Coulombier, Kaiser and Ciotti, 2006) . Generally, indicator-based EWSs analyze structured data collected through routine surveillance channels including healthcare providers, diagnostic laboratories and governmental specialists, while event-based EWSs analyze unstructured data gathered from sources of intelligence of any nature, such as search engine queries, social media posts, e-commerce sales trends, wearable device records and many other online big data generated outside the routine channels (Hulth and Rydevik, 2011) . Therefore, the former is usually more reliable and the latter is more timely. For higher accuracy, most national EWSs including the China Infectious Diseases Automated-Alert and Response System (CIDARS) (Yang, Li, Lan, Ma, Jin, Lai, Liao, Lv, Sun and Wang, 2017) are indicator-based, while for better timeliness, most web-based EWSs such as the Influen -2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 zanet (Influenzanet) , HealthMap(HealthMap), ProMed-mail(ProMed-mail) , and the Global Public Health Intelligence Network (GPHIN) (Mykhalovskiy and Weir, 2006) are event-based. Furthermore, according to different surveillance technologies, event-based EWSs can be classified into three main categories of news aggregators, automatic systems and human-moderated systems (Linge, Steinberger, Weber, Yangarber, van der Goot, Al Khudhairy and Stilianakis, 2009) . Specially, news aggregators include Influenzanet, because it just aggregates influenza activity index by collecting and screening influenza-like-illness (ILI) related questionnaires completed by volunteers, and users can not get more detailed information unless they examine each individual article (van Noort, Codeco, Koppeschaar, Van Ranst, Paolotti and Gomes, 2015) . Automatic systems go beyond the simple gathering task by adding a series of automatic analysis steps. HealthMap falls into this category since it automatically analyzes the Internet media reports with natural language processing tools and directly overlays warning results on an interactive geographic map (Freifeld, Mandl, Reis and Brownstein, 2008) . Human-moderated systems additionally introduce a group of human analysts to screen for epidemiological relevance of the automatically processed information before they are presented to the users (Choi, Cho, Shim and Woo, 2016) . Both of ProMed-mail and GPHIN employ specialists to manually screen and aggregate their warning results to be published (Yu and Madoff, 2004) . Obviously, the quality of surveillance data and the capability of surveillance technologies directly determines the performance of EWSs. More and more researches have showed that the utilization of multi-source surveillance data and the combination of various surveillance technologies can help promote active detection, reduce decision bias and balance the reliability and timeliness (Yang, 2017; Salathé, 2016) . To achieve this integration, specific expertise provided by worldwide participants and their well-organized distributed decision-making are necessary. However, all of the aforementioned EWSs are centralized or semi-centralized with designated participants and fixed surveillance data and technologies, which means that any expansion of them might be expensive and inefficient. Therefore, we need to establish a new decentralized EWS to support such long-term and large-scale cooperation among participants without mutual trust. The blockchain and smart contract technology, which can provide a high degree of interoperability, fair incentive mechanisms, trusted information sharing mechanisms, and secured and privacy collaboration environments, has become a very promising choice. Originating from the widely publicized whitepaper Bitcoin: A Peer-to-Peer Electronic Cash System published by Satoshi Nakamoto in 2008(Nakamoto) , blockchain is an append-only distributed ledger with chained data blocks maintained and shared by all nodes in a decentralized system . According to the permission settings, blockchain can be classified into public blockchain, consortium blockchain, and private blockchain. Since blockchain is an integrated innovation based on the existing techniques, including cryptography, peer-to-peer networks, consensus algorithms, and incentive mechanisms, blockchain-based systems can achieve large-scale collaboration with privacy control by setting access permissions, as well as avoid data tampering and single point of failures through redundant storage (Yuan, Ni, Zeng and Wang, 2018) . Coined in 1994 by Nick Szabo (Szabo) and revived by blockchain in recent years, smart contracts running on blockchain are self-enforced and self-verified computer programs with a series of pre-defined rules, which can be embedded into tangible or intangible assets, transactions and data, and then serve as a software-defined intermediary among untrusted participants to facilitate information exchange, value transfer, and asset management (Wang, Ouyang, Yuan, Ni, Han and Wang, 2019) . Since blockchain and smart contracts have such characteristics as trustlessness, autonomy, traceability, and tamper-resistance, they are widely considered as the perfect digital infrastructure for building distributed and disintermediary collaboration systems Wang, Yuan, Zhang, Qin and Smith, 2018; Lin, He, Huang, Xie and Choo, 2020; Zhang, Deng, Liu and Zheng, 2018b) , and have been preliminarily applied in the field of public health with success (Kuo, Kim and Ohno-Machado, 2017) , such as electronic medical records sharing (Xia, Sifah, Smahi, Amofa and Zhang, 2017; Cao, Zhang, Liu, Zhang and Neri, 2019) , privacy data access control (Azaria, Ekblaw, Vieira and Lippman, 2016) and opioid prescription tracking (Zhang, Schmidt, White and Lenz, 2018a) . This paper aims to establish a collaborative EWS framework for COVID-19 with the help of scalable and interoperable blockchain and smart contracts, so that our proposed EWS can not only improve the accuracy of early warning by promoting the sharing of trusted surveillance resources, the fusion of distributed decision-making, and the cooperation of untrusted contributors, but also improve the timeliness of early warning by adopting smart contracts with preset rules for real-time, automatic and continuous monitoring. Our implementation is based on two prevalent blockchain projects, i.e., Ethereum and IPFS. Ethereum is currently the most popular development platform for smart contracts (Wood et al., 2014) , while IPFS is a peer-to-peer version-controlled distributed filesystem (Benet, 2014) . IPFS routes files according to their content hashes, aiming to share data globally without the risk of loss or tampering. In our design, the encrypted data and models to be shared are stored in IPFS, and only the obtained IPFS hashes are transmitted on the blockchain, thereby reducing the payload of data storage. Benefiting from its powerful data mining capabilities, the emerging AI technologies have been witnessed to provide valuable solutions to many recent researches areas, including digital image processing (Yu, Rui and Chen, 2013; Yu, Tao, Wang and Rui, 2014b) , natural language processing (Young, Hazarika, Poria and Cambria, 2018; Lee, Yoon, Kim, Kim, Kim, So and Kang, 2020) and multimodal analysis (Hong, Yu, Tao and Wang, 2014; Yu, Rui and Tao, 2014a) . With the revolution of Internet and mobile devices, traditional single-factor surveillance technologies commonly used in indicator-based EWSs, such as CIDARS, gradually show their insufficient capacity in dealing with multi-source big data, and more and more AI-enabled intelligent models are introduced with better performance (Ginsberg, Mohebbi, Patel, Brammer, Smolinski and Brilliant, 2009; Odlum and Yoon, 2015; Wong, Zhou and Zhang, 2019; Varela-Santos and Melin, 2020) . Considering that the surveillance data collected from medical channel and social channel has different data features and privacy sensitivity, our proposed framework is supposed to accordingly provide them with two different surveillance modes when introducing intelligent models, so as to promote their cross-end collaboration. Therefore, we combine and expand two existing works, i.e., federated learning (FL) (Konečnỳ, McMahan, Yu, Richtárik, Suresh and Bacon, 2016) and learning markets (LM) (Ouyang, Yuan and Wang, 2020) . FL is a new machine learning architecture proposed by Google in 2016 to solve the data islands problem. In FL, federation members jointly train a centralized federated model by exchanging and fusing local parameters, so as to implicitly aggregate training data and improve model performance without revealing private data. As such, FL is expected to help medical federations to obtain a better federated model as their unified surveillance standard under privacy protection. However, there are two significant problems to be solved. First, the transmission and fusion of federated data based on a centralized cloud or server have the potential risks of data loss, leakage, tampering, and single point of failures. Thus, Kim et al. propose a blockchainized FL architecture (BlockFL) for decentralization, in which federation members download all local updates stored in the latest block and update the global model locally (Kim, Park, Bennis and Kim, 2019) . Second, assuming all members are trustable and reliable, FL indiscriminately accepts individual updates and shares the federated model, thus lacking the ability to exclude malicious behaviors and include fair and sustainable incentive mechanisms. Therefore, our previous work proposed a decentralized AI collaboration framework based on blockchain and smart contracts, namely, LM. LM consists of the collaboration market and the sharing market, and controls their logic through scalable market mechanisms encapsulated in programmable smart contracts. In the collaboration market, untrusted participants can realize distributed collaborative mining under dynamic incentives in ensemble learning (EL)'s "Centralized Data + Distributed Model (CDDM)" mode or FL's "Distributed Data + Centralized Model (DDCM)" mode. In the secured and private decentralized sharing market, auditable, traceable and trusted AI models and data can be traded as digital assets. In (Ouyang et al., 2020) , we take CDDM mode as an illustrative example to implement LM and prove its advantages. This paper expands LM to establish the system. Specifically, at the Medical End, we combine the ideas of (Kim et al., 2019) to expand the collaboration market, thereby realizing the FL's DDCM mode and completing the federated surveillance. At the Social End, we share trusted surveillance data and models in the sharing market, and complete collaborative surveillance in EL's CDDM mode in the collaboration market. It is worth noting that whether in LM or our proposed framework, smart contracts only manage the interaction logics between distributed participants, and the training of AI models is essentially completed off the blockchain and according to the existing methods of FL and EL, which means we do not rely on specific models, and all intelligent surveillance models suitable for FL and EL can be easily integrated into our framework. Without loss of generality, three classic and widely studied deep learning models, including Convolutional Neural Networks (CNN), Long Short-Term Memory (LSTM) networks and Bi-directional Long Short-Term Memory (BiLSTM) networks, are selected to demonstrate and analyze the proposed framework (LeCun, Bottou, Bengio and Haffner, 1998; Hochreiter and Schmidhuber, 1997; Schuster and Paliwal, 1997; Hong, Yu, Zhang, Jin and Lee, 2018) . In this section, we explain the framework, operation mechanisms, and detailed design of smart contracts of our proposed collaborative EWS for COVID-19. The framework of the proposed system is shown in Fig. 1 , and Table 1 presents the description of important notations and variables in this paper. The system running on an underlying blockchain network consists of Medical End and Social End, including four roles, i.e., medical federation members, social monitors, verifiers, and miners. Its main function is enabled by five smart contracts: Authority Management Smart Contract (AMSC), Medical Federated Surveillance Smart Contract (MFSSC), Social Collaboration Surveillance Smart Contract (SCSSC), Medical & Social Fusion Warning Smart Contract (MSFWSC), Incentive Smart Contract (ISC). At the Medical End, federation members realize federated surveillance based on FL and private healthcare data. At the Social End, social monitors and verifiers realize collaboration surveillance based on EL and trusted and tradable multi-source data in LM. At last, according to the preset fusion algorithms and early warning rules, MSFWSC fuses and examines emerging cases' monitoring results from two ends to realize automatic and real-time early warning of the new COVID-19 outbreak. In this process, the Oracle which links the off-chain verified authoritative websites is used as a trusted external data source for smart contracts to query the external states and trigger the execution. The main concepts in the system are defined as follows. Participant: denoted by , the participant who has registered in the blockchain network with assigned public key and private key . Federation member: denoted by , the participant from medical institutions who has private healthcare data for surveillance, and forms a federation with other medical participants possessing the same type of data. deposits to smart contracts before joining the early warning project, and negotiates to determine the FL mode and communication protocol in before the project starts. The FL mode includes model types, fusion algorithms, iteration conditions, etc, and the communication protocol includes encryption/signature algorithms, shared key of private data , custom encrypted communication channel, etc. Social monitor: denoted by , the social participant who has verifiable data and models for surveillance, and forms a collaboration organization with other social participants possessing the same type of data. deposits to smart contracts before joining the early warning project, publishes surveillance solutions with corresponding data and models in LM, and collects sufficient proof of solution validity from verifiers. can also publish surveillance solutions directly based on verified data and models in the sharing market. Verifier: denoted by , the social participant who is responsible for verifying the validity of surveillance data, models, and solutions in LM. deposits to smart contracts before joining the early warning project. In the same round of validation, can only testify for the same once and cannot testify for himself. After the project ends, will be rewarded according to the times of honest validations, and be punished when cheating. Miner: the participant who is responsible for the underlying consensus process, including verifying transactions, packing data blocks, and updating the blockchain. All participants can be miners. AMSC: invoked for project and participant identity management. Project management includes setting project requirements and controlling the project process, and participant identity management includes adding/deleting , updating 's information, and setting interaction permissions. MFSSC: invoked by for federated surveillance, including constructing unified validation sets, exchanging local surveillance models, fusing federated surveillance models, and monitoring emerging cases based on the obtained 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 federated models. SCSSC: invoked by and for collaboration surveillance, including sharing verifiable data and models in the sharing market, publishing individual surveillance solutions and performance in the collaboration market, verifying and evaluating individual surveillance solutions and performance, fusing the collaborative surveillance solution set, and monitoring emerging cases based on the obtained solution set. MSFWSC: invoked for the automatic fusion and warning of emerging cases' monitoring results from Medical End and Social End, according to the preset fusion algorithms and early warning rules. ISC: invoked for the calculation and implementation of the rewards and punishments of all participants, including cryptocurrency and credit scores. The proposed operation mechanisms can be divided into four stages, namely, project initialization, Medical End/Social End surveillance, M&S-fusion based warning, and post-warning incentivation. The detailed process in each stage is depicted as follows. 1. Project initialization: 1) All participants register for project identity with registration deposit ; 2) Registered applies to AMSC with the required fund → for becoming confirmed in specific , confirmed in specific , or confirmed in ; 3) Confirmed , , or can apply to AMSC for deleting role and exiting project before the project starts; 4) When the amounts of , , and meet the preset thresholds, the project starts. A. Medical End surveillance 1) ∈ shares validation set sampled from privately-held data set in , downloads and combines all to construct a unified validation set locally; 2) In each iteration, ∈ shares their local model trained on privately-held data set in and publishes its performance on in the blockchain network. MFSSC calculates and publishes 's contribution coefficient ; 3) ∈ verifies and evaluates local models from others, excludes false models, fuses the federated model according to , and at last, publishes 's performance on and the list of members he/she has rejected; 4) MFSSC determines the final federated model from the consensus of all and publishes 's performance on , all s, and the lists of rewards and punishments, i.e., and . This round of iteration ends and the next starts. Until the preset stop conditions are met, the training of federated surveillance is completed; 5) After the training completes, all ∈ use the obtained federated model as the unified standard to monitor their received emerging cases. MFSSC fuses their uploaded results according to the preset rules and reports to MSFWSC. B. Social End surveillance 1) Social participants share verifiable surveillance data and models in the sharing market, and prepare for the subsequent collaboration; 2) In each iteration, ∈ publishes surveillance solution with corresponding verifiable data and models in LM, announces their performance in the blockchain network, and requests sufficient ∈ to prove their validity; 3 Figure 2 : A complete early warning cycle. ∈ use their verified solutions in { } to monitor their received emerging cases respectively. SCSSC fuses their uploaded results according to the preset rules and reports to MSFWSC. MSFWSC receives the monitoring reports from MFSSC and from SCSSC, fuses their monitoring results of emerging cases based on the preset algorithms and weights, i.e., and , and automatically alerts when the early warning conditions are met. 4. Post-warning incentivation: ISC calculates and implements the rewards and punishments of all participants based on the lists of rewards and punishments from MFSSC and SCSSC and the comparison of system warning results with outbreak information from authoritative websites. The early warning project ends. The proposed collaborative EWS is realized by five smart contracts, i.e., AMSC, MFSSC, SCSSC, MSFWSC, and ISC, which are developed to inherit and monitor each other for simplicity and security. The preset project parameters and their definitions are shown in Table 2 . Note that this section is only a simple illustrative implementation for the collaboration of one medical federation and one social collaboration organization. By adjusting the contract logics and corresponding parameters, it is easy to extend our participants, authorities, incentive mechanisms, fusion algorithms, and early warning rules. The details are as follows. Fig. 2 shows a complete cycle of the EWS and the scope of smart contracts in the cycle. To distinguish with the four stages at two ends, seven bool-type status flags are set, i.e., , , . As shown in Fig. 2 , when these status flags are set as true, the next stage of interaction starts. AMSC: As shown in Algorithm 1, AMSC realizes the main functions in the project initialization stage, escrows all deposit and bonus, and is monitored and invoked by other smart contracts to query and update project and participant information. Initial participant information includes deposit and credit, recorded as [ ] = { , }, and initial can be set to be the same or proportional to initial . After selecting roles and passing the validation of qualification function ℎ deposits to AMSC and registers in project, ← { ∶ , ∶ 0}; 2: Before project starts, registered applies to be ∕ ∕ by executing ℎ ( , ) to check: 1) apply with required fund ; else throws; 3: Before project starts, confirmed ∕ ∕ applies to delete and exit project: MFSSC: As shown in Algorithm 2, MFSSC realizes the main functions of Medical End surveillance in the Medical End/Social End surveillance stage, monitors AMSC to synchronizes permissions, and invokes MSFWSC to report medical monitoring results. Federated surveillance consists of two stages: training and monitoring. Before training starts, every ∈ needs to prepare a in their acceptable sample proportion to form a unified validation set together, and subsequently take models' performance on as the evaluation standard, so as to reduce the impact of private data bias, exclude overfitting local models and maintain the training fairness. Since are motivated to provide models that outperforms on , the obtained federated model will cater to members providing more private data, thereby encouraging moderate sharing. Federations can also be built based on certain trust, but technically, both of the unified and trust basis are not mandatory but for better security, privacy, and performance. Because FL adopts the homogeneous basic models, s only need to share, verify, and fuse the models' weight parameters as formula (1). To record the interactive history and ensure security and privacy, the private data transmission protocol stipulated in our design is as follows: 1) all s negotiate to determine the shared key , and every generates his own symmetric key , 2) and upload private files encrypted by or on IPFS, 3) and publish the obtained IPFS hashes in the blockchain network, or transmit them to others by invoking the Send function in formula (2), also sends the encrypted to receivers, 4) receivers download and decrypt encrypted files to obtain original files. The evaluation of models can include a variety of indicators such as accuracy, recall rate, and F1 measure. ( ) is the calculation function of that can adopt various forms. For instance, when is regarded as , it can be set inspired by AdaBoost (Freund and Schapire, 1997) , i.e., = 1 2 ln 1− , where is the weighted classification error rate of on . There is no special verifier in federated surveillance, and members are required to supervise, verify, and evaluate each other. A successful model needs the support of more than half of the other members, and the specific support ratios and consensus mechanisms can be easily extended in the future. Algorithm 3 Social Collaboration Surveillance Smart Contract. . ℎ( ), = + + , goes to step 4); else is valid, goes to step 2), 2) finds consistent from all : 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 SCSSC: As shown in Algorithm 3, SCSSC realizes the main functions of Social End surveillance in the Medical End/Social End surveillance stage, monitors AMSC to synchronizes permissions, and invokes MSFWSC to report social monitoring results. Collaboration surveillance is realized based on our previous work LM (Ouyang et al., 2020) . In LM, registered participants can share or verify surveillance data and models to obtain enough credit scores for subsequent operations, and should upload or link the corresponding data and models when publishing solutions. Since LM with credit management traces the interaction behaviors of registered participants and the historical information of surveillance data and models in the whole process, and without mutual trust can choose collaborators, data, and models based on these records. Besides, medical participants can also request verified surveillance resources in the sharing market to reduce the difficulty of data analysis. Collaboration surveillance also consists of two stages: training and monitoring. in the same can submit solutions for the same type of data. And when their data are not the same, similar to federated surveillance, they also need to construct a unified validation set for fairness before training and validation. Thus, for simplicity, Algorithm 3 assumes that they monitor the same trusted open-source data. needs to consume credit scores when reviewing and evaluating solutions to increase the cost of invalid and malicious validation. who upload invalid models or false performance will be punished, and will be rewarded and punished according to the times of honest and dishonest validations. Only who has been verified at least times and passed can participate in the final monitoring, i.e., . ℎ( ). They will monitor emerging cases based on their verified solutions and weighted vote for the prediction results based on EL methods, and thus and are calculated as formula (3). The calculation function of can be customized or the same as that of federated surveillance. ' rewards and credits: , , , , , = ( , , , , , ), when finishes, sets = , goes to step 3; 3: return , , , MSFWSC: As shown in Algorithm 4, MSFWSC realizes the main functions in the M&S-fusion based warning stage, monitors MFSSC and SCSSC to fuse their monitoring results and automatically alerts when the fusion results exceed the preset threshold. Specifically, is fused as formula (4), where and are the amounts of s and s. Through monitoring multiple MFSSCs and SCSSCs, MSFWSC can fuse monitoring results from multiple medical federations and social collaboration organizations. It is generally believed that the medical surveillances are more accurate, while the social surveillances are more timely. Therefore, by adjusting the fusion weights of two ends, it has the potential to enhance the accuracy and timeliness of EWS at the same time. We will discuss this in detail in Section 4.2.1. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 and punishments, and its corresponding calculation rules are depicted as formula (5). In order to restrict malicious s instantly, their credit scores are updated in real-time in SCSSC. After the early warning finishes, based on the atomicity of smart contracts, will reward all participants at the same time to ensure fairness and security. For cryptocurrency, we simply set up that all rewards come from deposits. However, when all s are honest, they may get the rewards equal to their initial deposits, which inevitably leads to the loss of their motivation for validations. And this can be easily solved when governments or other organizers provide additional bonuses for these early warning projects. For credit scores, we set up more detailed incentive mechanisms and prove the effectiveness in Section 4.2.3. , ∈ , ∈ ∶ = Σ , = + + ; Here, we discuss the effects of the preset parameters in Table 2 . + , − , , and are parameters determined by incentive mechanisms. The larger the − , and are set, the higher the costs of malicious behaviors will be. Especially, when − ≫ + , any malicious behavior might lead to the rapid decrease of credit scores until it is too low to exceed the preset threshold of the subsequent operations. For instance, a large will immediately prevent dishonest s from reviewing new solutions. Thanks to the decentralized blockchain, theoretically, , , have no maximum limit. However, with their increase, the payload of on-chain communications and offchain model training will also increase, and more efficient consensus mechanisms and model fusion algorithms should be further considered. For example, in small-scale collaboration surveillance, = can be set, which means should be verified by all s. While in the large-scale collaboration, a smaller inspired by the existing consensus mechanisms, such as Proof of Stake (POS), Delegated Proof of Stake (DPOS) and Practical Byzantine Fault Tolerance (PBFT), is also acceptable (Mingxiao, Xiaofeng, Zhe, Xiangwei and Qijun, 2017) . Additionally, a larger helps to limit the lower bound of 's performance and ensure the advantages of collaborative solution sets. At Last, , , and are parameters set according to early warning rules. Smaller and help to improve sensitivity, and the trade-off of and help to improve accuracy and timeliness. Table 3 is the comparison of the typical research works and our framework. First, our proposed framework is the only decentralized organization that aims to break the resource constraints of centralized and semi-centralized systems. After completing registration, identity authentication and mortgage deposit, capable participants all over the world can freely contribute to our framework using their preferred data and models. Second, since we only use smart contracts to manage the interaction process, and do not rely on specific data and models, the modification of early warning logics and the integration of multiple data and various models can be easily realized without much cost. This feature enables our high flexibility which can support both indicator-based early warning and event-based early warning. Also, with the help of LM, our models and data can be encapsulated as verifiable, traceable and tradable digital assets, thus enhancing their credibility and reusability, and making future early warning easier. In terms of decision-making, our framework automatically screens and fuses distributed decision-making using the preset smart contracts without manual moderation, so that it can surpass news aggregators and avoid moderator bias. Third, for information access, unlike the existing systems alternatively designed as public or restricted, our framework has optional accessibility. For example, although the Send function is set to publicly record the transmission logs on blockchain for auditability, These improvements provide some significant information sharing and utilization mechanisms for our EWS. Fourth, compared to the volunteer project Influenzanet, we use ISC to implement dynamic rewards in the form of cryptocurrency and credit scores, so as to encourage effective contributions and unite decentralized organizations. In this section, we develop the smart contracts designed in Section 3.3 to implement and examine the proposed collaborative EWS. An early warning scenario for COVID-19 based on open-source chest X-ray data sets is set up to comprehensively verify the functions of smart contracts, and we evaluate and analyze the EWS with multiple quantitative and non-quantitative indicators. Experiments show that the proposed EWS can successfully unite the distributed medical and social surveillance forces to reduce the risk of decision bias, provide them with fair incentives and trusted information sharing mechanisms and has advantages of auditability and universality. Based on the development architecture Ganache+Truffle, we create a virtual Ethereum blockchain locally and develop the designed smart contracts by using Solidity programming language to implement the proposed collaborative EWS. Web3.js is used to interact with all smart contracts and verify their performance, Python+Keras is used to implement all training, prediction and fusion algorithms of AI models. And by using the library, Keras.model, models or model weights are saved as files of multiple formats and then stored or shared in IPFS. To reduce the execution costs, we extract the common functions in five smart contracts to form a Helper contract for others to call, including querying specific members and calculating contribution coefficients. Therefore, six contracts are deployed, i.e., Helper, AMSC, MFSSC, SCSSC, MSFWSC, and ISC. The experimental scenario is assumed as follows. To surveil and monitor the emerging COVID-19, three medical institutions with privately-held chest X-ray data sets form a federation to realize medical federated surveillance. Three social monitors and three verifiers form a collaboration organization to realize social collaboration surveillance. In the training stage, social monitors submit AI models for the same trusted open-source chest X-ray data set. For these two surveillance modes, we construct a unified COVID-19 chest X-ray data set with 203 positive samples and 406 negative samples, and then divide it in two ways as shown in Table 4 . To fairly compare the performance of individual and collaboration surveillance models, the is the unified validation set sampled from all s, and the Test Set is invisible to all s and s. s and s are set to only train and verify solutions on the Train Set. Our positive samples are collected from a open-source data set released on GitHub, which consists of chest X-ray and CT images of patients who are positive or suspected of COVID-19 or other viral and bacterial pneumonias (MERS, SARS, and ARDS) (Cohen, Morrison and Dao, 2020) . We downloaded the data set on July 28, 2020, and screened out all the positive samples of COVID-19 in posteroanterior (PA) view, which has up to 203 samples. Then, to collect the negative samples, we randomly sampled 406 samples tagged as Normal in PA view from an open chest X-ray data set on Kaggle and formed the complete data set (Mooney) . It is worth noting that our data set is only constructed to demonstrate and analyze the proposed EWS, based on which all of the obtained models lack clinical study and can not really diagnose (Maguolo and Nanni, 2020; Tartaglione, Barbano, Berzovini, Calandri and Grangetto, 2020) . In practical application, the EWS can choose more trustable data sets with smaller bias and more interpretable models with better clinical research. Additionally, due to the inherently limited computing ability of Ethereum smart contracts, such as only supporting 8-256 signed or unsigned integer variables, failing to compute floating-point numbers, and lacking complete mathematical libraries, we have adopted some development strategies, including calling a verified contracts library named SafeMath for preventing overflow, expanding the parameters, and transforming logarithmic functions into polynomials, To avoid fraudulent and other malicious behaviors, all functions in contracts have strict inspection conditions, so they can only be performed when callers obtain the required authentication of identity, time, and calling mode. Finally, in order to save the execution costs, some data is recorded by triggering "Event" instead of creating new parameters. We examine the accuracy of the proposed system from three aspects: Medical End, Social End, and fusion results. Medical End: Assuming that all s train CNN models with the same structure, 3 has twice the data of 1 and 2 . We tested the accuracy of local models, the average federated model, and the weighted federated model on the and the complete data set. The results are shown in Fig. 3 , and all s are shown in Table 5 . On the complete data set, the performances of 1 , 2 and 3 are similar, both federated models are better than local models, and the weighted model has the highest accuracy. On the VSet, the performance of 1 , 2 and 3 has a large gap, both federated models are between 1 and 3 , but the weighted model is better than the average model. This shows that when local models have good and similar performance, federated collaboration is beneficial to improve federated models and thus the warning accuracy. When local models contain both good and bad models with a large gap, federated models will inevitably be affected and deteriorated, but in both cases, the weighted model can better approximate the good models. Besides, when federated models are equally shared among all members, the real contributors may fail to benefit from the cooperation and the lazy members may easily take a free ride, which means that FL without additional incentives is an unfair collaboration, leading to the loss of contribution motivation and the dissolution of the federation. For this issue, ISC sets that all s divide the total deposit in proportion to their , so as to provide additional economic incentives proportional to the real contribution and maintain the fairness and sustainability of cooperation. Social End: For the same trusted open-source data set, all s can submit heterogeneous models as their individual surveillance solutions. Assuming that three s submit CNN, LSTM, and BiLSTM models respectively, we discuss two cases that 1 submits a good CNN model and 1 ' submits a bad CNN model. The accuracy of individual solutions, the average collaborative solution set, and the weighted collaborative solution set on the Train Set and Test Set in two cases are shown in Fig. 4 (a) (b) , and all s are shown in Table 6 . Since the open-source Train Set is visible to all social participants, we do not divide a special validation set from the Train Set for s, and s may submit overfitting models. In practical application, the early warning project can be initiated by organizers with trusted surveillance data, and they can choose to prepare special validation sets to prevent strategic behaviors. Because this mechanism has been discussed and implemented in our previous work (Ouyang et al., 2020) , for simplicity, this experiment just assumes that all submitted models are not overfitting. As shown in Fig. 4 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 collaboration can achieve better surveillance performance, regardless of average or weighted set. When individual solutions contain bad models, the collaboration will be affected. However, similar to Medical End, the weighted set can better exclude the negative influence and approximate to good solutions. Both experiments on Medical End and Social End show that the collaboration can improve the performance of fusion model under certain conditions. This is because as shown in formula (1) and (3), their trainings of fusion surveillance models are essentially completed off the blockchain based on FL and EL, and smart contracts designed to control interaction do not affect models' performances. In other words, these certain conditions that can improve the fusion performance are exactly the effective methods to improve federated models and ensemble models in FL and EL. Therefore, by learning from the recent advances of FL and EL, the advantages of our fusion models and collaborative early warning can be further ensured. In this paper, we simply adopt the above efficient weighted fusion methods to demonstrate and analyze our system. Fusion results: We test the medical weighted federated model and the social weighted collaborative solution set 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 <385> <226> <293> <315> <326> <597> <219> <247> <325> <335> <468> <480> on the complete data set, and get their misclassified sample sets as shown in Fig. 5 , in which the serial numbers of negative samples are less than or equal to 405, and the serial numbers of positive samples are greater than 405. Due to their different data preferences, by adjusting and , the misclassified samples outside their intersection can be identified, so as to improve the accuracy and timeliness of early warning. For instance, when = = 1 and the accuracy is taken as the evaluation indicator, the formula to determine whether to alert is as formula (6). When the early warning rule is set to alert whenever a positive sample is detected at an end, the corresponding mathematical expression is as formula (7), and the solutions of , , and are as formula (8). Then, if we take as the accuracy of the weighted federated model on , i.e., 0.9524, and take as the weighted estimated accuracy as shown in formula (9) because of the invisibility of Test Set, i.e., 0.9782, a feasible solution is ( , , ) = (0.4, 0.5, 0.5). At this time, compared with the early warning rule which is set to alert whenever a positive sample is detected at both ends, the proposed EWS can additionally give correct early warning to the samples in the misclassified set, including ⟨436⟩, ⟨468⟩, ⟨480⟩, ⟨525⟩, ⟨550⟩ and ⟨553⟩, which improves the performance. When MSFWSC needs to fuse the monitoring results of multiple medical federations and social collaboration organizations, the formula (6) can be easily extended for the combinatorial optimization of weights and thresholds to obtain better accuracy and timeliness of early warning. Any execution of programming segments in Ethereum will trigger a payment for computing resources calculated by using the unit called gas according to the preset rules (Wood et al., 2014) . The actual transaction costs ℎ = * , where is the exchange rate between Ethereum's cryptocurrency ℎ and gas, and can be set arbitrarily by senders. The higher is the , the faster will the transaction be packaged into the blockchain. The gas consumption of smart contract deployments and executions are shown in Table 7 and Table 8 , respectively. Considering that the size of parameters, the number of cycles, the order of invoking, and the complexity of calculations will all affect the gas consumption, the data in Table 7 and Table 8 are the average values obtained from multiple repeated experiments. Because our smart contracts focus on dealing with the cooperative relationships among all participants and most complex computations are implemented in an off-chain fashion, the operation comsuming the most gas is deploying the six smart contracts, i.e., 12,739,996 gas in sum. Taking = 2 × 10 10 as an example, the consumption of deployment is 0.2548 ℎ, and according to ℎ's historical highest and lowest prices, 1 ℎ = $2036.29 and 1 ℎ = $0.4208(CoinMarketCap), the corresponding costs are $518.8465 and $0.1072, respectively. Both of them are far cheaper than the establishment of any centralized EWS that can support the same kind of distributed collaboration. With the future upgrade of the Ethereum platform, the reduction of gas costs, and the adoption of consortium blockchain without execution costs, our costs can be expected to be further reduced. Another collaboration cost we consider is the computational time. Besides the original model training time, the computational time includes the contract execution time to realize on-chain interactions. In the blockchain network, users send new transactions to invoke smart contracts, miners sequentially verify, execute and package these transactions to prepare a new block, and the contract execution take effect only when the new block is added to the main chain. In other words, transactions sent asynchronously by distributed participants but packaged into the same block can be regarded as having the same computational time, namely, block time. Therefore, taking federated surveillance in MFSSC as an example, assuming that in all steps of Algorithm 2, the time differences among all s invoking MF-SSC for the same phased operations are less than one block time, and their transactions are immediately packaged into the same added block without pending, then, the additional computational time of a model iteration (Step 2 to Step 4) is two block times because Step 3 automatically goes to Step 4 when all s finish. Similarly, that in SCSSC (Step 2 to Step 4 in Algorithm 3) is also two block times. Further, since s and s only simultaneously monitor emerging cases based on the trained models in the future long-term monitoring, the additional contract execution time of every later collaborative early warning is actually two block times (Step 5 in Algorithm 2/3 + Step 1 in Algorithm 4). Considering that the average block time in the virtual blockchain can be easily customized, we refer to that of the existing Ethereum, which is about 13 seconds, and the two block times are about 26 seconds, so it is still attractive to most existing EWSs(etherchain). For credit scores, our incentive mechanisms are designed as follows: 1) When social participants upload a piece of data and model, they can get 20 scores. When publishes a , he/she should upload corresponding data and models at the same time, and then gets 20 scores in total; 2) with credit scores greater than 10 can participate in the validation, and he/she needs to consume 10 scores to review a solution and its corresponding data and models, i.e., = 10; 3) If a is determined to be invalid after the consensus of all its verifiers, will be punished with 30 scores, and otherwise be rewarded with 10 scores, i.e., − = 30, + = 10, − > + ; 4) Taking s' consensus as the correct validation results, every can get 20 scores for one correct validation, and lose 30 scores for one false validation, i.e., + = 20, − = 30, − > + . In this section, we carry out a numerical simulation experiment to verify the effectiveness of the above incentive mechanisms. Suppose that there are six different participants at the Social End who serve as both social monitors and verifiers. Every participant has 500 solutions, and each solution corresponds to one piece of data and model. In each iteration, they publish a random number of solutions until all their solutions are published. At the same time, they verify a random number of solutions published by other participants, but can only verify a specific solution once. Every participant's initial credit score is 0. We divide the participants into three types: honest, malicious and lazy (or random), and their settings are as follows: In each iteration: • Honest participants have a probability of 0.9 to publish valid solutions and give correct verification; • Lazy participants have a probability of 0.5 to publish valid solutions and give correct verification; • Malicious participants have a probability of 0.1 to publish valid solutions and give correct verification. We set up two experimental scenarios. In both scenarios, 1, 2, 3, 4 are honest participants, and 5 is a lazy participant (baseline). 1) 6 is a malicious participant. As shown in Fig. 6 (a) , the credit scores of 1, 2, 3 and 4 gradually increase until all solutions are published. The credit score of 5 fluctuates around 0 and is much lower than honest participants. The credit score of 6 is negative, indicating that he/she has been punished. This shows that the above incentive mechanisms can effectively encourage honest contribution, and reduce motivations for malicious behaviors. 2) 6 is honest in the first three iterations and becomes malicious from the fourth iteration. As shown in Fig. 6 (b) , the credit score of 6 increases in the first three iterations, declines sharply in the fourth iteration, and finally stabilizes to negative much lower than the lazy participant. This shows that the above incentive mechanisms can help detect malicious behaviors and punish malicious participants in time. Hence, the proposed EWS can obtain certain antiattack ability by restricting operation authorities based on credit scores. These experimental results are consistent with our discussion of + , − and in Section 3.3. Considering that infectious disease surveillance and early warning usually requires the long-term collaboration of a large number of geographically distributed contributors with different expertise knowledge, EWS with built-in incentive mechanisms based on blockchain, smart contracts and token economics are conducive to fairly quantifying the contribution, accurately evaluating the shared information, and continuously promoting the collaboration of global capable individuals, institutions and organizations. In our proposed framework, all participants realize collaborative early warning by invoking smart contracts, and their interactive records will be publicly stored on the blockchain, which enables its traceability and auditability. The process of forward fusion and reverse tracing for early warning information is illustrated in Fig. 7 . The black arrow indicates the forward fusion of distributed early warning information described in Section 3.2. Whenever the final fusion results exceed the preset thresholds, the EWS sends out an early warning signal. Then, according to the red arrow, the monitoring results leading to the early warning and their corresponding hospitals, participants, surveillance data, and models can be traced back, and thus the associated suspected cases can be located. Finally, epidemiologists can conduct strict epidemiological investigations or clinical diagnosis on these cases to formally determine the confirmed cases and issue official early warning signals. This traceability and auditability can not only help to quickly locate suspected cases and enrich decision-making information, but also help detect and exclude unreliable cooperators in advance. Considering the privacy, unreliability, and fragmentation of multi-source surveillance resources, it is difficult for traditional EWS to share significant information, solidify decision-making basis, and incorporate untrusted participants. Therefore, in the sharing market at the Social End, the proposed EWS certifies, verifies, and traces all participants, data, models, and solutions in the long-term collaboration, so as to enhance the reliability of shared resources and the credibility of distributed decision-making. Also, smart contracts with preset rules serve as decentralized softwaredefined agents to monitor, verify, screen out, and fuse multi-party decisions in a real-time fashion and automatically alert, thereby avoiding the decision bias. For private data such as medical records, the proposed EWS adopts a privacy computing architecture, i.e., blockchain-based FL, to improve the performance with privacy protection. And for significant information sharing, it adopts cryptography technology and authority management to encrypt transmission and limit permissions, and thus can achieve private cooperation. Although we take an early warning scenario for COVID-19 based on open-source chest X-ray data sets as an example to implement our proposed EWS, the system is flexible and universal. By replacing the surveillance data and 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 models, it can monitor various infectious diseases from multiple aspects. For instance, for the known diseases, their symptom surveillance models' training sets can adopt CT images, electronic medical records, and infectious disease notifications according to their characteristics. While for unknown diseases, semi-supervised or unsupervised models such as clustering (McLachlan, 1992) , Principal Component Analysis (PCA) (Wold, Esbensen and Geladi, 1987) and Generative Adversarial Networks (GAN) (Radford, Metz and Chintala, 2016; Wang, Gou, Duan, Lin, Zheng and Wang, 2017) can be adopted for anomaly detection. Additionally, by modifying the fusion algorithms, early warning rules, and incentive mechanisms in the smart contracts, the system can support more collaboration modes, and the designs of smart contracts are applicable to different types of blockchain. In the future, our work can be extended from the following three aspects: First, expanding the system to monitor more infectious diseases, support more collaboration modes, and attract more distributed contributors. In this paper, we have demonstrated that smart contracts can encapsulate and execute rules and mechanisms. Therefore, authoritative organizations such as the CDC can similarly define the formal early warning process with different collaborative modes and incentive mechanisms by developing and issuing a variety of formally verified standardized smart contracts, so as to give full play to the crowd intelligence of the society. In addition, the traceable credit and quality records in LM can help participants with limited capability choose honest collaborators and trade high-quality resources, thereby breaking the barriers of surveillance and early warning. And based on these credit and quality records, the fusion weights can also be calculated quantitatively and updated in real-time. Second, improving security and privacy based on homomorphic encryption (Acar, Aksu, Uluagac and Conti, 2018) , trusted computing, and future smart contracts with better performance. Due to the limited capabilities of the current smart contracts, we introduce additional verifiers for off-chain validation at Social End. Whenever verifiers can obtain complete data and models, there is a possibility of leaking and stealing private information. Although effective incentive mechanisms can greatly reduce such motivation, the on-chain model validation and fusion in smart contracts based on homomorphic encryption and trusted computing is still an attractive solution. Homomorphic encryption can maintain parameter privacy when fusing weights, but it requires a series of conversions before being used in complex models such as neural networks. Mendis et al. has made a preliminary attempt. The results show that this method needs complex computation and depends on specific models and homomorphic encryption algorithms, which inevitably lead to the loss of universality (Mendis, Wu, Wei, Sabounchi and Roche, 2018) . Similar to the idea of Ethereum Layer 2 initiative (Stark) , specialized machine clusters can be built based on the Trusted Execution Environment (TEE) (Sabt, Achemlal and Bouabdallah, 2015) to encapsulate standard algorithms for validation and fusion, complete all the calculations off-chain, and only upload the results back to smart contracts, thereby reducing the on-chain computing payload. Third, enhancing the public's prevention of unknown diseases based on recommendation algorithms (Bobadilla, Ortega, Hernando and Gutiérrez, 2013) and search engine systems (Grossman and Frieder, 2012) . With the development of unsupervised learning algorithms, the proposed EWS is expected to detect abnormal phenomena in the early stage of unknown diseases, such as the sharp increase of abnormal chest X-ray images at Medical End before the outbreak of COVID-19, which is an important indicator of both COVID-19 and SARS. Although the system can not make a clinical diagnosis, it can be further combined with recommendation and search engine algorithms to determine the disease category according to the characteristics of indicator data, and finally recommend the corresponding universal health suggestions. For example, for the unknown respiratory diseases characterized by a pulmonary infection such as COVID-19 and SARS, the system can automatically issue early warning signals to the public as well as some practical prevention advice for respiratory diseases, such as wearing masks, washing hands and keeping social distance, and thus realize early prevention of unknown diseases. Aiming at reducing the risk of decision-making errors and improving the performance of early warning, this article proposes a novel framework of collaborative early warning for COVID-19 based on blockchain and smart contracts. This framework features blockchain-based secured and privated collaboration environments, scalable warning and incentive mechanisms executed in smart contracts, as well as a variety of encapasulated AI models for early warning. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 In order to fully combine distributed surveillance forces and integrate multi-source surveillance resources, our proposed system supports two different surveillance modes and fuses their monitoring results on emerging cases to alert, which includes medical federation surveillance based on FL and social collaboration surveillance based on LM. We preliminarily implement and analyze our proposed system based on Ethereum and IPFS. The results show that it has the advantages of decentralized decision-making, fairness, auditability and universality, and also has the potential to further help the early warning and prevention of unknown infectious diseases. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 A survey on homomorphic encryption schemes: Theory and implementation Medrec: Using blockchain for medical data access and permission management Ipfs-content addressed, versioned Recommender systems survey. Knowledge-based systems Cloud-assisted secure ehealth systems for tamper-proofing ehr via blockchain Web-based infectious disease surveillance systems and public health perspectives: a systematic review Covid-19 image data collection The ethereum block chain explorer Healthmap: global infectious disease monitoring through automated classification and visualization of internet media reports A decision-theoretic generalization of on-line learning and an application to boosting Detecting influenza epidemics using search engine query data Information retrieval: Algorithms and heuristics Long short-term memory Image-based three-dimensional human pose recovery by multiview locality-sensitive sparse retrieval Multimodal face-pose estimation with multitask manifold deep learning Get well: an automated surveillance system for gaining new epidemiological knowledge The home page of influenzanet Blockchained on-device federated learning Federated learning: Strategies for improving communication efficiency Blockchain distributed ledger technologies for biomedical and health care applications Gradient-based learning applied to document recognition Microbial threats to health: emergence, detection, and response Biobert: a pre-trained biomedical language representation model for biomedical text mining Blockchain-based system for secure outsourcing of bilinear pairings Internet surveillance systems for early alerting of health threats A 21st century approach to tackling dengue: Crowdsourced surveillance, predictive mapping and tailored communication A critic evaluation of methods for covid-19 automatic detection from x-ray images Cluster analysis and related techniques in medical research Blockchain as a service: A decentralized and secure computing paradigm A review on consensus algorithm of blockchain Chest x-ray images (pneumonia) Global infectious disease surveillance and health intelligence The global public health intelligence network and early warning outbreak detection Ten-year performance of influenzanet: Ili time series, risks, vaccine effects, and care-seeking behaviour What can we learn about the ebola outbreak from tweets? A blockchain-based framework for collaborative production in distributed and social manufacturing Learning markets: An ai collaboration framework based on blockchain and smart contracts Epidemic intelligence: a new framework for strengthening disease surveillance in europe The home page of promed-mail Unsupervised representation learning with deep convolutional generative adversarial networks Trusted execution environment: what it is, and what it is not Digital pharmacovigilance and disease surveillance: combining traditional and big-data systems for better public health Bidirectional recurrent neural networks Flu near you: crowdsourced symptom reporting spanning 2 influenza seasons making-sense-of-ethereums-layer-2-scaling-solutions-state-channels-plasma-and-truebit-22cb40dcc2f4 Accessed Unveiling covid-19 from chest x-ray with deep learning: A hurdles race with small data A new approach for classifying coronavirus covid-19 based on its manifestation on chest x-rays using texture features and neural networks Blockchainized internet of minds: A new opportunity for cyber-physical-social systems Generative adversarial networks: introduction and outlook Blockchain-enabled smart contracts: architecture, applications, and future trends Principal component analysis. Chemometrics and intelligent laboratory systems 2 Artificial intelligence for infectious disease big data analytics Ethereum: A secure decentralised generalised transaction ledger. Ethereum project yellow paper Who coronavirus disease (covid-19) dashboard Bbds: Blockchain-based data sharing for electronic medical records in cloud environments Early Warning for Infectious Disease Outbreak: theory and practice China infectious diseases automated-alert and response system (cidars), in: Early Warning for Infectious Disease Outbreak Recent trends in deep learning based natural language processing Exploiting click constraints and multi-view features for image re-ranking Click prediction for web image reranking using multimodal sparse coding Learning to rank using user clicks and visual features for image retrieval Promed-mail: an early warning system for emerging diseases Blockchain consensus algorithms: the state of the art and future trends Blockchain and cryptocurrencies: Model, techniques, and applications Blockchain technology use cases in healthcare Blockchain based efficient and robust fair payment for outsourcing services in cloud computing She is currently pursuing the Ph.D. degree in social computing with the State Key Laboratory for Management and Control of Complex Systems, Institute of Automation He is also with the Engineering Research Center of Finance Computation and Digital Engineering, Ministry of Education. He has authored over 120 papers published in academic journals and conferences. His current research interests include blockchain, cryptocurrency, and smart contracts. Dr. Yuan is currently an Associate Editor of the IEEE TRANSACTIONS ON COMPUTATIONAL SOCIAL SYS-TEMS and Acta Automatica Sinica. He is the Chair of the IEEE Council on RFID Technical Committee on Blockchain, the Co-Chair of the IEEE SMC Technical Committee on Blockchain, and the Director of the Chinese Association of Automation Technical Committee of Blockchain. He is the Secretary General of the IEEE SMC Technical Committee on Social Computing and Social Intelligence, the Vice Chair of the IFAC Technical Committee on Economic She is currently an engineer with the State Key Laboratory for Management and Control of Complex Systems, Institute of Automation he became the State Specially Appointed Expert and the Director of the State Key Laboratory for Management and Control of Complex Systems. His current research focuses on methods and applications for parallel intelligence, social computing, and knowledge automation This work was supported in part by the National Key R&D Program of China (2018AAA0101401), the Science and Technology Development Fund, Macau SAR (File no. 0050/2020/A1), and the National Natural Science Foundation of China (61533019, 71702182).