Calculating the Moore–Penrose Generalized Inverse on Massively Parallel Systems
Abstract
:1. Introduction
2. Moore–Penrose Generalized Inverse
XAX = X, (b)
(AX) * = AX, (c)
(XA)*= XA. (d)
3. Massively Parallel Computing and CUDA
4. Recursive Algorithm for Calculating the Pseudoinverse
4.1. Generalized Cholesky Factorisation
4.2. Strassen’s Matrix Inverse Algorithm
4.3. Calculating the Pseudoinverse
5. Algorithm for Massively Parallel Systems
5.1. Representing a Matrix in GPU Memory
5.2. Matrix Multiplication
5.3. Implementation of Cholesky Factorization
5.4. Strassen’s Matrix Inversion Algorithm
5.5. Calculating the Pseudoinverse
6. Computational Experiment and Analysis
7. Conclusions
Author Contributions
Funding
Conflicts of Interest
Appendix A
References
- Wang, G.; Wei, Y.; Qiao, S. Generalized Inverses: Theory and Computations; Science Press: Beijing, China, 2018. [Google Scholar] [CrossRef]
- Golub, G.H.; Van Loan, C.F. Matrix Computations, 3rd ed.; The Johns Hopkins University Press: Baltimore, MD, USA, 1996. [Google Scholar]
- Stanimirović, P.S.; Mosić, D.; Wei, Y. Least squares properties of generalized inverses. Commun. Math. Res. 2021, 37, 421–447. [Google Scholar]
- Leiva, H.; Manzanilla, R. Moore-Penrose Inverse and Semilinear Equations. Adv. Linear Algebra Matrix Theory 2018, 8, 11–17. [Google Scholar] [CrossRef]
- Bouman, N.J.; de Vreede, N. A Practical approach to the secure computation of the Moore-Penrose pseudoinverse over the rationals. IACR Cryptol. Eprint Arch. 2019, 2019, 470. [Google Scholar]
- Bozzo, E. The Moore–Penrose inverse of the normalized graph Laplacian. Linear Algebra Its Appl. 2013, 439, 3038–3043. [Google Scholar] [CrossRef]
- Azimi, A.; Bapat, R.B. Moore–Penrose inverse of the incidence matrix of a distance regular graph. Linear Algebra Its Appl. 2018, 551, 92–103. [Google Scholar] [CrossRef]
- Azimi, A.; Bapat, R. The Moore–Penrose inverse of the incidence matrix of complete multipartite and bi-block graphs. Discret. Math. 2019, 342, 2393–2401. [Google Scholar] [CrossRef]
- Azimi, A.; Bapat, R.B.; Estaji, E. Moore–Penrose inverse of incidence matrix of graphs with complete and cyclic blocks. Discret. Math. 2019, 342, 10–17. [Google Scholar] [CrossRef]
- Hessert, R.; Mallik, S. Moore-Penrose inverses of the signless Laplacian and edge-Laplacian of graphs. Discret. Math. 2021, 344, 112451. [Google Scholar] [CrossRef]
- Dang, V.H.; Nguyen, T.D. Construction of Pseudoinverse Matrix Over Finite Field and Its Applications. Wirel. Pers. Commun. 2017, 94, 455–466. [Google Scholar] [CrossRef]
- Kirichenko, N.F.; Lepekha, N.P. Application of Pseudoinverse and Projective Matrices to Studying Control, Observation, and Identification Problems. Cybern. Syst. Anal. 2002, 38, 568–585. [Google Scholar] [CrossRef]
- Chountasis, S.; Katsikis, V.N.; Pappas, D. Applications of the Moore-Penrose Inverse in Digital Image Restoration. Math. Probl. Eng. 2009, 2009, 170724. [Google Scholar] [CrossRef] [Green Version]
- Miljkovic, S.; Miladinovic, M.; Stanimirovic, P.; Stojanovic, I. Application of the pseudoinverse computation in reconstruction of blurred images. Filomat 2013, 26, 453–465. [Google Scholar] [CrossRef]
- Jurgen, R. 2001-01-0562 On-Line State Prediction of Engines Based on Fast Neural Network. In Electronic Engine Control Technologies; SAE: Sydney, Australia, 2004; pp. 713–719. [Google Scholar] [CrossRef]
- Huang, Y.; Huang, N.; Li, Y.; Shi, Y. Automated Fault Detection and Diagnosis for an Air Handling Unit Based on a GA-Trained RBF Network. In Proceedings of the 2006 International Conference on Communications, Circuits and Systems, Guilin, China, 25–28 June 2006; Volume 3, pp. 2038–2041. [Google Scholar] [CrossRef]
- Lima dos Reis Marques, F.; Floridia, C.; Alves Almeida, T.; Leonardi, A.A.; Fruett, F. Separation of temperature and strain in a single fiber BOTDA system by pseudo-inverse approach. In Proceedings of the 2017 SBMO/IEEE MTT-S International Microwave and Optoelectronics Conference (IMOC), Aguas de Lindoia, Brazil, 27–30 August 2017; pp. 1–4. [Google Scholar] [CrossRef]
- Corbella, I.; Torres, F.; Camps, A.; Duffo, N.; Vall-Llossera, M. Brightness-Temperature Retrieval Methods in Synthetic Aperture Radiometers. IEEE Trans. Geosci. Remote Sens. 2009, 47, 285–294. [Google Scholar] [CrossRef]
- Tapson, J.; van Schaik, A. Learning the pseudoinverse solution to network weights. Neural Netw. 2013, 45, 94–100. [Google Scholar] [CrossRef]
- Sevinov, J. Regularized Algorithms for the Formation of Control Actions in Locally Optimal Control Systems for Dynamic Objects. Int. J. Adv. Res. Sci. Eng. Technol. 2018, 5, 5853–5857. [Google Scholar]
- Jin, L.; Zhang, Y. Discrete-time Zhang neural network of O(τ3) pattern for time-varying matrix pseudoinversion with application to manipulator motion generation. Neurocomputing 2014, 142, 165–173. [Google Scholar] [CrossRef]
- Hu, Z.; Xiao, L.; Li, K.; Li, K.; Li, J. Performance analysis of nonlinear activated zeroing neural networks for time-varying matrix pseudoinversion with application. Appl. Soft Comput. 2021, 98, 106735. [Google Scholar] [CrossRef]
- Tanabe, K. Neumann-type expansion of reflexive generalized inverses of a matrix and the hyperpower iterative method. Linear Algebra Its Appl. 1975, 10, 163–175. [Google Scholar] [CrossRef]
- Pan, V.; Schreiber, R. An Improved Newton Iteration for the Generalized Inverse of a Matrix, with Applications. SIAM J. Sci. Stat. Comput. 1991, 12, 1109–1130. [Google Scholar] [CrossRef] [Green Version]
- Weiguo, L.; Juan, L.; Tiantian, Q. A family of iterative methods for computing Moore–Penrose inverse of a matrix. Linear Algebra Its Appl. 2013, 438, 47–56. [Google Scholar] [CrossRef]
- Liu, X.; Jin, H.; Yu, Y. Higher-order convergent iterative method for computing the generalized inverse and its application to Toeplitz matrices. Linear Algebra Its Appl. 2013, 439, 1635–1650. [Google Scholar] [CrossRef]
- Soleymani, F. An efficient and stable Newton-type iterative method for computing generalized inverse . Numer. Algorithms 2015, 69, 569–578. [Google Scholar] [CrossRef]
- Petković, M.D.; Stanimirović, P.S. Generalized matrix inversion is not harder than matrix multiplication. J. Comput. Appl. Math. 2009, 230, 270–282. [Google Scholar] [CrossRef]
- Chen, X.; Ji, J. Computing the Moore-Penrose Inverse of a Matrix through Symmetric Rank-One Updates. Am. J. Comput. Math. 2011, 1, 147–151. [Google Scholar] [CrossRef]
- Kadiam, S.C. Sciences Applications: Research and Education. Ph.D. Dissertation, Civil & Environmental Engineering, Old Dominion University, Norfolk, VA, USA, 2012. [Google Scholar] [CrossRef]
- Yanai, H.; Takeuchi, K.; Takane, Y. Projection Matrices, Generalized Inverse Matrices, and Singular Value Decomposition; Springer: New York, NY, USA, 2011. [Google Scholar]
- Sun, W.; Wei, Y. Inverse Order Rule for Weighted Generalized Inverse. SIAM J. Matrix Anal. Appl. 1998, 19, 772–775. [Google Scholar] [CrossRef]
- Stanimirović, P.S.; Pappas, D.; Katsikis, V.N.; Stanimirović, I. Full–rank representations of outer inverses based on the QR decomposition. Appl. Math. Comput. 2012, 218, 10321–10333. [Google Scholar] [CrossRef]
- Andrilli, S.; David Hecker, D. Elementary Linear Algebra, 4th ed.; Academic Press: New York, NY, USA, 2009; 768p. [Google Scholar]
- Sheng, X.; Chen, G.L.; Gong, Y. The representation and computation of generalized inverse . J. Comput. Appl. Math. 2008, 213, 248–257. [Google Scholar] [CrossRef]
- Sheng, X.; Chen, G.L. A note of computation for M-P inverse A. Int. J. Comput. Math. 2010, 87, 2235–2241. [Google Scholar] [CrossRef]
- Ji, J. Gauss–Jordan elimination methods for the Moore–Penrose inverse of a matrix. Linear Algebra Its Appl. 2012, 437, 1835–1844. [Google Scholar] [CrossRef]
- Strang, G. Introduction to Linear Algebra, 5th ed.; Wellesley-Cambridge Press: Wellesley, MA, USA, 2016; 600p. [Google Scholar]
- Penrose, R. A generalized inverse for matrices. Math. Proc. Camb. Philos. Soc. 1955, 51, 406–413. [Google Scholar] [CrossRef]
- Soyata, T. GPU Parallel Program Development Using CUDA, 1st ed.; Chapman and Hall/CRC: New York, NY, USA, 2018. [Google Scholar] [CrossRef]
- Strassen, V. Gaussian elimination is not optimal. Numer. Math. 1969, 13, 354–356. [Google Scholar] [CrossRef]
- Courrieu, P. Straight monotonic embedding of data sets in Euclidean spaces. Neural Netw. 2002, 15, 1185–1196. [Google Scholar] [CrossRef]
- Courrieu, P. Fast solving of weighted pairing least-squares systems. J. Comput. Appl. Math. 2009, 231, 39–48. [Google Scholar] [CrossRef]
- Stanojević, V.; Kazakovtsev, L.; Stanimirović, P.S.; Rezova, N.; Shkaberina, G. Program Code for Calculating Moore-Penrose Generalized Inverse on Massive-Parallel Systems. Available online: http://levk.info/GPUMoorePenroseCode.zip (accessed on 28 August 2022).
- Higham, N.J. Cholesky factorization. Wiley Interdiscip. Rev. Comput. Stat. 2009, 1, 251–254. [Google Scholar] [CrossRef]
- OpenCV Team. Available online: https://www.google-melange.com/archive/gsoc/2014/orgs/opencv (accessed on 28 August 2022).
- PyTorch Library. Available online: http://citebay.com/how-to-cite/pytorch (accessed on 28 August 2022).
- Gutman, I.; Xiao, W. Generalized inverse of the Laplacian matrix and some applications. Bull. Cl. Sci. Math. Natturalles 2004, 129, 15–23. [Google Scholar] [CrossRef]
- Kurata, H.; Bapat, R.B. Moore–Penrose inverse of a Euclidean distance matrix. Linear Algebra Its Appl. 2015, 472, 106–117. [Google Scholar] [CrossRef]
- Balaji, R.; Bapat, R.B. On Euclidean distance matrices. Linear Algebra Its Appl. 2007, 424, 108–117. [Google Scholar] [CrossRef] [Green Version]
- Jeyaraman, I.; Divyadevi, T.; Azhagendran, R. The Moore-Penrose Inverse of the Distance Matrix of a Helm Graph. arXiv 2022, arXiv:2208.10897. [Google Scholar] [CrossRef]
Matrix Shape | Float | ||||
---|---|---|---|---|---|
CPU-SVD | CPU-R | GPU-SVD | GPU-R-v1 | GPU-R-v2 | |
12 × 8 | 0 | 0 | 1 | 0 | 1 |
48 × 32 | 0 | 0 | 1 | 3 | 4 |
192 × 128 | 7 | 1 | 4.2 | 13.2 | 16 |
384 × 256 | 59.6 | 3.8 | 10.4 | 26.8 | 32.2 |
768 × 512 | 474 | 23.6 | 28.8 | 57.4 | 65.8 |
1536 × 1024 | 3749.4 | 95 | 117.8 | 128.8 | 135.2 |
3072 × 2048 | 30,734.6 | 437 | 704.2 | 343.8 | 294 |
6144 × 4096 | 246,801.8 | 2597.4 | 5993.2 | 1392 | 720.2 |
Matrix Shape | Double | ||||
---|---|---|---|---|---|
CPU-SVD | CPU-R | GPU-SVD | GPU-R-v1 | GPU-R-v2 | |
12 × 8 | 0 | 0 | 1 | 1 | 1 |
48 × 32 | 0 | 0 | 3.2 | 4.2 | 4 |
192 × 128 | 7 | 0.4 | 21.8 | 19 | 9 |
384 × 256 | 61.4 | 3.4 | 61.6 | 40.6 | 40 |
768 × 512 | 485.4 | 27.6 | 212.2 | 90.2 | 42.6 |
1536 × 1024 | 3936 | 128 | 1233.8 | 242.2 | 99.4 |
3072 × 2048 | 32,077.6 | 726 | 7064.8 | 910.2 | 288.2 |
6144 × 4096 | 256,628 | 5290.4 | 48,339.8 | 5391.2 | 1136 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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/).
Share and Cite
Stanojević, V.; Kazakovtsev, L.; Stanimirović, P.S.; Rezova, N.; Shkaberina, G. Calculating the Moore–Penrose Generalized Inverse on Massively Parallel Systems. Algorithms 2022, 15, 348. https://doi.org/10.3390/a15100348
Stanojević V, Kazakovtsev L, Stanimirović PS, Rezova N, Shkaberina G. Calculating the Moore–Penrose Generalized Inverse on Massively Parallel Systems. Algorithms. 2022; 15(10):348. https://doi.org/10.3390/a15100348
Chicago/Turabian StyleStanojević, Vukašin, Lev Kazakovtsev, Predrag S. Stanimirović, Natalya Rezova, and Guzel Shkaberina. 2022. "Calculating the Moore–Penrose Generalized Inverse on Massively Parallel Systems" Algorithms 15, no. 10: 348. https://doi.org/10.3390/a15100348
APA StyleStanojević, V., Kazakovtsev, L., Stanimirović, P. S., Rezova, N., & Shkaberina, G. (2022). Calculating the Moore–Penrose Generalized Inverse on Massively Parallel Systems. Algorithms, 15(10), 348. https://doi.org/10.3390/a15100348