Gerard Dray

Pierre-Antoine Jean

Yann Maheu

Jacky Montmain

Nicolas Sutton-Charani

The AffectMove Challenge : some machine learning approaches

technology that would be able to assess pain behaviour could support the delivery of personalised therapies in the long-term and the self-directed management of the condition with the aim of improving engagement in valued everyday activities [START_REF] Olugbade | How Can Affect Be Detected and Represented in Technological Support for Physical Rehabilitation?[END_REF]. The participants in this task had to construct a model for classifying continuous protective behaviors, present or absent throughout exercise of a person with chronic pain, based on the position of the joints of the whole body and back muscle activity. Ground truth for the type of exercise is also available, but it is not used as an input."

A. Data description

The anonymised 3D full-body joint positions and concomitant back muscle activity data for 19 people with chronic low back pain from the EmoPain dataset were provided [START_REF] Aung | The automatic detection of chronic pain-related expression: requirements, challenges and the multimodal EmoPain dataset[END_REF]. The data were given with corresponding protective behaviour labels obtained from clinician observers. The data were given in training, validation, and test partitions which contain instances from 10, 4, and 5 people with chronic pain respectively. The test partition did not include the protective behaviour labels. AffectMove task 1 dataset is composed of 9 exercises (stand on one leg, sit still, reach forward, sit-to-stand, stand-to-sit, stand still, bend, walk and a other movement events) with the body movement and muscle activity measures. Each repetition of an exercise by a person is a 180-frame segment (3 seconds) and the label (label 0 where there is no protective behavior, 1 otherwise) for each segment is based on continuous labelling provided by expert raters. Movement data is the 3D full-body joint positions where the skeleton is represented by 17 joints and muscle activity data (electromyography) were collected for 4 muscle groups (cf. Fig. 1).

B. Exploring the classifiers space

The first submission relies on a combination of motion capture (MoCap) pre-processing data and a classification ap-Abstract-This paper describes some machine learning methods that we have implemented to participate in the AffectMove challenge which aims to develop technologies for classification of body movements in the areas of physical rehabilitation of chronic pain, mathematical problem solving and interactive dance contexts. The methods and results obtained are presented as well as some futureworks.

Index Terms-Body movements signals processing, Features extraction, Supervised machine learning methods

I. INTRODUCTION

As the organizers of the AffectMove Challenge describe it [1] "The AffectMove challenge is based on 3 naturalistic datasets on body movement, which are fundamental components of everyday living both in the execution of the actions that make up physical functioning as well as in rich expression of affect, cognition, and intent [START_REF] De Gelder | Why bodies? Twelve reasons for including bodily expressions in affective neuroscience[END_REF] [START_REF] Pezzulo | The body talks: Sensorimotor communication and its brain and kinematic signatures[END_REF]. The datasets were built according to automatic detection requirements for chronic pain physical rehabilitation, maths problem solving, and interactive dance contexts respectively." In this paper, we only deal with the first t wo s ets o f d ata, w ith reference to the two challenge tasks: Task 1: "Protective Behaviour Detection based on Multimodal Body Movement Data" and Task 2: "Detection of Reflective T hinking b ased o n Body Movement Data". We chose to analyze the data as a twoclass supervised classification p roblem. F or e ach t ask o f the challenge we present the data, their preprocessing (including features extraction), then the considered machine learning methodsand the obtained results. We end with a conclusion and directions for future work.

II. TASK 1: PROTECTIVE BEHAVIOUR DETECTION BASED

ON MULTIMODAL BODY MOVEMENT DATA The aim of this task is to advance continuous detection of protective behaviours, i.e., bodily-expressed pain behaviours, in people with chronic musculoskeletal pain. As described in [1] "Chronic pain is a major healthcare challenge and proach. Three main steps constitute the whole pipeline (cf. Fig. 2):

