Overview
The librla library is a software package designed for randomized linear algebra (RLA) routines. It targets intermediate-sized matrices, specifically those with dimensions up to approximately 10,000. This range of matrix dimensions is relevant for applications such as reduced order modeling, fast direct solvers, least squares computations, and certain data compression scenarios.
Research Context
Randomized linear algebra methods are increasingly used for various computational tasks, particularly when dealing with large datasets. The development of efficient and stable software implementations is crucial for their practical application. Existing software solutions may present limitations in terms of stability, efficiency across multiple high-level languages, or functional scope.
Approach
librla was developed to address needs for stable and efficient randomized linear algebra for intermediate-sized matrices. The design focuses on providing functionality across multiple high-level programming environments. The library's capabilities include various factorization options and flexibility in how these factorizations are generated.
The library's design incorporates the following features:
- Multi-language Support: It provides stable and efficient interfaces for MATLAB, Python, and Julia.
- Factorization Options: Users can choose between QR, Singular Value Decomposition (SVD), and interpolative decomposition.
- Factorization Criteria: Factorizations can be generated either based on a fixed rank or a specified desired tolerance.
- Matrix Access Methods: The factorization process can utilize either direct access to the matrix itself or access via a matrix-vector multiplication routine.
To assess its performance, numerical results were generated comparing the Python implementation of librla with existing randomized factorization routines available in PyTorch and SciPy. These comparisons focused on performance characteristics.
Findings
The librla library is characterized by its stability and efficiency across MATLAB, Python, and Julia, distinguishing it as the first software package to offer these attributes consistently across these three high-level languages. It also extends functionality beyond existing software solutions.
- Functionality: Users have the option to generate factorizations based on a fixed rank or a desired tolerance.
- Decomposition Types: The supported factorization options include QR, SVD, and the interpolative decomposition.
- Input Flexibility: Factorizations can be generated with either direct matrix access or access through a matrix-vector multiplication routine.
- Performance Comparison: Numerical results indicate that the performance of the Python implementation of
librlais comparable to that of available PyTorch and SciPy randomized factorizations. - Cross-Language Consistency: The performance of
librlaacross its implementations in MATLAB, Python, and Julia was found to be comparable.
Why This Matters
The development of librla provides a unified, stable, and efficient software tool for randomized linear algebra for applications that involve intermediate-sized matrices. Its availability across multiple widely-used programming languages and its flexible factorization options can support researchers and practitioners in fields requiring these computational methods.