Abstract
For coded distributed computing (CDC), polynomial code is one prevalent encoding method for CDC (called Poly-CDC). It suffers from poor numerical stability due to the Vandermonde matrix serving as the coefficient matrix which needs to be inverted, and whose condition number increases exponentially with the size of the matrix or equivalently with the number of parallel worker nodes. To improve the numerical stability, especially for large networks, we propose a Newton-like polynomial code (NLPC)-based CDC (NLPC-CDC), with a design dedicated for both matrix–vector and matrix–matrix multiplications. The associated proof of the constructed code possesses a -symmetrical combination property (CP), where symmetrical means the worker nodes have identical computation volume, CP means the k-symmetrical original computing tasks are encoded into -symmetrically coded computing tasks, and the arbitrary k resulting from the n-coded computing tasks can recover the intended computing results. Extensive numerical studies verify the significant numerical stability improvement of our proposed NLPC-CDC over Poly-CDC.
1. Introduction
Matrix multiplications (especially large matrix multiplications) are widely adopted in data mining, machine learning, etc. [1]. A single computing node may not be able to handle large or frequent matrix multiplications [2,3,4,5,6]. Due to the development of 5G/6G communication techniques [7] and network virtualizations [8] that provide efficient and reliable data delivery, especially in future 6G communication networks, the strict requirements of a high data rate and computational complexity require frequent processing of large matrices [9,10], and distributed computing (DC) based on partitioning computing tasks could effectively alleviate this problem. By introducing proper redundant computing [11,12], coded distributed computing (CDC) effectively tackles the straggler problem of DC [13,14]. Prevalent CDC designs aims at obtaining the -symmetrical combination property (CP): k original symmetrical computing tasks are encoded into -coded computing tasks, and the arbitrary k resulting from the n-coded computing tasks can recover the intended computing results [15], where symmetrical means the worker nodes have identical computation volume. Based on this symmetrical assumption, the worker nodes can be viewed as having identical but independent capabilities, and the design focus of CDC can be directed towards achieving CP.
Prevalent encoding methods for CDC are based on polynomial encoding methods [16,17,18], and is therefore called Poly-CDC, where the work in [16] set the fundamental/framework for Poly-CDC, while the work in [17,18] reported variants within this framework. More specifically, the the authors of [16] designed the fundamental encoding coefficients which laid the actual framework, and the authors in [17,18] modified the encoding coefficients within this framework. The drawback lies in poor the numerical stability during the associated decoding stage: The coefficient matrix of the polynomial method is a Vandermonde matrix whose condition number increases exponentially with the size of the matrix [19,20,21], and the decoding process inevitably involves the interpolation of polynomials, eventually evolving into the inversion of the coefficient matrix. Note that the size of the matrix may be large by network slicing techniques [22], and a large condition number means that a small perturbation will cause a larger perturbation after decoding [23,24], thus affecting the robustness of the decoding results. This makes large networks have extremely poor numerical stability.
In order to obtain higher numerical stability, based on Newton-like polynomial code (NLPC), we propose an NLPC-based CDC (NLPC-CDC). This encoding is designed for both matrix–vector and matrix–matrix multiplications. An associated proof that the constructed code possesses a -symmetrical combination property (CP) is provided. Extensive numerical studies verify that this method improves numerical stability significantly.
2. Preliminaries
We first formulate the matrix–vector and matrix–matrix multiplication within the CDC framework. Afterwards, we briefly describe the Newton interpolation polynomial (NIP) encoding method.
2.1. Matrix–Vector Multiplication within the CDC Framework
The first task is to calculate the matrix–vector multiplication , where matrix , column vector , and stands for the real number field. For this task, the computing system consists of a master node and N-symmetrical worker nodes, as shown in Figure 1, where symmetrical means the worker nodes have identical computation capabilities. Under this symmetrical assumption, codes that have symmetical CP can be brought into play to tackle stragglers.
Figure 1.
Matrix–vector multiplication within the CDC framework.
As H is very large, it is necessary to partition matrix into m sub-matrices, including through . Encoding the m sub-matrices into N matrices is denoted by through .
The master node delivers vector to all worker nodes. Worker node calculates the matrix–vector multiplication and delivers the calculation result back to the master node. The master node can then execute decoding to recover the intended calculation result provided that enough results have been collected.
2.2. Matrix–Matrix Multiplication within the CDC Framework
The next task is to calculate the matrix–matrix multiplication , where the matrix , . For this task, the computing system consists of a master node and N worker nodes, as shown in Figure 2. The matrix is split horizontally into m sub-matrices, including through . Matrix is then split vertically into q sub-matrices, including through . We suppose H and L are divisible by m and q, respectively (otherwise, and are filled with zeros so that the number of rows of and the number of columns of are multiples of m and q).
Figure 2.
Matrix–matrix multiplication within the CDC framework.
The intended calculated matrix becomes
Calculating is equivalent to calculating through simultaneously. We set the recovery threshold , directly allocate through to K-symmetrical worker nodes (worker node i calculates ), and the calculation will encounter the problem of stragglers.
To tackle the straggler problem, an encoding strategy is applied on through to obtain -encoded sub-matrices, recorded as through . Similarly, through are encoded into through .
The master node delivers the encoded pair to worker node . Worker node then calculates the matrix–matrix multiplication and delivers the calculation result back to the master node, which will then execute decoding to recover the original intended calculation result.
2.3. Newton Interpolation Polynomial (NIP) Encoding
As illustrated previously, symmetrical assumption leads the design to focus on CP encoding that can be directly applied in CDC systems. NIP may serve as a candidate for this encoding design.
NIP improves upon the Lagrange interpolation method by saving the number of multiplication and division operations. In addition, its base is not as complex as the Lagrange function, thus the solving process is much simpler than that of monomial based methods.
We suppose there are real interpolation points in interval , and the selected base is
for . This base has the property for .
The polynomial form obtained by linear combination based on is
where is the undetermined coefficient. We let denote the above formula, which form is called the Newton interpolation polynomial (NIP).
By substituting into the above Newton polynomial for interpolation, and re-arranging into matrix form, we obtain a lower triangular matrix (4).
The objective is to solve for the undetermined coefficients . It can be observed from the above formula that the interpolation coefficient solution matrix of the Newton polynomial is a lower triangular matrix.
3. Proposed NLPC-Based CDC (NLPC-CDC)
The processing is divided into matrix–vector and matrix–matrix multiplications.
3.1. NLPC-CDC for Matrix–Vector Multiplication
By applying NIP to encode through , we obtain
where . We expand to
The master node delivers the encoded package and column vector to the worker nodes. Worker node i performs multiplication of , and interpolates at . The matrix form of the encoded results is shown in (7).
It can be seen from the above formula that to solve , only m values from the interpolation coefficient matrix need to be returned, which goes through inversion and multiplying by obtains the final intended result. The interpolation coefficient matrix comprising m returned nodes is a lower triangular matrix, making the entire decoding matrix a sparse trapezoid and the recovery threshold .
3.2. NLPC-CDC for Matrix–Matrix Multiplication
We suppose , matrix and can both be partitioned into m blocks in the following manner:
Applying encoding over these two matrices in the following manner gives:
where . Thus, the coded matrices have the following expansions:
The master node delivers the encoded pair to the worker nodes. Each worker node calculates
Note that (13) can be re-expressed as
where denotes the interpolation coefficient term of the first m terms of , and denotes the coefficient to be calculated for the first m terms of . Similarly, the remaining items are processed.
We re-write (15) as . By interpolating with , we obtain
We divide interpolation points into sets , containing m points, where the data point of is , the data point of is , and the remaining points () are placed in . Let denote the result of interpolation of at .
After all interpolated results are processed in the above manner, they can be written in matrix form as shown in (17). Thus, similar to the Newton polynomial, the matrix for solving interpolation coefficients can also be treated as a trapezoid, called the Newton-like interpolation polynomial (NLIP). We have the following theorem, whose proof is deferred to the Appendix A as the proof is lengthy and does not hinder understanding the whole idea.
Theorem 1.
For any , there is an NIP matrix of n rows and k columns, as shown in (18). Randomly selecting k rows from this matrix forms a sub-matrix. This sub-matrix is invertible, meaning the Newton interpolation matrix has -symmetrical CP.
4. Numerical Study
Experiments were divided into matrix–vector and matrix–matrix multiplication, where both the condition number and relative error performance was compared among the prevalent Poly-CDC and our proposed NLPC-CDC. Since the work in [16] is fundamental, our proposed NLPC is also fundamental, hence comparing these two fundamentals is needed, laying the foundation for future variant comparisons.
4.1. Matrix–Vector Multiplication
Condition number: The size of matrix and column vector are and , respectively. We set the number of blocks m to be from 8 to 20. We set the interpolation point to be a random number in . By averaging over 50 realizations, the condition number of the Poly-CDC and NLPC-CDC versus m are plotted in Figure 3 for and , respectively. The observations show that compared to Poly-CDC, NLPC-CDC reduces the condition number by over and for scenario and , respectively.
Figure 3.
Condition number of matrix–vector multiplication. (a) . (b) .
Relative error: The size of matrix and column vector are and , respectively. We set m to range from 10 to 30. The relative error of the results is plotted in Figure 4. The observations show that NLPC-CDC significantly outperforms Poly-CDC.
Figure 4.
Relative error of matrix–vector multiplication. (a) . (b) .
4.2. Matrix–Matrix Multiplication
Condition number: The size of matrix and are and , respectively. We set the number of blocks m to be from four to nine. A random number in is selected as the interpolation point. By averaging over 50 realizations, the condition numbers of Poly-CDC and NLPC-CDC vs. m are plotted in Figure 5, for and , respectively. The observations show that the condition number of Poly-CDC increases rapidly when the number of blocks exceeds six, while the condition number of NLPC-CDC grows very slowly for both scenarios, and , indicating significant improvement of NLPC-CDC over Poly-CDC.
Figure 5.
Condition number of matrix–matrix multiplication. (a) . (b) .
Relative error: The relatives error of the results are plotted in Figure 6. The observations show that NLPC-CDC significantly outperforms Poly-CDC.
Figure 6.
Relative error of matrix–matrix multiplication. (a) . (b) .
5. Conclusions
To improve numerical stability, a novel NLPC-based CDC was proposed. A detailed design were executed for both matrix–vector and matrix–matrix multiplications. An associated proof that the constructed code possesses an -symmetrical combination property (CP) was provided. A series of numerical studies verified that our proposed NLPC-CDC significantly outperforms Poly-CDC in terms of the achieved condition number or relative error, and the improvement was over for all cases. This work adopted random interpolation points, without careful selection of real interpolation points. Therefore, future work may consider selecting appropriate interpolation points to obtain the best numerical results, which variants may outperform the Poly-CDC variants [17,18]. In addition, as the encoding procedure is complicated and tedious, we may consider designing a simple encoding method that can maintain numerical stability.
Author Contributions
Conceptualization, M.D., Y.T. and B.L.; Methodology, M.D. and X.L.; Validation, X.L. and Y.T.; Investigation, X.L.; Writing—original draft, M.D.; Writing—review & editing, B.L.; Supervision, M.D. and B.L.; Project administration, M.D. and B.L.; Funding acquisition, M.D. and B.L. All authors have read and agreed to the published version of the manuscript.
Funding
The research was jointly supported by research grants from the Natural Science Foundation of China (62071304), Guangdong Basic and Applied Basic Research Foundation (2020A1515010381), Basic Research foundation of Shenzhen City (20200826152915001, 20220809155455002), and Natural Science Foundation of Shenzhen University (00002501). The Program of the Science and Technology Bureau of Kashi (No. KS2022083) and Education Department of Xinjiang Uygur Autonomous Region (XJEDU2022P080).
Conflicts of Interest
The authors declare no conflict of interest.
Appendix A
Proof of Theorem 1.
Invertibility of a matrix is equivalent to the determinant of arbitrary square when a sub-matrix is non-zero. We prove this by the mathematical induction method.
- (1)
- We first consider the case where . In this case, determinant . Therefore, is non-zero, and hence we prove the determinant is non-zero.
- (2)
- We assume that the determinant is non-zero for an arbitrary Newton-interpolation matrix, namelywhere takes actual values at random from . We let Q denote the above matrix within the determinant.
- (3)
- We prove that the determinant of an arbitrary Newton-interpolation matrix is non-zero.
We randomly choose interpolation point from in the following manner and the chosen point should be distinct from of Q. We then add one row and one column for Q in the following manner:
Through elementary operations on this matrix, we can eliminate the first row except for the first element because
Afterwards, we reduce the dimension to as
By extracting the common factor of each row, and letting T denote the common factor , we obtain
where is a constant that is a linear combination of the interpolation points . Through elementary transformations to eliminate these constants, we obtain
which completes the proof. □
References
- Fan, M.; Hong, C.; Yingke, L. Blind Recognition of Forward Error Correction Codes Based on a Depth Distribution Algorithm. Symmetry 2021, 13, 1094. [Google Scholar] [CrossRef]
- Abbas, N.; Zhang, Y.; Taherkordi, A. Mobile edge computing: A survey. IEEE Internet Things J. 2017, 5, 450–465. [Google Scholar] [CrossRef]
- Shi, W.; Cao, J.; Zhang, Q. Edge Computing: Vision and Challenges. IEEE Internet Things J. 2016, 3, 637–646. [Google Scholar] [CrossRef]
- Zhu, H.; Luan, T.H.; Dong, M. Guest editorial: Fog computing on wheels. Peer-Peer Netw. Appl. 2018, 11, 735–737. [Google Scholar] [CrossRef]
- Wang, T.; Zhou, J.; Liu, A. Fog-Based Computing and Storage Offloading for Data Synchronization in IoT. IEEE Internet Things J. 2018, 6, 4272–4282. [Google Scholar] [CrossRef]
- Sisinni, E.; Saifullah, A.; Han, S. Industrial internet of things: Challenges, opportunities, and directions. IEEE Internet Things J. 2018, 14, 4724–4734. [Google Scholar] [CrossRef]
- Pokamestov, D. Adaptation of Signal with NOMA and Polar Codes to the Rayleigh Channel. Symmetry 2022, 14, 2103. [Google Scholar] [CrossRef]
- Shen, X.; Gao, J.; Wu, W.; Li, M.; Zhou, C.; Zhuang, W. Holistic network intelligence for 6G. IEEE Commun. Surv. Tutotrials 2022, 24, 1–30. [Google Scholar] [CrossRef]
- Li, J.; Dang, S.; Huang, Y.; Chen, P.; Qi, X.; Wen, M. Composite multiple-mode orthogonal frequency division multiplexing with index modulation. IEEE Trans. Wirel. Commun. 2022, 22, 3748–3761. [Google Scholar] [CrossRef]
- Li, J.; Dang, S.; Wen, M.; Li, Q.; Chen, Y.; Huang, Y. Index Modulation Multiple Access for 6G Communications: Principles, Applications, and Challenges. IEEE Netw. 2023, 37, 52–60. [Google Scholar] [CrossRef]
- Liu, N.; Li, K.; Tao, M. Code design and latency analysis of distributed matrix multiplication with straggling servers in fading channels. China Commun. 2021, 18, 15–29. [Google Scholar] [CrossRef]
- Shin, D.-J.; Kim, J.-J. Cache-Based Matrix Technology for Efficient Write and Recovery in Erasure Coding Distributed File Systems. Symmetry 2023, 15, 872. [Google Scholar] [CrossRef]
- Dean, J.; Barroso, L.A. The tail at scale. Commun. ACM 2013, 56, 74–80. [Google Scholar] [CrossRef]
- Herault, T.; Hoarau, W. FAIL-MPI: How fault-tolerant is fault-tolerant MPI? In Proceedings of the IEEE International Conference on Cluster Computing, Barcelona, Spain, 25–28 September 2006. [Google Scholar]
- Dai, M. SAZD: A low computational load coded distributed computing framework for IoT systems. IEEE Internet Things J. 2020, 7, 3640–3649. [Google Scholar] [CrossRef]
- Yu, Q.; Maddah-Ali, M.A.; Avestimehr, A.S. Polynomial Codes: An Optimal Design for High-Dimensional Coded Matrix Multiplication. Adv. Neural Inf. Process. Syst. 2017, 30, 1–11. [Google Scholar]
- Hasırcıoğlu, B.; Gómez-Vilardebó, J.; Gündüz, D. Bivariate Hermitian Polynomial Coding for Efficient Distributed Matrix Multiplication. In Proceedings of the IEEE Global Communications Conference, Taipei, Taiwan, 7–11 December 2020; pp. 1–6. [Google Scholar]
- Hasırcıoğlu, B.; Gómez-Vilardebó, J.; Gündüz, D. Bivariate Polynomial Coding for Efficient Distributed Matrix Multiplication. IEEE J. Sel. Areas Inf. Theory 2021, 2, 814–829. [Google Scholar] [CrossRef]
- Gautschi, W.; Inglese, G. Lower bounds for the condition number of vandermonde matrices. Numer. Math. 1987, 52, 241–250. [Google Scholar] [CrossRef]
- Gautschi, W. How (un) stable are vandermonde systems. Asymptot. Comput. Anal. 1990, 124, 193–210. [Google Scholar]
- Reichel, L.; Opfer, G. Chebyshev-vandermonde systems. Math. Comput. 1991, 57, 703–721. [Google Scholar] [CrossRef]
- Shen, X.; Gao, J.; Wu, W. AI-assisted network-slicing based next-generation wireless networks. IEEE Open J. Veh. Technol. 2020, 1, 45–66. [Google Scholar] [CrossRef]
- Quarteroni, A.; Sacco, R.; Saleri, F. Numerical Mathematics; Springer: Berlin/Heidelberg, Germany, 2010; Volume 37. [Google Scholar]
- Trefethen, L.N. Approximation Theory and Approximation Practice; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 2013; Volume 128. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).