• Posture Features Extraction. The coordinates of the skeleton joints are used to compute the feature vectors which represent human postures. • Benchmarking classification approaches. Several classification methods have been evaluated and Random Forest was selected as the most efficient one. • Fine-tuning of the selected model. A hyper-parameters optimization step (number of trees, maximum depth of tree, etc.) has been performed thanks to a grid search. The first step is the data processing where only MoCap data is used. The process exploits spatial features computed from 3D skeleton coordinates, without including the time information in the computation, in order to make the system independent of the speed of movement. For each skeleton frame, a posture feature vector is computed. Each joint is represented by J i , a three-dimensional vector. The person can be found at any place within the coverage area of the MoCap capture, and the coordinates of the same joint may assume different values. It is necessary to compensate this effect, by using a proper features computation process. A straightforward solution, proposed by [START_REF] Cippitelli | A human activity recognition system using skeleton data from RGBD sensors[END_REF], is to compensate the position of the skeleton by centering the coordinate space in one skeleton joint. Considering the skeleton composed by 17 joints, J 0 being the hips center and J 3 the shoulders center (cf. Fig. 1), the ith joint feature d i is the distance vector between J i and J 0 , normalized by the distance between J 3 and J 0 .

d i = J i -J 0 ||J 3 -J 0 || , i = 1, 2, ..., 16 (1)
For a repetition, represented by 180 frames, the length of the feature vector to characterize it is, 16 × 180 = 2880.

The second step consists of a classifier selection as exposed in [START_REF] Perez | Bug or not bug? That is the question[END_REF]. As multiple classifier types are available, selecting the right classifier according to its performance is a crucial task. Six kinds of classifiers from the Scikit-learn API [START_REF] Buitinck | API design for machinelearning software: experiences from the Scikit-learn project[END_REF] have been explored:

• SVM (Support Vector Machines) with various kernels (linear, poly and rbf)

• Random Forest • Ridge Regression • k-Nearest Neighbors • Multi-Layer Perceptron • Passive Aggressive classifier
Classifiers have been trained with their default parameters (according to Scikit-learn). Random Forest [START_REF] Breiman | Random forests[END_REF] performs best and will be used in the next process.

The last step is a classifier optimization following a grid search on training data with a 3-fold cross validation based on accuracy performances. For a Random Forest Classifier, there are several different hyperparameters that can be adjusted. Four main parameters have been investigate: the number of trees in the forest, the maximum depth of each tree, the minimum number of samples required to split leaf node and the minimum number of samples required to be at a leaf node. The resulting best hyperparameters are as follows: RandomForestClassifier(n estimators=2000, max depth=85, min samples leaf=1, min samples split=2).

C. Metrics, scores and conclusion for the task 1

Four metrics were used by organizers of the challenge, F1score for both classes, Matthews correlation coefficient (MCC) and Accuracy. Table I shows scores for the first submission of this article. As described in [1] "The purpose of this task is to continuously detect reflective thinking in children during maths problem-solving activities. Understanding mathematical ideas such as angles and shapes is a key part of basic education and digital learning technology that promotes the use of body movement as well as further recognizes critical learning moments (e.g., reflective thinking) could support learning of abstract mathematical ideas which may otherwise be challenging to relate to. The participants in this task had to build a model for classification of reflective thinking continuously as 'observed' or 'not observed' while a child solves maths problems, based on joint positions."

A. Data description

The 3D full-body joint positions for 24 children from the weDraw-1 Movement dataset [START_REF] Olugbade | Automatic Detection of Reflective Thinking in Mathematical Problem Solving based on Unconstrained Bodily Exploration[END_REF] were provided. The data is accompanied with corresponding reflective thinking labels based on expert observer annotation. Labels for the corresponding math problem-solving activities have also been included. The data was given in training, validation, and test partitions which contain instances from 13, 5, and 6 children respectively. The test partition did not include the reflective thinking labels or the activity type.

B. Method and results

