SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Ryoma Yataka $^{1,2}$ , Kazuki Hirashima $^{1}$ , Masashi Shiraishi $^{1}$
<sup>1</sup>Information Technology R&D Center (ITC), Mitsubishi Electric Corporation, Kamakura, Kanagawa, 247-8501, Japan
$^{2}$ Mitsubishi Electric Research Laboratories (MERL), Cambridge, MA 02139, USA
{Yataka.Ryoma@dw.MitsubishiElectric.co.jp, yataka@merl.com}
Recently, studies on machine learning have focused on methods that use symmetry implicit in a specific manifold as an inductive bias. Grassmann manifolds provide the ability to handle fundamental shapes represented as shape spaces, enabling stable shape analysis. In this paper, we present a novel approach in which we establish the theoretical foundations for learning distributions on the Grassmann manifold via continuous normalization flows, with the explicit goal of generating stable shapes. Our approach facilitates more robust generation by effectively eliminating the influence of extraneous transformations, such as rotations and inversions, through learning and generating within a Grassmann manifold designed to accommodate the essential shape information of the object. The experimental results indicated that the proposed method could generate high-quality samples by capturing the data structure. Furthermore, the proposed method significantly outperformed state-of-the-art methods in terms of the log-likelihood or evidence lower bound. The results obtained are expected to stimulate further research in this field, leading to advances for stable shape generation and analysis.
Many machine learning algorithms are designed to automatically learn and extract latent factors that explain a specific dataset. Symmetry is known to be an inductive bias (that is, prior knowledge other than training data that can contribute significantly to learning results) for learning latent factors (Cohen & Welling (2016, 2017); Weiler & Cesa (2019); Satorras et al. (2021); Bronstein et al. (2021); Puny et al. (2022)). Moreover, they exist in many phenomena in the natural sciences. If a target  $M$  is invariant<sup>1</sup> when the operation  $g \in S$  designated by  $S$  applied to  $M$ ,  $M$  has symmetry  $S$ . For example, a sphere remains a sphere even if a rotation  $R$  is applied; a symmetric shape remains symmetric even if a left-right reversal is applied.
Recent studies have focused on methods incorporating symmetry into models based on equivariance and invariance, when the data space forms a non-Euclidean space (a sphere  $S^n$  or a special unitary group  $SU(n)$ ) (Cohen et al. (2018, 2019b); Graham et al. (2020); Haan et al. (2021); Boyda et al. (2021a)). Among them, discriminative and generative models for subspace data (e.g., shape matrices of point cloud data such as three-dimensional molecules and general object shapes) have been proposed as viable approaches using Grassmann manifolds, which are quotient manifolds obtained by introducing a function that induces invariance with respect to orthogonal transformations into
<sup>1</sup>Invariance implies the transformation  $\pi$  satisfies  $\pi(x) = \pi(x') = \pi(g(x))$  for  $x' = g(x)$  obtained by applying the operation  $g$  to the input  $x$ . Transformation  $\pi$  is considered invariant with respect to operation  $g$ . A transformation  $\pi$  is considered equivariant with respect to an operation  $p$  if  $\pi$  satisfies  $g(\pi(x)) = \pi(g(x))$ . Invariance is a special case of equivariance where  $\pi(g)$  is an identity transformation.
a set of orthonormal basis matrices namely Stiefel Manifold. Numerous studies have confirmed their effectiveness (Liu et al. (2003); Hamm & Lee (2008); Turaga et al. (2008); Harandi et al. (2011); Fan et al. (2011); Lui (2012); Huang et al. (2015, 2018); Souza et al. (2020); Haitman et al. (2021); Doronina et al. (2022); Souza et al. (2022)). Shape theory studies the equivalent class of all configurations that can be obtained by a specific class of transformation (e.g. linear, affine, projective) on a single basis shape (Patrangenaru & Mardia (2003); Sepiashvili et al. (2003); Begelfor & Werman (2006)), and it can be shown that affine and linear shape spaces for specific configurations can be identified by points on the Grassmann manifold. By applying this model to inverse molecular design for stable shape generation to discover new molecular structures, they can contribute to the development of drug discovery, computational anatomy, and materials science (Sanchez-Lengeling & Aspuru-Guzik (2018); Bilodeau et al. (2022)).
Continuous normalizing flows (CNFs; Chen et al. (2018); Grathwohl et al. (2019); Lou et al. (2020); Kim et al. (2020); Mathieu & Nickel (2020)) are generative models that have attracted attention in recent years along with the variational auto-encoders (VAE; Kingma & Welling (2014)), generative adversarial networks (GAN; Goodfellow et al. (2014)), autoregressive models (Germain et al. (2015); Oord et al. (2016)), and diffusion models (Sohl-Dickstein et al. (2015); Ho et al. (2020); Song et al. (2021); Huang et al. (2022); De Bortoli et al. (2022)). The CNF is a method with theoretically superior properties that allow rigorous inference and evaluation of the log-likelihood. It can be trained by maximum likelihood using the change of variables formula, which allows to specify a complex normalized distribution implicitly by warping a normalized base distribution through an integral of continuous-time dynamics. In this paper, we present a novel approach with the explicit goal of generating stable shapes. We employ the CNF to achieve stable shape generation on a Grassmann manifold; however, previous studies have lacked the theoretical foundation to handle the CNF on the Grassmann manifold. To construct this, we focused on the quotient structure of a Grassmann manifold and translated the problem of flow learning on a Grassmann manifold into that of preserving equivariance for orthogonal groups on a Stiefel manifold, which is its total space. The contributions of this study are as follows.
- A theory and general framework for learning flows on a Grassmann manifold are proposed. In our setting, we can train flows on a Grassmann manifold of arbitrary dimension. To the best of our knowledge, this is the first study in which a CNF was constructed on a Grassmann manifold via a unified approach, focusing on the quotient structure.
- The validity of the proposed approach was demonstrated by learning densities on a Grassmann manifold using multiple artificial datasets with complex data distributions. In particular, orthogonally transformed data were proven to be correctly learned without data augmentations by showing that untrained transformed (i.e., rotated or mirrored) data can be generated from the trained model. The model was evaluated on multiple patterns of training data and performed well with a small amount of training data.
- The effectiveness of our approach was confirmed by its state-of-the-art performance in a molecular positional generation task.
Symmetry-based Learning The concept of equivariance has been studied in recent years to leverage the symmetries inherent in data (Cohen & Welling (2017); Kondor & Trivedi (2018); Cohen et al. (2018, 2019b,a); Finzi et al. (2020); Haan et al. (2021)). Early work by Cohen & Welling (2017) indicated that when data are equivariant, they can be processed with a lower computational cost and fewer parameters. In the context of CNFs (Rezende & Mohamed (2015); Chen et al. (2018); Grathwohl et al. (2019)), which are generative models, Rezende et al. (2019), Kohler et al. (2020) and Garcia Satorras et al. (2021) proposed equivariant normalizing flows to learn symmetric densities on Euclidean spaces. Furthermore, the symmetries that appear in learning densities on a manifold were introduced by Boyda et al. (2021b) and Katsman et al. (2021) as a conjugate equivariant flow on  $SU(n)$ , which is a quotient manifold, for use in lattice gauge theory. However, a normalizing flow on a Grassmann manifold capable of handling subspace data has not yet been established.
Shape Data Analysis and Other Applications with Subspace on the Grassmann Manifold  $k$ -dimensional shape data (Begelfor & Werman (2006); Yoshinuma et al. (2016); Haitman et al. (2021);
Doronina et al. (2022)) such as point clouds are essentially represented as subspace (shape space (Sepiashvili et al. (2003); Srivastava et al. (2005); Begelfor & Werman (2006); Yataka & Fukui (2017)) data on a Grassmann manifold. Furthermore, subspace data can be obtained on many types of data and can provide advantages such as practicability and noise robustness. For example, multiview image sets or video data (Fan et al. (2011); Turaga et al. (2011); Lui (2012); Alashkar et al. (2016)), signal data (Srivastava & Klassen (2004); Gatto et al. (2017); Souza et al. (2019); Yataka et al. (2019)), and text data (Shimomoto et al. (2021)) are often provided as a set of feature vectors. Such raw data in matrix form is not very useful owing to its considerable size and noise. The analysis of its eigenspace, or column subspace, is important because alternatively, the raw data matrix can be well approximated by a low-dimensional subspace with basis vectors corresponding to the maximum eigenvalues of the matrix. Therefore, they inevitably give rise to the necessity of analyzing them on a Grassmann manifold.
3 Mathematical Preliminaries
In this section, the basic mathematical concepts covered in this paper are described. Further details on the fundamentals of a Grassmann manifold are summarized in the Appendix D.
3.1 Grassmann Manifold Defined as Quotient Manifold
Definition of a Grassmann Manifold A Grassmann manifold  $\mathrm{Gr}(k,D)$  is a set of  $k$ -dimensional subspaces  $\operatorname{span}(\mathbf{Y})$  ( $\mathbf{Y}$  is a matrix of  $k$  basis vectors and the function  $\operatorname{span}(\cdot)$  is onto  $\operatorname{Gr}(k,D)$ ) in the  $D$ -dimensional Euclidean space  $\mathbb{R}^D$ , and is defined as  $\operatorname{Gr}(k,D) = \{\operatorname{span}(\mathbf{Y}) \subset \mathbb{R}^D \mid \dim(\operatorname{span}(\mathbf{Y})) = k\}$  (Absil et al. (2008)). The span  $(\mathbf{Y})$  is the same subspace regardless of a  $k$ -dimensional rotation or  $k$ -dimensional reflection applied to  $\mathbf{Y}$  on which it is spanned. With respect to the compact Stiefel manifold  $\operatorname{St}(k,D) := \left\{\mathbf{Y} \in \mathbb{R}^{D \times k} \mid \mathbf{Y}^\top \mathbf{Y} = \mathbf{I}_k\right\}$  defined as the set of  $D \times k$ -orthonormal basis matrices  $\mathbf{Y}$ , the equivalence class of  $\mathbf{Y} \in \operatorname{St}(k,D)$  determined from the equivalence relation  $\sim^2$  is defined by  $[\mathbf{Y}] := \pi(\mathbf{Y}) = \{\mathbf{Y} \mathbf{Q} \in \operatorname{St}(k,D) \mid \mathbf{Q} \in \mathcal{O}(k)\}$ , where  $\pi(\mathbf{Y})$  is a continuous surjection referred to as a quotient map. The equivalence class corresponds one-to-one with the  $k$ -dimensional subspace:
$$
[ \boldsymbol {Y} ] = [ \boldsymbol {X} ] \Longleftrightarrow \operatorname {s p a n} (\boldsymbol {Y}) = \operatorname {s p a n} (\boldsymbol {X}), \tag {1}
$$
where  $\mathbf{Y} \in \mathrm{St}(k, D)$  is the representative of  $[\mathbf{Y}]$ .  $\operatorname{span}(\mathbf{Y})$  is termed invariant under  $\sim$ . The quotient set composed of such  $[\mathbf{Y}]$  as a whole can introduce the structure of a manifold (Sato & Iwai (2014)).
Definition 1. A Grassmann manifold as a quotient manifold is defined as follows:
$$
\operatorname {G r} (k, D) := \operatorname {S t} (k, D) / \mathcal {O} (k) = \left\{\left[ \boldsymbol {Y} \right] = \pi (\boldsymbol {Y}) \mid \boldsymbol {Y} \in \operatorname {S t} (k, D) \right\}, \tag {2}
$$
where  $\mathrm{St}(k,D) / \mathcal{O}(k)$  is the quotient manifold by the  $k$ -dimensional orthogonal group  $\mathcal{O}(k)$  with the total space  $\mathrm{St}(k,D)$ , and  $\pi (\mathbf{Y})$  is the quotient map  $\pi :\mathrm{St}(k,D)\to \mathrm{St}(k,D) / \mathcal{O}(k)$ .
Tangent Space and Vector Field Let  $T_{[\mathbf{Y}]}\mathrm{Gr}(k,D)$  be the tangent space of  $[\mathbf{Y}] \in \mathrm{Gr}(k,D)$ . As the point  $[\mathbf{Y}]$  is not a matrix,  $T_{[\mathbf{Y}]}\mathrm{Gr}(k,D)$  cannot be represented by a matrix.
Therefore, treating these directly in numerical calculations is challenging. To solve this problem, we can use the representative  $\mathbf{Y} \in \mathrm{St}(k,D)$  for  $[\mathbf{Y}]$  and the tangent vector  $\overline{\xi}_{\mathbf{Y}}^{\mathrm{h}} \in T_{\mathbf{Y}}^{\mathrm{h}}\mathrm{St}(k,D)$ , which is referred to as the horizontal lift of  $\pmb {\xi}_{[\mathbf{Y}]} \in T_{[\mathbf{Y}]} \mathrm{Gr}(k,D)$  for  $\pmb {\xi}_{[\mathbf{Y}]}$ . These facilitate computation with matrices (Absil et al. (2008)).  $T_{\mathbf{Y}}^{\mathrm{h}}\mathrm{St}(k,D)$  is a subspace of the tangent space  $T_{\mathbf{Y}}\mathrm{St}(k,D)$  at  $\mathbf{Y}$ , which is referred to as a horizontal space, and  $\overline{\xi}_{\mathbf{Y}}^{\mathrm{h}}$  is referred to as a horizontal vector. The tangent bundle  $T\mathrm{Gr}(k,D) = \bigcup_{[\mathbf{Y}]\in \mathrm{Gr}(k,D)}T_{[\mathbf{Y}]}\mathrm{Gr}(k,D)$  that sums up the tangent spaces  $T_{[\mathbf{Y}]}\mathrm{Gr}(k,D)$  form vector fields
Figure 1: Conceptual diagram of spaces with horizontal lift.
2When there exists some  $Q\in \mathcal{O}(k)$  such that  $\pmb {X} = \pmb {Y}\pmb{Q}$  , then  $\pmb{X}$  and  $\pmb{Y}$  are defined to be equivalences  $\pmb {X}\sim \pmb{Y}$  . Appendix D.2 provides further details.
$\mathsf{X}:\mathrm{Gr}(k,D)\to T\mathrm{Gr}(k,D)$ . A conceptual diagram of the various spaces is shown in Figure 1. Further details on these concepts can be found in Appendix D.4.
3.2 Manifold Normalizing Flow
Let  $(\mathcal{M},h)$  be a Riemannian manifold. We consider the time evolution of a base point  $x = \gamma (0),\gamma :[0,\infty)\to \mathcal{M}$ , whose velocity is expressed by a vector field  $\mathsf{X}(t,\gamma (t))$ . Intuitively,  $\mathsf{X}(t,\gamma (t))$  represents the direction and speed at which  $\pmb{x}$  moves on the curve  $\gamma (t)$ . Let  $T_{\pmb{x}}\mathcal{M}$  be the tangent space at  $\pmb{x}$  and  $TM = \bigcup_{\pmb{x}\in \mathcal{M}}T_{\pmb{x}}\mathcal{M}$  be the tangent bundle. The time evolution of a point according to a vector field  $\mathsf{X}:\mathcal{M}\times \mathbb{R}\rightarrow TM$  is expressed by the differential equation  $\frac{d\gamma(t)}{dt} = \mathsf{X}(t,\gamma (t)),\gamma (0) = \pmb {x}$ . Let  $F_{\mathsf{X},T}:\mathcal{M}\to \mathcal{M}$  be defined as the map from  $\forall x\in \mathcal{M}$  to the evaluated value at time  $T$  on the curve  $\gamma (t)$  starting at  $\pmb{x}$ . This map  $F_{\mathsf{X},T}$  is known as the flow of  $\mathsf{X}$  (Lee (2003)). Recently, Mathieu & Nickel (2020) introduced the Riemann CNF (RCNF), wherein the random variable  $\pmb {z}(t)\in \mathcal{M}$  is assumed to be time-dependent and the change in its log-likelihood follows the instantaneous change formula for the variable. This is an extension of the CNF (Chen et al. (2018); Grathwohl et al. (2019)) to a Riemannian manifold. Specifically, when  $p_\theta$  is the density parameterized by  $\theta$ , the derivative of the log-likelihood is expressed as  $\frac{d\log p_\theta(z(t))}{dt} = -\mathrm{div}\left(\mathsf{X}_\theta (t,z(t))\right)$ , where  $\mathsf{X}_{\theta}$  is the vector field parameterized by  $\theta$  and  $\mathrm{div}(\cdot)$  is the divergence. By integrating this over time, the sum of the changes in the log-likelihood with flow  $F_{\mathsf{X},t_1\theta}$  can be computed:
$$
\log p _ {\theta} \left(\boldsymbol {z} \left(t _ {1}\right)\right) = \log p \left(F _ {\mathsf {X}, t _ {1} \theta} ^ {- 1} \left(\boldsymbol {z} \left(t _ {1}\right)\right)\right) - \int_ {t _ {0}} ^ {t _ {1}} \operatorname {d i v} \left(\mathsf {X} _ {\theta} \left(t, \boldsymbol {z} (t)\right)\right) d t. \tag {3}
$$
4 Invariant Densities from Grassmann Manifold Flow
This section provides a tractable and efficient method for learning densities on a Grassmann manifold  $\operatorname{Gr}(k, D)$ . The method for preserving the flow on  $\operatorname{Gr}(k, D)$  is non-trivial. Therefore, we derive the following implications.
1. Vector field on  $\operatorname{Gr}(k, D) \Leftrightarrow \operatorname{Flow}$  on  $\operatorname{Gr}(k, D)$  (Proposition 1).
2. Flow on  $\operatorname{Gr}(k, D) \Leftrightarrow \mathbf{Probability}$  density on  $\operatorname{Gr}(k, D)$  (Proposition 2).
3. Construction of a prior probability density for an efficient sampling (Proposition 3).
The essence of the proofs is to show that Corollary 2 (Homogeneity Property (4) with regard to  $\forall Q\in \mathcal{O}(k)$ , which is equivariance in the horizontal space) is satisfied.
$$
\overline {{\boldsymbol {\xi}}} _ {Y Q} ^ {\mathrm {h}} = \overline {{\boldsymbol {\xi}}} _ {Y} ^ {\mathrm {h}} \boldsymbol {Q}, \tag {4}
$$
where  $\overline{\pmb{\xi}}_{\mathbf{Y}}^{\mathrm{h}}$  is a horizontal lift at representative  $\mathbf{Y}$  relative to  $\pmb {\xi}_{[\mathbf{Y}]} \in T_{[\mathbf{Y}]}\operatorname {Gr}(k,D)$ . We defer the proofs of all propositions to Appendix B. These series of propositions show that by using a prior distribution on  $\operatorname {Gr}(k,D)$  that can be easily sampled, a flow that generates a complex probability density distribution on  $\operatorname {Gr}(k,D)$  can be obtained.
4.1 Construction of Flow from Vector Field
To construct flows on  $\mathrm{Gr}(k,D)$ , we use tools in the theory of manifold differential equations. In particular, there is a natural correspondence between the vector fields on  $\mathrm{Gr}(k,D)$  and the flows on  $\mathrm{Gr}(k,D)$ . This is formalized in the following proposition.
Proposition 1. Let  $\mathrm{Gr}(k, D)$  be a Grassmann manifold,  $X$  be any time-dependent vector field on  $\mathrm{Gr}(k, D)$ , and  $F_{\mathsf{X},T}$  be a flow on  $X$ . Let  $\overline{X}$  be any time-dependent horizontal lift and  $\overline{F}_{\overline{X},T}$  be a flow of  $\overline{X}$ .  $\overline{X}$  is a vector field on  $\mathrm{St}(k, D)$  if and only if  $\overline{F}_{\overline{X},T}$  is a flow on  $\mathrm{St}(k, D)$  and satisfies invariance condition  $\overline{X} \sim \overline{X}'$  for all  $\overline{F}_{\overline{X},T} \sim \overline{F}_{\overline{X}',T}$ . Therefore,  $X$  is a vector field on  $\mathrm{Gr}(k, D)$  if and only if  $F_{\mathsf{X},T} := \left[\overline{F}_{\overline{\mathsf{X}},T}\right]$  is a flow on  $\mathrm{Gr}(k, D)$ , and vice versa.
Algorithm 1 Random Sampling from  $p_{\mathrm{Gr}(k,D)}([X];[M],U,V)$
Require: A mean matrix  $M \in \mathrm{St}(k, D)$ , a rows covariance matrix  $U \in \mathbb{R}^{D \times D}$  and a columns covariance matrix  $V \in \mathbb{R}^{k \times k}$ .
1: Sample a  $\operatorname{Vec}(\mathbf{Z}) \in \mathbb{R}^{Dk}$  from Gaussian Distribution  $\mathcal{N}_{Dk}(\mathbf{0},\mathbf{V} \otimes \mathbf{U})$  and reshape to  $\mathbf{Z} \in \mathbb{R}^{D \times k}$ .
2: Compute a projected horizontal vector  $\overline{\pmb{\xi}}_M^{\mathrm{h}} = \pmb {Z} - \pmb {M}\left(\pmb {M}^\top \pmb {Z}\right)\in T_M^{\mathrm{h}}\operatorname {St}(k,D)$
3: Compute a representative  $\mathbf{Y} = \overline{R}_M\left(\overline{\pmb{\xi}}_M^{\mathrm{h}}\right) = M + \overline{\pmb{\xi}}_M^{\mathrm{h}} - \left(\frac{1}{2} M + \frac{1}{4}\overline{\pmb{\xi}}_M^{\mathrm{h}}\right)\left(I_k + \frac{1}{4}\overline{\pmb{\xi}}_M^{\mathrm{h}\top}\overline{\pmb{\xi}}_M^{\mathrm{h}}\right)^{-1}\overline{\pmb{\xi}}_M^{\mathrm{h}\top}\overline{\pmb{\xi}}_M^{\mathrm{h}}$  of the equivalence class  $[\mathbf{Y}]\in \operatorname {Gr}(k,D)$
4.2 Construction of Probability Densities with Flow
We show that the flow on  $\mathrm{Gr}(k,D)$  induces density on  $\mathrm{Gr}(k,D)$ .
Proposition 2. Let  $\mathrm{Gr}(k, D)$  be a Grassmann manifold. Let  $p$  be the probability density on  $\mathrm{Gr}(k, D)$  and  $F$  be the flow on  $\mathrm{Gr}(k, D)$ . Suppose  $\overline{p}$  is a density on  $\mathrm{St}(k, D)$  and  $\overline{F}$  is a flow on  $\mathrm{St}(k, D)$ . Then, the distribution  $\overline{p}_{\overline{F}}$  after transformations by  $\overline{F}$  is also a density on  $\mathrm{St}(k, D)$ . Further, the invariance condition  $\overline{p}_{\overline{F}} \sim \overline{p}_{\overline{F}'}$  is satisfied for all  $\overline{F} \sim \overline{F}'$ . Therefore,  $p_{F} := [\overline{p}_{\overline{F}}]$  is a distribution on  $\mathrm{Gr}(k, D)$ .
In the context of the RCNF, Proposition 2 implies that the application of a flow on  $\mathrm{Gr}(k,D)$  to a prior distribution on  $\mathrm{Gr}(k,D)$  results in a probability density on  $\mathrm{Gr}(k,D)$ . Thus, the problem of constructing a probability density on  $\mathrm{Gr}(k,D)$  is reduced to that of constructing a vector field.
4.3 Prior Probability Density Function
To construct a flow on  $\mathrm{Gr}(k, D)$ , a prior distribution that is easy to sample as a basis for the transformation is required, although the method for constructing such a distribution is non-trivial. In this study, a distribution based on the matrix-variate Gaussian distribution is introduced as a prior on  $\mathrm{Gr}(k, D)$  that is easy to sample, and a flow on  $\mathrm{Gr}(k, D)$  is constructed.
Proposition 3. The distribution  $p_{\mathrm{Gr}(k,D)}$  on a Grassmann manifold  $\mathrm{Gr}(k,D)$  based on the matrix-variate Gaussian distribution  $\mathcal{MN}$  can be expressed as follows.
$$
p _ {\operatorname {G r} (k, D)} ([ \boldsymbol {X} ]; [ \boldsymbol {M} ], \boldsymbol {U}, \boldsymbol {V}) = V _ {\operatorname {G r} (k, D)} \mathcal {M N} \left(\overline {{\boldsymbol {\xi}}} _ {M} ^ {\mathrm {h}}; \boldsymbol {0}, \boldsymbol {U}, \boldsymbol {V}\right) \left| \det  \left(\nabla_ {\overline {{\boldsymbol {\xi}}} _ {M} ^ {\mathrm {h}}} \bar {R} _ {M}\right) \right|, \tag {5}
$$
where  $M$  is an orthonormal basis matrix denoting the mean of the distribution,  $\mathbf{U}$  is a positive definite matrix denoting the row directional variance,  $\mathbf{V}$  is a positive definite matrix denoting the column directional variance, and  $\overline{\xi}_M^{\mathrm{h}}$  is a random sample from  $\mathcal{MN}$  in an  $(D - k)\times k$ -dimensional horizontal space  $T_{M}^{\mathrm{h}}\operatorname {St}(k,D)$ .  $V_{\mathrm{Gr}(k,D)}$  denotes the total volume of  $\mathrm{Gr}(k,D)$  defined by (113),  $\overline{R}_M$  denotes the horizontal retraction at  $M$ , and  $\left|\operatorname *{det}\left(\nabla_{\overline{\xi}_M^{\mathrm{h}}}^{\mathrm{h}}\overline{R}_M\right)\right|$  denotes the Jacobian.
A retraction is a map for communicating data between a manifold and its tangent bundles and is a first-order approximation of an exponential map (Zhu & Sato (2021)). Various methods of retraction have been proposed at (Absil et al. (2008); Fiori et al. (2015); Zhu & Sato (2021)); in particular, the one based on the Cayley transform is differentiable and does not require matrix decomposition. We use (40) as a Cayley transform based horizontal retraction. Further details are provided in Appendix D.6.
5 Learning Probability Densities with Flow
5.1 Training Paradigms
Using the results of Section 4, a flow model on a Grassmann manifold  $\mathrm{Gr}(k,D)$  is constructed. Herein, the flow model on  $\mathrm{Gr}(k,D)$  is expressed as  $\mathbf{GrCNF}$ . In the proposed GrCNF, the probability density function in Section 4.3 is first constructed as a prior distribution. Subsequently, the vector field  $\mathsf{X}_{\theta}:\mathrm{Gr}(k,D)\times \mathbb{R}\to T\mathrm{Gr}(k,D)$  that generates the flow model  $F_{\mathsf{X}_{\theta},T}$  is constructed using a neural network, wherein stepwise integration on the manifold occurs in accordance with (3). The
Figure 2: Conceptual diagram of the vector field calculation procedure. HorP denotes the horizontal projection layer, MILs denotes the multiple intermediate layers, and Grad denotes the horizontal lift layer. The sequence of procedure represents that, given an input of  $\mathbf{Y} \in [\mathbf{Y}]$ , a horizontal vector  $\overline{\pmb{\xi}}_{\mathbf{Y}}^{\mathrm{h}}$  which is equivalent to determining  $\pmb{\xi}_{[\mathbf{Y}]}$  since  $\overline{\pmb{\xi}}_{\mathbf{Y}}^{\mathrm{h}}$  corresponds one-to-one with  $\pmb{\xi}_{[\mathbf{Y}]}$ , is obtained as a result.