TL;DR
Coded-InvNet is a novel framework that protects distributed prediction serving systems against node failures and "stragglers" with as little as 10% compute overhead. By combining Invertible Neural Networks (INNs) with GAN-based encoding, it recovers missing predictions with significantly higher accuracy than previous state-of-the-art methods, especially in large-scale deployments.
The Problem: Stragglers in Prediction Serving
Modern AI services—such as search, translation, and recommendation engines—rely heavily on Prediction Serving Systems (PSSs). These are clusters of distributed workers that process massive batches of user queries in parallel. In these synchronized systems, performance is often dictated by the slowest link: if a single node slows down (a "straggler") or fails entirely, the entire batch is delayed.
To mitigate this, engineers traditionally use replication, which involves running the same query on multiple nodes. While effective, replication is highly inefficient, effectively doubling the hardware requirements.
A more elegant alternative is coded computation, which introduces a "parity" task to recover missing data—similar to how RAID arrays protect hard drives. However, applying coded computation to deep learning is notoriously difficult because neural networks are highly non-linear. Previous attempts, such as Parity Models (ParM), function adequately for small groups of 2–4 workers but suffer catastrophic accuracy drops when scaled to larger systems with lower overhead.
Methods: The Coded-InvNet Architecture
To overcome the non-linearity bottleneck, the authors introduce Coded-InvNet, a framework built on three clever architectural choices:
- Invertible Splitting: The inference model is split into two parts: a heavy Invertible Neural Network (INN) module, $f(\cdot)$, followed by a lightweight non-invertible head, $g(\cdot)$. Because $f$ is invertible, there is a mathematically clean way to map between the input image space and the latent feature space.
- GAN-based Approximate Encoding: To create a "parity" query, the system needs an input image that represents the average of the features of all other inputs. Calculating this exactly is too slow for real-time serving. Instead, Coded-InvNet uses a Pix2Pix (GAN) architecture to learn a lightweight encoding function that approximates this "feature-average" image almost instantly.
- Manifold Mixup: Because the encoder is an approximation, the recovered features will inherently contain a small amount of error. To prevent this error from degrading the final prediction, the model is trained using Manifold Mixup. This regularizer makes the classifier robust to small "noises" in the feature space, ensuring the system stays accurate even when running on recovered data.
Key Insights
- Linearity in the Latent Space: By utilizing an invertible backbone, the authors effectively "linearize" the problem. They can perform linear operations (like averaging) in the feature space and use the encoder to map those operations back to the image space.
- Decoupling Encoding from Inference: Unlike previous methods where the parity worker requires a specialized, separate model, Coded-InvNet allows every worker to run the exact same model. The "coding" logic is handled entirely by a lightweight front-end encoder and a back-end decoder.
- Scalability: The most striking insight is how well this approach scales. In a system with 10 workers and 1 backup (10% overhead), the "coded" input must represent the features of 10 different images. While previous methods fail to pack that much information into one query, Coded-InvNet’s use of the natural image manifold keeps the parity query recognizable to the network.
- Multi-task Versatility: Because Coded-InvNet recovers the embedding (the feature vector) rather than just the final label, a single parity result can be used to recover missing data for multiple different downstream tasks simultaneously.
Key Results
The authors evaluated Coded-InvNet on standard image classification benchmarks, including MNIST, Fashion-MNIST, CIFAR10, and Imagenette.
- Superior Accuracy at Scale: On MNIST, with 10 main workers and 1 backup (a highly efficient 10% overhead), Coded-InvNet achieved 85.9% accuracy during a node failure. In stark contrast, the previous state-of-the-art (ParM) managed only 53.4%, and a simpler "Learning-a-code" (LaCs) approach dropped to 40.1%.
- Low Latency: Testing on AWS EC2 clusters demonstrated that the encoding process adds negligible overhead—taking up less than 10% of the total inference time.
- Robustness to Multiple Failures: The framework can be seamlessly extended to handle multiple simultaneous failures by utilizing more complex encoding matrices, maintaining high accuracy even when two or more nodes fail at once.
Limitations and Future Work
While highly effective, Coded-InvNet has a few limitations. The core method strictly requires the model to be built with an invertible backbone (like i-ResNet). While these models are nearly as accurate as standard ResNets, they are not yet the industry standard for every domain. Additionally, training the GAN-based encoder is a computationally intensive, separate step, though it is a one-time cost prior to deployment.
The authors briefly explore applying these principles to non-invertible models using iterative optimization, but this is currently too slow for real-time serving. Developing faster ways to apply coded computation to standard, non-invertible architectures remains an exciting open challenge for the field.
Summary updated