As we will be using a cross-validation method, we have chosen to group together the training and validation sets. Files of less than 4.5 seconds have been eliminated, the classification rule for these recordings will be to classify them as "0" for "reflective thinking not observed". Each trial is then resampled at 25Hz and 4 seconds (from the 5th to 104th sample) are retained. At the end of this processing, our training set consists of 2849 trials: 2458 of class "0" for "reflective thinking not observed" and 391 of class "1" for "reflective thinking observed" ; Each trial consisting of 51 lines (3D position for 17 joints) of 100 samples. As we can see, our training set is strongly unbalanced. To overcome this problem, we applied the ADASYN (Adaptive Synthetic Sampling) method which is fully described in [START_REF] He | ADASYN: Adaptive synthetic sampling approach for imbalanced learning[END_REF]. The aim of the ADASYN algorithm is to improve the class balance by synthetically creating new examples from the minority class via a linear interpolation between the existing minority class examples. ADASYN is an extension of the SMOTE (Synthetic Minority Oversampling TEchnique) method [START_REF] Chawla | SMOTE: Synthetic Minority Over-sampling Technique[END_REF], creating more examples near the border between the two classes than inside the minority class. After this step, the learning set consists of 4897 trials of 5100 features : 2458 of class "0" and 2439 of class "1". In order to reduce the number of features we applied Common Spatial Pattern (CSP) method [START_REF] Keng | Filter Bank Common Spatial Pattern Algorithm on BCI Competition IV Datasets 2a and 2b[END_REF] which consists of a binary datadriven supervised data projection of a signal by maximizing the variance of the positive class while minimizing the variance of the negative one. These filters can be used in the construction of feature vectors, or other analyzes, where it is useful to remove as much noise as possible from a signal. This method is conventionally used to process electroencephalogram (EEG) signals, but we thought it would be useful in our study, the movements of the subjects being spatially reduced and very close. For the classification we have tried several classifiers (Linear Discriminant Analysis LDA, Logistic Regression LR, Naives Bayes NB, Cubic Support-Vector Machines SVM, Ensemble Sub-space k-Nearest Neighbours ESkNN [START_REF] Gul | Ensemble of a subset of kNN classifiers[END_REF]) and several numbers of CSPs. We used a 5 folds cross-validation technique to assess the accuracy of the classification (cf. Table II). The three bold results in table II were selected and submitted to the challenge (cf. Table III).

IV. CONCLUSION

This article presents our contributions to the first two tasks of the AffectMove challenge : Task 1: "Protective Behaviour Detection based on Multimodal Body Movement Data" and Task 2: "Detection of Reflective Thinking based on Body Movement Data". For each of these tasks, we present the complete process that we implemented to deal with these classification problems and the obtained results on the train and test sets.

Due to lack of time we could not implement a diagnosticoriented method for task 1, but we describe it in the next section. We hope to be able to implement and present it during the AffectMove workshop.

V. FUTUREWORKS

