Patent attributes
An electronic device (such as a controller) is described. During operation, the electronic device receives, from a second electronic devices, information that specifies occurrences of different types of events in a network (which includes the second electronic devices). For example, the information may include counts of the occurrences of the different types of events in the network, which may be collected by the second electronic devices. Then, the electronic device aggregates the information about the different types of events in the network, and stores the aggregated information in memory. Moreover, the electronic device predicts an occurrence of an anomaly or an error in the network based at least in part on the aggregated information and a pretrained machine-learning model (such as a neural network). Next, the electronic device selectively performs a remedial action based at least in part on the prediction.