  In this work, we consider the consensus problem in which legitimate agents
share their values over an undirected communication network in the presence of
malicious or faulty agents. Different from the previous works, we characterize
the conditions that generalize to several scenarios such as intermittent faulty
or malicious transmissions, based on trust observations. As the standard trust
aggregation approach based on a constant threshold fails to distinguish
intermittent malicious/faulty activity, we propose a new detection algorithm
utilizing time-varying thresholds and the random trust values available to
legitimate agents. Under these conditions, legitimate agents almost surely
determine their trusted neighborhood correctly with geometrically decaying
misclassification probabilities. We further prove that the consensus process
converges almost surely even in the presence of malicious agents. We also
derive the probabilistic bounds on the deviation from the nominal consensus
value that would have been achieved with no malicious agents in the system.
Numerical results verify the convergence among agents and exemplify the
deviation under different scenarios.