Protective behavior detection based on multimodal body movement data defines a diagnosis problem and should be formalized as such. Protective behaviors correspond to counteractions for eliminating or minimizing the effects of physical or muscular disturbances. The earlier the detection, the better the anticipation of corrective actions. Fault detection and diagnosis have been largely studied in the literature related to industrial systems' reliability but can naturally be transposed to other application domains. Fault analysis of systems (technological, medical, human systems etc.) consists of detecting failures as early as possible in order to be able to anticipate and minimize their future effects. [START_REF] Poole | Normality and faults in logic-based diagnosis[END_REF] distinguishes two kinds of reasoning for solving diagnostic tasks: abnormal-operation-oriented or abductive reasoning and normal-operation-oriented reasoning. Abnormal-operation-oriented diagnosis uses knowledge about how the system's components are affected by some specific faults in order to trace those faults: all possible failures that could occur are hypothesized, their effects are predicted and the counteractions for eliminating or minimizing these effects are designed. Normal-operation-oriented diagnosis uses knowledge about how normal components work to detect deviations from normality in observed behavior, from which a minimal set of faults is hypothesized. [START_REF] Reiter | A theory of diagnosis from first principles[END_REF] proposed a logical theory of model-based diagnosis, also referred to as consistency-based diagnosis. The analysis is aimed at obtaining consistency between the observations and the model by removing assumptions about the behavior of some component [START_REF] Isermann | Supervision, fault-detection and fault-diagnosis methods -An introduction[END_REF]. This theory was extended and formalized in [START_REF] Kleer | Characterizing diagnoses and systems[END_REF] and many refinements have since been proposed ( [START_REF] Frank | Analytical and qualitative model-based fault diagnosis, a survey and some new results[END_REF]; [START_REF] Cordier | Conflicts versus Analytical Redundancy Relations: A comparative analysis of the model based diagnosis approach from the Artificial Intelligence and Automatic Control perspectives[END_REF]; [START_REF] Gentil | Combining FDI and AI Approaches within Causal-Model-based Diagnosis[END_REF]). In a short way, modeling relationships between variables provides a set of analytical redundancy relationships (ARR) that enables assessing consistency between observations online. Each ARR can be seen as a virtual sensor that does not measure any physical quantity but is dedicated to anomaly detection when checking expected consistency between variables. Model-based diagnosis is part of our further research works w.r.t the AffectMove challenge. The idea is to complete the position and EEG features with ARRs to diagnose abnormal behaviors more efficiently. We will proceed in several stages. First, the position features space will be completed with kinematics and dynamics features. We will use the CusToM software [START_REF] Muller | CusToM : a Matlab toolbox for musculoskeletal simulation[END_REF] to automatically implement kinematics and inverse dynamics methods: from the Mocap X, Y, Z positions of 17 points of the human body, the angles at the joints, the joint torques, the muscular efforts and the muscular activations will be computed. The first task will consist of formatting our .txt data into .c3d with the BTK toolkit [START_REF] Barré | Biomechanical ToolKit: Open-source framework to visualize and process biomechanical data[END_REF]. Once the file obtained, we will have to differentiate the subjects, indeed musculoskeletal modeling is particularly sensitive to height and weight of the subject, then we will adjust the model by choosing thresholds and methods specific to the data provided for the challenge. The results of the machine learning part will be then applied upon this augmented features space. The interest of our approach is also to have a visual understanding of movements: we can observe some peculiarities of movements by representing raw data in 3D, that is a very useful aspect in terms of man/machine interaction and AI explainability. In the second step of our approach, we are also working on a more biomechanics-based approach. Since joint torques, muscular efforts and muscular activations are available through CusToM, we propose to establish the biomedical constraints that provide relationships between forces and torques. To each of these biomechanical relationships, an ARR that enables online checking of the consistency between the observations may be attached. We expect that the additional knowledge the biomechanical variables (forces and torques) and the related ARRs provide will improve the classifiers results that have been proposed for the AffectMove challenge.

Fig. 1 .

 1 Fig. 1. Skeleton represented by 17 joints (M --) and 4 EMG sensors (E --).

Fig. 2 .

 2 Fig. 2. Pipeline overview. Flatten operation allows to obtain the feature vector for one repetition.

TABLE I TASK

 I

		1 : SUBMISSION SCORES
	F1-score (class 0)	F1-score (class 1)	Accuracy	MCC
	0.89	0.30	0.81	0.23
	III. TASK 2: DETECTION OF REFLECTIVE THINKING
	BASED ON BODY MOVEMENT DATA

TABLE II TASK 2 :

 II2 ACCURACY ON TRAINING SET

	#CSP	LDA	LR	NB	SVM	ESkNN
	2	0.635	0.635	0.621	0.493	0.555
	4	0.670	0.674	0.667	0.494	0.672
	6	0.712	0.712	0.696	0.722	0.789
	8	0.734	0.737	0.726	0.782	0.858
	10	0.763	0.766	0.751	0.899	0.894
	12	0.768	0.771	0.759	0.849	0.918
	14	0.778	0.778	0.776	0.875	0.923
	16	0.780	0.780	0.775	0.878	0.930
	18	0.784	0.782	0.788	0.888	0.935
	20	0.791	0.790	0.800	0.905	0.945
	22	0.798	0.797	0.799	0.909	0.945
	24	0.798	0.800	0.804	0.914	0.948
	26	0.812	0.810	0.803	0.916	0.951
	28	0.817	0.814	0.815	0.924	0.953
	30	0.816	0.812	0.813	0.923	0.954
	32	0.814	0.814	0.816	0.934	0.955
	34	0.818	0.816	0.815	0.933	0.958
	36	0.816	0.815	0.820	0.935	0.958
	38	0.817	0.817	0.817	0.938	0.961
	40	0.818	0.819	0.817	0.937	0.958
	42	0.817	0.819	0.821	0.936	0.960


