LowRankIntegrators.jl is a package for dynamical low rank approximation (DLRA) in Julia. DLRA can help you approximate the solution to (otherwise intractably) large matrix-valued ODEs.
Given a matrix-valued ODE,
with
Conceptually, DLRA propagates a rank
Here,
While seemingly abstract at first, the solution of exceedingly large matrix-valued ODEs is quite a common problem. In the following we briefly discuss two general applications.
Given a stream of data as described by a function
Thus, DLRA can be used to propagate a compression of this data forward in time which can be substantially cheaper than compressing the data at every instant of time with other methods.
Given a parametric
one often wishes to understand the parametric dependence of its solution. Arguably the simplest approach to this problem is sampling, where the ODE is simply evaluated for
whose dynamics are governed by
Note further that applying DLRA to this problem can be viewed as applying a quite intuitive function expansion strategy to express the parametric solution
where, in contrast to other methods, the expansion modes
LowRankIntegrators.jl relies on a handful of primitives to enable the non-intrusive use of DLRA. These are described below.
Given a matrix differential equation
to be approximately solved via DLRA, the problem shall be set up as MatrixDEProblem(F,Y0,tspan)
where
F
is the right-hand-side of the matrix ODE.F
must accept two arguments, the first one being the (matrix-valued) state and the second time (or appropriate independent variable).Y0
is a low rank approximation of the initial condition. The rank ofY0
determines the rank of the approximation unless a rank-adaptive integrator is used.Y0
is to be of typeSVDLikeRepresentation
(see LowRankArithmetic.jl for details).tspan
is a tuple holding the initial and final time for integration.
If a data stream (or discrete sequence of data snapshots) is to be compressed via DLRA, then additional structure can be exploited. In this case, the problem shall be defined as MatrixDataProblem(A,Y0,tspan)
where
A
is a function that describes the data stream, i.e.,A(t)
returns the data snapshot at timet
.Y0
is a low rank approximation of the initial data pointA(0)
. The rank ofY0
determines the rank of the approximation unless a rank-adaptive integrator is used.Y0
is to be of typeSVDLikeRepresentation
(see LowRankArithmetic.jl for details).tspan
is a tuple holding the initial and final time for integration.
If the data stream is not available continuously, but instead in form of discrete (time-ordered) snapshots, the problem shall be defined as MatrixDataProblem(A,Y0,tspan)
where
A
is a (time-ordered) vector of data matrix snapshots.Y0
is a low rank approximation of the initial data pointA(0)
. The rank ofY0
determines the rank of the approximation unless a rank-adaptive integrator is used.
A key ingredient that allows LowRankIntegrators.jl to implement DLRA with minimal intrusion is LowRankArithmetic.jl. Specifically, LowRankArithmetic.jl facilitates the propagation of low rank factorizations through finite compositions of a wide range of arithmetic operations. This critically allows to take advantage of the low rank structure of the approximate solution
While the concept of DLRA is quite intuitive, it is no easy task to realize it algorithmically and only a handful of integration algorithms have been proposed. LowRankIntegrators.jl currently implement the Lie-Trotter and Strang projector splitting algorithms proposed in [1] as well as the "unconventional integrator" proposed in [2] and its rank-adaptive counterpart [3]. This selection of algorithms was made to support those that are robust to the presence of small singular values in the approximation [4].
Within LowRankIntegrators.jl the different integrators are specified by simple objects, allowing the specification of integrator specific options:
-
Projector Splitting -
ProjectorSplitting(order)
where the optional argumentorder
refers to the concrete type of the projector splitting algorithm. It can take valuesPrimalLieTrotter()
,DualLieTrotter()
, andString()
. If no argument is specified,order
defaults toPrimalLieTrotter()
-
Unconventional Algorithm -
UnconventionalAlgorithm()
-
Rank adaptive unconventional Algorithm -
RankAdaptiveUnconventionalAlgorithm()
In order to finally solve a MatrixDEProblem
or a MatrixDataProblem
, the solve statement solve(problem, alg, dt)
shall be called. Here
problem
refers to a properly definedMatrixDEProblem
orMatrixDataProblem
.alg
refers to one of the supported DLRA integrators.dt
refers to the integration step sizes. Ifproblem
is aMatrixDataProblem
where the data is specified as discrete snapshotsdt
defaults to 1 so that the integrator steps through all provided snapshots in order.
Future work will include integration routines for the dynamically orthogonal field equations.
This work is supported by NSF Award PHY-2028125 "SWQU: Composable Next Generation Software Framework for Space Weather Data Assimilation and Uncertainty Quantification".
[1] Lubich, Christian, and Ivan V. Oseledets. "A projector-splitting integrator for dynamical low-rank approximation." BIT Numerical Mathematics 54.1 (2014): 171-188.
[2] Ceruti, Gianluca, and Christian Lubich. "An unconventional robust integrator for dynamical low-rank approximation." BIT Numerical Mathematics (2021): 1-22.
[3] Ceruti, Gianluca, Jonas Kusch, and Christian Lubich. "A rank-adaptive robust integrator for dynamical low-rank approximation." arXiv preprint arXiv:2104.05247 (2021).
[4] Kieri, Emil, Christian Lubich, and Hanna Walach. "Discretized dynamical low-rank approximation in the presence of small singular values." SIAM Journal on Numerical Analysis 54.2 (2016): 1020-1038.