In-Network Inference