Hamed Nazim Mamache

Gabin Mazué

Osama Rashid

Gewu Bu

Maria Potop-Butucaru

Evaluation des performances du consensus IOTA sous des hypothèses d'implémentation réalistes †

Keywords: Consensus, Byzantine fault, IOTA

Les registres distribués sont des technologies attractives ayant des applications variées allant du monde financier au monde des télécommunications. Dans le paysage des blockchains IOTA est le seul registre partagé dédié à l'internet des objets. Afin d'assurer des propriétés fortes de cohérence la version initiale d'IOTA proposait l'utilisation d'un contrôleur permettant d'assurer un ordre total sur les transactions insérées dans le système. Plus récemment, IOTA a proposé de remplacer le contrôleur par un algorithme de consensus. Pour cela, deux algorithmes de consensus ont été proposés par la fondation IOTA, décrits dans le framework Coordicide : Fast Probabilistic Consensus et Cellular Consensus. Au moment de leur publication, ces algorithmes étaient publicités comme étant la nouvelle brique de consensus de IOTA. Nous avons évalué les performances de ces algorithmes en utilisant des hypothèses d'implémentation réalistes. De plus, nous avons évalué la convergence des ces algorithmes en variant les topologies du réseau sous-jacent. Nos simulations montrent des taux de convergence faible, même sous des adversaires de faible puissance. De plus, nous avons observé de mauvaises performances de passage à l'échelle sauf lors des tests avec des topologies Watts Strogatz. Nos résultats indiquent que la conception de registres distribués dédiés aux IoT reste un problème ouvert et proposent des directions de recherche potentielle. Depuis l'apparition de nos résultats, la fondation IOTA a annoncé la publication imminente d'une nouvelle version de sa brique de consensus.

Introduction

Distributed Ledger Technologies (DLT) such as blockchains provide a secure way to share information between a high number of independent nodes operating under different authorities, while ensuring high availability and immutability. The use of Distributed Ledger Technologies (DLT) can respond to both security and decentralization needs in the management of IoT devices.

However, Bitcoin [START_REF] Nakamoto | A peer-to-peer electronic cash system[END_REF] and similar proposals (e.g Ethereum [W + 14] ) came with several drawbacks, like mandatory transaction fees and high computational requirements, that prevent them from being used as standards for IoT industry. Therefore, alternative solutions have been opened by IOTA [START_REF] Popov | The tangle[END_REF]. IOTA's data structure is a Directed Acyclic Graph (DAG) based distributed ledger, also known as the Tangle, aimed to overcome limitations of Bitcoin-like distributed ledgers when used in IoT environment while preserving equivalent security levels. Similar approaches have been proposed by Spectre or Phantom [START_REF] Sompolinsky | SPECTRE: A fast and scalable cryptocurrency protocol[END_REF][START_REF] Sompolinsky | PHANTOM: A scalable blockdag protocol[END_REF]. Yet, IOTA and similar approaches still have flaws: 1) lack of strong consistency guarantees and 2) unclear resistance to attacks. In order to respond to these criticism IOTA proposed recently in [PMC + 20] attacks resilient consensus mechanisms that plugged into the IOTA Tangle will offer strong consistency guarantees. Two consensus algorithms are proposed: Fast Probabilistic Consensus (FPC) and Cellular Consensus (CC). These two proposals have been partially evaluated in [START_REF] Popov | Fpc-bi: Fast probabilistic consensus within byzantine infrastructures[END_REF][START_REF] Capossele | Robustness and efficiency of leaderless probabilistic consensus protocols within byzantine infrastructures[END_REF]. † La version complète du papier est acceptée par IEEE ICC 2022 (HAL: https://hal.archives-ouvertes.fr/hal-03427543)

