SUMMARYIn this paper, cross-optimization of accuracy, latency, and energy in wireless sensor networks (WSNs) through infection spreading is investigated. Our solution is based on a dual-layer architecture for efficient data harvesting in a WSN, in which, the lower layer sensors are equipped with a novel adaptive data propagation method inspired by infection spreading and the upper layer consists of randomly roaming data harvesting agents. The proposed infection spreading mechanisms, namely random infection (RI) and linear infection (LI), are implemented at the lower layer. The entire sensor field is dynamically separated into several busy areas (BA) and quiet areas (QA). According to the BA or QA classification, the level of importance is defined, on which, the optimal number of infections for a particular observation is evaluated. Therefore, the accessed probability for observations with a relatively higher importance level is adaptively increased. The proposed mechanisms add further value to the data harvesting operation by compensating for its potential lack of coverage due to random mobility and tolerable delay, thus a relatively higher accuracy and latency requirements can be guaranteed for the optimization of energy consumption in a dynamically changing environment. Further, with the cost of processing simple location information, LI is proved to outperform RI.