A Learning-Based Approach to Approximate Coded Computation

Navneet Agrawal, Yuqin Qiu, Matthias Frey, Igor Bjelakovic, Setareh Maghsudi, Slawomir Stanczak, Jingge Zhu · DOI

Introduction

In large-scale distributed computing, the performance of a system is often bottlenecked by "stragglers"—worker nodes that are significantly slower than others or fail entirely. Coded Computation (CC) has emerged as a robust mathematical framework to mitigate this issue. By injecting redundancy into input data, CC allows a master node to reconstruct the final result from only a subset of workers, effectively treating slow nodes as erasures in an error-correcting code.

Traditional methods, such as Lagrange Coded Computation (LCC), rely on polynomial interpolation. While theoretically sound, LCC faces two critical limitations: it is restricted to functions that can be expressed as matrix polynomials, and its "recovery threshold" (the minimum number of workers required) scales linearly with the number of inputs or the polynomial degree. This paper introduces AI-aided Coded Computation (AICC), a learning-based approach that extends the benefits of CC to complex, non-polynomial functions while maintaining a fixed, scalable recovery threshold.

The AICC Framework

AICC replaces the rigid algebraic structures of traditional coded computation with trainable Deep Neural Networks (DNNs). The core innovation lies in forcing these networks to adhere to a polynomial structure, enabling the use of classical decoding techniques for non-classical functions.

1. Encoding

The master node utilizes a set of DNNs to generate coefficients for an encoding polynomial. This polynomial transforms $K$ input matrices into $N$ encoded matrices, which are then distributed across the worker nodes.

2. Computation

Each worker node executes a computation defined by another set of DNNs. Unlike standard black-box models, these computations are designed such that the output remains a polynomial function of the encoding variable. This ensures that the global distributed task retains a predictable mathematical structure.

3. Decoding

Because the end-to-end pipeline (encoding plus worker computation) behaves like a polynomial, the master node can employ standard Lagrange interpolation. The results of the original $K$ tasks are recovered by evaluating the interpolated polynomial at specific points.

4. End-to-End Training

The system is trained using Stochastic Gradient Descent (SGD). The encoder and worker DNNs are optimized jointly to minimize the approximation error of the target function (e.g., a matrix determinant), ensuring that the final interpolated result is as accurate as possible.

Experimental Evaluation

The researchers evaluated AICC against four challenging matrix problems using synthetic datasets:

  1. Eigenvalues ($P_1$): Symmetric matrices with uniform distributions.
  2. Dominant Eigenvector ($P_2$): Symmetric matrices with normalized output vectors.
  3. Matrix Exponential ($P_3$): Matrices normalized by operator norms for numerical stability.
  4. Matrix Determinant ($P_4$): Diagonally-dominant matrices.

Ground truth values were generated using standard numerical libraries (NumPy and SciPy) to provide a benchmark for the DNN approximations.

Key Insights and Results

Scalability and Fixed Thresholds

One of the most significant advantages of AICC is the decoupling of the recovery threshold $R$ from the number of inputs $K$. In traditional LCC, $R$ must increase as $K$ grows. In AICC, $R$ is a design parameter. Experiments demonstrated that AICC could process 40 inputs ($K=40$) using the same number of successful workers ($R=5$) required for just 3 inputs, with only a marginal impact on accuracy.

The "Blessing" of Dimensionality

Counter-intuitively, the approximation error (NRMSE) was found to decrease as the matrix dimension $M$ increased. This suggests that higher-dimensional spaces provide a richer feature set for the DNNs to learn the underlying mathematical transformations. For instance, at $M=50$, AICC achieved an NRMSE of 1.50% for determinants and 4.64% for eigenvalues.

Computational Efficiency

As matrix dimensions scale, standard iterative algorithms for eigenvalues or exponentials become computationally expensive. AICC replaces these iterations with a learned "forward pass" consisting primarily of matrix-vector multiplications. At $M=400$, while standard library runtimes increased exponentially, AICC’s runtime remained nearly flat, offering a massive speedup for high-dimensional distributed tasks.

Limitations and Future Work

While AICC offers significant speed and scalability, it is an approximate method. It is highly suitable for machine learning or signal processing where some margin of error is acceptable, but it may not be appropriate for applications requiring exact numerical precision.

Furthermore, the authors identified an "error floor" where increasing the number of workers ($R$) no longer improves accuracy, indicating that the bottleneck lies in the representation power of the DNNs rather than the interpolation process. Future research may explore meta-learning to reduce the overhead of training dedicated models for every new function, potentially allowing for more generalizable AI-aided computation.

Conclusion

AICC represents a paradigm shift in distributed computing by merging the fault tolerance of Coded Computation with the flexibility of Deep Learning. By transforming non-polynomial problems into a polynomial-like framework, it provides a scalable, straggler-resilient solution for complex mathematical operations in large-scale systems.

Summary updated

BibTeX
@inproceedings{agrawal2022learning,
  author = {Navneet Agrawal and Yuqin Qiu and Matthias Frey and Igor Bjelakovic and Setareh Maghsudi and Slawomir Stanczak and Jingge Zhu},
  title = {{A Learning-Based Approach to Approximate Coded Computation}},
  booktitle = {ITW},
  year = {2022},
  doi = {10.1109/itw54588.2022.9965865},
}
Figure