In this work we investigate the performances of IOTA consensus in several aspects. First, we run Fast Probabilistic Consensus (FPC) and Cellular Consensus (CC) on top of various topologies, from theoretical to practical. (2D Grid, Torus and Watts-Strogatz model [WS98]) then we evaluate their resilience to adversarial behavior. Our evaluation is conducted with OMNET++ simulator enriched with three adversarial models introduced in [PMC + 20]. Even though most of the results reported in our study are negative they contain hints in order to design an efficient IoT dedicated blockchain.

Consensus, Topology & Byzantines Adversaries

The basic idea of Consensus algorithm is that all honest nodes in the system should agree dynamically with a common opinion in a distributed way, which cannot be changed easily. We follow the setting proposed in [START_REF] Popov | Fpc-bi: Fast probabilistic consensus within byzantine infrastructures[END_REF][START_REF] Capossele | Robustness and efficiency of leaderless probabilistic consensus protocols within byzantine infrastructures[END_REF], assuming that the time is discrete and divided into rounds. Let be the set of nodes in the system. Each node ∈ has an opinion, ( ) ∈ {0, 1} at the round . At the round 0 of a simulation run, all nodes will be given randomly an initial opinion according to the probability 0. When 0 = 0.5 every node has the same chance to get 0 or 1 as its initial opinion.

Consensus is achieved, if ∀ , ∈ , ( ) = ( ),
where is the final round of a simulation run. An opinion held by most of the nodes among a group de nodes is a major opinion. The convergence rate for a consensus algorithm represents by the percentage of simulation runs leading to an achieved consensus.

Two consensus algorithms from IOTA have been investigated: Fast Probabilistic Consensus (FPC) bases on the query/reply of opinion among nodes in the network. In a non-initial round , node requires randomly a number of other nodes in the network. Node calculates the mean of received opinions, ( ). Then changes its opinion to 1, if ( ) is higher than a threshold ∈ [0, 1] chosen randomly each round by ; it changes to 0 if ( ) is smaller than . In the case where ( ) = , node keeps its original opinion from the last round. An initial threshold is fixed for all nodes instead of chosen randomly. We make adjustments from original FPC [START_REF] Popov | Fpc-bi: Fast probabilistic consensus within byzantine infrastructures[END_REF] to adapt realistic environment : 1) Remove the assumption that nodes share a common random values sequence. 2) Nodes know only their neighbors, rather than all nodes in the system. Instead, they use random walk to query random nodes far away from them. Cellular Consensus (CC) allows nodes only to query opinions from their neighbors and change their opinions to adapt to the major opinion among their neighbors. In addition, CC allows node to verify if neighbors give their opinion honestly, once a liar is detected, it will be banned by its neighbors.

We apply these two consensus on top of three network topologies for our experimentation: 2D Grid (where central nodes have 4 neighbors, then edge nodes have 2 to 3 neighbors only) and Torus (where all nodes have 4 neighbors), two theoretical topologies often used as reference topologies in algorithm analyzing, and Watts-Strogatz [WS98], a more realistic network model, that simulates a network with relatively high connection density and relatively low average distance between any two nodes.

Three Byzantines Adversaries are introduced: Cautious adversaries are able to lie on every round of a simulation run with a probability . However, the opinion sent during the same round is always the same even though the queries come from different nodes. Semi-Cautious adversaries will not lie, however, they may not respond to a query, with a probability . Thus delaying the process of convergence and reducing the number of accessible nodes in the network. Berserk adversaries behave similar to Cautious, except that they are able to provide different responses to different queries received in the same round. Thus, during the same round, it can send his true opinion, then lie and respond with a wrong opinion.

Simulation Results and Conclusion

In this section, we conclude our results with three interesting observations of FPC and CC, and hints to design an efficient IoT dedicated blockchain. Full simulation results are shown in the full version of this article ‡ . We fixed the number of rounds for each simulation run at 30, which is large enough according to our results. and are both set as 50% for Byzantines adversaries. In addition for FPC, we fix the distance of random walk at 4, which means a node can query nodes with a distance of 4, to represent a limited view of each node. The number of queries of each round is 10, which means a node can ‡. HAL: https://hal.archives-ouvertes.fr/hal-03427543 Formatting a submission for AlgoTel ask maximum of 10 other nodes for opinion. Each results point is the average of 100 simulation runs. Our results show in a similar format where the vertical axis shows the convergence rate, while the horizontal axis represents the probability of the initial opinion distribution, 0. We summarize the following observations and hints by showing 4 groups of figures:

(1) Both consensus mechanisms are sensitive to the initial opinion distribution 0: FPC will immediately decrease the convergence rate once the initial distribution exceeds a threshold. Conversely, the convergence rate of CC gradually decreases when the initial distribution attempt to 50%. We can clearly see in Figure 1 (a) and (b) and Figure 2 (a) and (b), that there is a different downward trend of the convergence rate in the two consensus. However in Watts-Strogatz topology, the impact of 0 is negligible in for both FPC and CC. That could be explained as that in a relatively dense network like Watts-Strogatz, the exchange of information could be easier. Nodes are more likely to query different nodes in each round, which increases the opinion exchange, thus offsetting the effect of uneven initial opinion distribution. Note that the curves of FPC are not symmetrical at 0 = 0.5. This small offset is due to the choice of the node's initial threshold . That makes nodes more inclined to change their opinion to 0 in the first round.

(2) Both consensus mechanisms are sensitive to the total number of nodes and the average distance among the nodes in the network, which means, the leak of scalability. For example in Figure 1 with the increase of the network size from 49 to 1024, the convergence rate of FPC drops from50% and 100% to 0% around 0 = 0.5 in 2D Grid and Torus, respectively. CC has a lower convergence rate compared with FPC in the same condition, it seems less sensitive to the increase of nodes. Although in Watts-Strogatz topology, where a relatively low average distance among nodes is guaranteed, fluctuations caused by network size are minimal for both consensus.

(3) Semi-Cautious has no effect on FPC, while the remaining two, Cautious and Berserk adversaries, have a great impact on FPC. Convergence rate goes down lower than 25% even with less than 10% Cautious adversaries in Figure 3 (a) and (b), and same for Berserk adversaries. That situation is better in Watts-Strogatz topology: The convergence rate goes down below 25% with 20% adversaries. In CC, all adversary methods are effective, but not as serious as in FPC. We tested up to 33% adversaries present in the network shown in Figure 4. Furthermore, if the topology is compact and dense, like in Watts-Strogatz, CC is quite resistant to all three adversaries with small fluctuation shown in Figure 4 (c) for example.

We see that FPC and CC perform poorly in low connectivity topologies. In reality, we cannot ensure the density of network nodes, especially in the IoT situation with varying applications. A potentially feasible solution is to build a high-connectivity logical network topology under the FPC and CC layers, by designing appropriate network layer protocols. Our future work will focus on formal proofs of our conclusions and the design of suitable logical network layer protocols.

FIGURE 1 :

 1 FIGURE 1: FPC convergence rate according to the initial division probability 0 for different network sizes, without malicious nodes

FIGURE 2 :

 2 FIGURE 2: CC convergence rate according to the initial division probability 0 for different network sizes , without malicious nodes

FIGURE 3 :

 3 FIGURE 3: FPC convergence rate according to the initial division probability 0 for different percentage of Cautious adversaries

FIGURE 4 :

 4 FIGURE 4: CC convergence rate according to the initial division probability 0 for different network sizes , with 33% Cautious Adversaries