% \documentclass{uai2022} % for initial submission
\documentclass[accepted]{uai2022} 
%% In your camera-ready you should use the 'accepted' parameter. This shows the authors and how an accepted paper will look like. The footer is 'Acccepted for X'. In the final version, the proceedings chairs will add the page numbers for PMLR and the final footer will be 'Proceedings of X'.
%
%% There is a class option to choose the math font
% \documentclass[mathfont=ptmx]{uai2022} % ptmx math instead of Computer
                                         % Modern (has noticable issues)
% \documentclass[mathfont=newtx]{uai2022} % newtx fonts (improves upon
                                          % ptmx; less tested, no support)
% NOTE: Only keep *one* line above as appropriate, as it will be replaced
%       automatically for papers to be published. Do not make any other
%       change above this note for an accepted version.

%% Choose your variant of English; be consistent
\usepackage[american]{babel}
% \usepackage[british]{babel}

%% Some suggested packages, as needed:
\usepackage{natbib} % has a nice set of citation styles and commands
    % \bibliographystyle{plainnat}
\renewcommand{\bibsection}{\subsubsection*{References}}
\usepackage{mathtools}
\usepackage[utf8]{inputenc} % allow utf-8 input
\usepackage[T1]{fontenc}    % use 8-bit T1 fonts
\usepackage{hyperref}       % hyperlinks
\usepackage{url}            % simple URL typesetting
\usepackage{booktabs}       % professional-quality tables
\usepackage{amsfonts}       % blackboard math symbols
\usepackage{nicefrac}       % compact symbols for 1/2, etc.
\usepackage{microtype}      % microtypography
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\definecolor{crimson}{RGB}{220, 20, 60}
\definecolor{indigo}{RGB}{75, 0, 30}
\usepackage{wrapfig}
\usepackage{subfig}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{bbm}

\newcommand{\R}{\mathbb{R}}
\newcommand{\Det}{\mbox{Det}}
\newcommand{\proj}{\mathbb{P}}
\newcommand{\Ran}{\mbox{Ran}}
\DeclareMathOperator*{\argmax}{argmax}
\DeclareMathOperator*{\argmin}{argmin}

\usepackage[inline]{enumitem}

\makeatletter
\newcommand{\printfnsymbol}[1]{%
  \textsuperscript{\@fnsymbol{#1}}%
}
\makeatother
\title{ VQ-Flows: Vector Quantized Local Normalizing Flows \\ Supplementary Material}


% \author[1]{Sahil Sidheekh\printfnsymbol{1}}
% \author[2]{Chris B. Dock\thanks{Equal contribution}}
% \author[1]{Tushar Jain}
% \author[2]{Radu Balan}
% \author[1]{Maneesh K. Singh}
% % Add affiliations after the authors

% \affil[1]{%
%     Verisk Analytics
% }
% \affil[2]{%
%     University of Maryland, College Park
% }
\author[1]{Sahil Sidheekh\printfnsymbol{1}}
\author[2]{Chris B. Dock\thanks{Equal contribution}}
\author[1]{Tushar Jain}
\author[2]{Radu Balan}
\author[3]{Maneesh K. Singh\thanks{Work was performed while at Verisk Analytics.}}
% Add affiliations after the authors

\affil[1]{%
    Verisk Analytics
}
\affil[2]{%
    University of Maryland, College Park
}
\affil[3]{%
    Motive Technologies, Inc.
}



\begin{document}
\maketitle
This document presents the discussions and results left out in the main paper due to space constraints. We begin with the details regarding the considered data distributions. We then present quantitative and qualitative results left out from the main paper. We finally conclude with further information regarding the experiments and implementation. 

\section{Data Generation}
We generated and experimented with ten 3-dimensional data distributions over manifolds of varying complexity. Figure \ref{3D-data} provides the visualizations for each of the considered datasets. We elaborate more on the equations used to generate data from each of these distribution below.
\begin{figure*}[h!]
    \centering
    \begin{tabular}{cc}
    \subfloat[Spherical]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_SPHERICAL.png}}
    \subfloat[Helix]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_HELIX.png}}
    \subfloat[Lissajous]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_LISSAJOUS.png}}
    \subfloat[Twisted-Eight]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_TwistedEIGHT.png}}
    \subfloat[Knotted]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_KNOTTED.png}}\\
    \subfloat[InterlockedCircles]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_InterlockedCIRCLES.png}}
    \subfloat[Non-Knotted]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_NonKNOTTED.png}}
    \subfloat[Bent-Lissajous]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_BentLISSAJOUS.png}}
    \subfloat[Disjoint-Circles]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_DisjointCIRCLES.png}}
    \subfloat[Star]{\includegraphics[width = 0.20\linewidth]{figures/datasets/realdata_STAR.png}}
    \end{tabular}
    \caption{Visualizations of the considered 3-dimensional data distributions}
    \label{3D-data}
\end{figure*}

\subsection{Spherical}
We considered three mixture of Gaussians in the 3-dimensional space with parameters $(\mu_1,\sigma)$,$(\mu_2,\sigma)$,$(\mu_3,\sigma)$ respectively. Samples ($x$) drawn uniformly from each of the three Gaussians were then projected on to the unit sphere in 3D as $x / ||x||$. The means ($\mu_i$) were sampled from a standard normal distribution and the standard deviation was set to 0.2. The exact parameter values used are: $\mu_1=(-0.15,-0.77, 0.94)$, $\mu_2=(0.79,-0.75,-0.02)$, $\mu_3=(0.04,0.40,1.31)$ and $\sigma=0.2$.

\subsection{Helix}
To generate the Helix data distribution, we first sample $\theta \in \R$ uniformly from $[0,8\pi]$. For each $\theta$, we then generate the datapoint $\mathbf{x}=(x,y,z)+\epsilon$, where $\epsilon \sim N(0,\sigma=0.01)$ and $-$
\begin{itemize*}
    \item $x = \theta$
    \item $y = \cos\theta$
    \item $z = \sin\theta$
\end{itemize*}

\subsection{Lissajous}
To generate the Lissajous data distribution, we first sample $\theta \in \R$ uniformly from $[-\pi,\pi]$. For each $\theta$, we then generate the datapoint $\mathbf{x}=(x,y,z)+\epsilon$, where $\epsilon \sim N(0,\sigma=0.01)$ and $-$ 
\begin{itemize*}
    \item $x = \cos\theta$
    \item $y = 0$
    \item $z = \sin(2\theta)$
\end{itemize*}

\subsection{Twisted-Eight}
To generate the Twisted-Eight data distribution, we sample $\theta \in \R$ uniformly from $[-\pi,\pi]$. For each $\theta$, we then generate two datapoints $\mathbf{x_1}=(x_1,y_1,z_1)+\epsilon$ and $\mathbf{x_2}=(x_2,y_2,z_2)+\epsilon$, where $\epsilon \sim N(0,\sigma=0.01)$ and $-$ 
\begin{itemize*}
    \item $x_1 = \sin\theta$
    \item $y_1 = \cos\theta$
    \item $z_1 = 0$
\end{itemize*}.  
\\
\begin{itemize*}
    \item $x_2 = 2+\sin\theta$
    \item $y_2 = 0$
    \item $z_2 = \cos\theta$
\end{itemize*}\\
The final distribution is the union of the distributions over $\mathbf{x_1}$ and $\mathbf{x_2}$.

\subsection{Knotted}
To generate the Knotted data distribution, we first sample $\theta \in \R$ uniformly from $[-\pi,\pi]$. For each $\theta$, we then generate the datapoint $\mathbf{x}=(x,y,z)+\epsilon$, where $\epsilon \sim N(0,\sigma=0.01)$ and $-$ 
\begin{itemize*}
    \item $x = \sin\theta + 2\sin2\theta$
    \item $y = \cos\theta - 2\cos2\theta$
    \item $z = \sin3\theta$
\end{itemize*}

\subsection{Interlocked-Circles}
To generate the Interlocked-Circles data distribution, we sample $\theta \in \R$ uniformly from $[-\pi,\pi]$. For each $\theta$, we then generate  two datapoints $\mathbf{x_1}=(x_1,y_1,z_1)+\epsilon$ and $\mathbf{x_2}=(x_2,y_2,z_2)+\epsilon$, where $\epsilon \sim N(0,\sigma=0.01)$ and $-$ 
\begin{itemize*}
    \item $x_1 = \sin\theta$
    \item $y_1 = \cos\theta$
    \item $z_1 = 0$
\end{itemize*}.  
\\
\begin{itemize*}
    \item $x_2 = 1+\sin\theta$
    \item $y_2 = 0$
    \item $z_2 = \cos\theta$
\end{itemize*}\\
The final distribution is the union of the distributions over $\mathbf{x_1}$ and $\mathbf{x_2}$.


\subsection{Non-Knotted}
To generate the Non-Knotted data distribution, we first sample $\theta \in \R$ uniformly from $[-\pi,\pi]$. For each $\theta$, we then generate the datapoint $\mathbf{x}=(x,y,z)+\epsilon$, where $\epsilon \sim N(0,\sigma=0.01)$ and $-$
\begin{itemize}
    \item $x = (1 + 0.5\cos3\theta) \cos2\theta$
    \item $y = (1 + 0.5\cos3\theta) \sin2\theta$
    \item $z = 0.5\sin\theta$
\end{itemize}


\subsection{Bent-Lissajous}
To generate the Bent-Lissajous data distribution, we first sample $\theta \in \R$ uniformly from $[-\pi,\pi]$. For each $\theta$, we then generate the datapoint $\mathbf{x}=(x,y,z)+\epsilon$, where $\epsilon \sim N(0,\sigma=0.01)$ and $-$
\begin{itemize*}
    \item $x = \sin2\theta$
    \item $y = \cos\theta$
    \item $z = \cos2\theta$
\end{itemize*}


\subsection{Disjoint-Circles}
To generate the Disjoint-Circles data distribution, we sample $\theta \in \R$ uniformly from $[-\pi,\pi]$. For each $\theta$, we then generate  two datapoints $\mathbf{x_1}=(x_1,y_1,z_1)+\epsilon$ and $\mathbf{x_2}=(x_2,y_2,z_2)+\epsilon$, where $\epsilon \sim N(0,\sigma=0.01)$ and $-$ 
\begin{itemize*}
    \item $x_1 = -1 + \sin\theta$
    \item $y_1 = -1 + \sin\theta$
    \item $z_1 = -1 + \sin\theta$
\end{itemize*}.  
\\
\begin{itemize*}
    \item $x_2 = 2+\sin\theta$
    \item $y_2 = 1 + 2\cos\theta$
    \item $z_2 = 1 + 2\cos\theta$
\end{itemize*}\\
The final distribution is the union of the distributions over $\mathbf{x_1}$ and $\mathbf{x_2}$.


\subsection{Star}
To generate the Star data distribution, we sample $\theta \in \R$ uniformly from $[-\pi,\pi]$. For each $\theta$, we then generate three datapoints $\mathbf{x_1}=(x_1,y_1,z_1)+\epsilon$, $\mathbf{x_2}=(x_2,y_2,z_2)+\epsilon$, and  $\mathbf{x_3}=(x_3,y_3,z_3)+\epsilon$ where $\epsilon \sim N(0,\sigma=0.01)$ and $-$ 
\begin{itemize*}
    \item $x_1 = \sin\theta$
    \item $y_1 = 0 $
    \item $z_1 = 0$
\end{itemize*}.  
\\
\begin{itemize*}
    \item $x_2 = 0$
    \item $y_2 = \sin\theta$
    \item $z_2 = 0$
\end{itemize*}
\\\begin{itemize*}
    \item $x_3 = 0$
    \item $y_3 = 0$
    \item $z_3 = \sin\theta$
\end{itemize*}\\
The final distribution is the union of the distributions over $\mathbf{x_1}$, $\mathbf{x_2}$ and $\mathbf{x_3}$.

\section{Additional Results}
\subsection{Density Estimation and Sample Generation}
We provide quantitative evaluations for density estimation and sample generation over four additional 3-dimensional data distribution discussed Section 1 in Table \ref{density-est-quant} and Table \ref{sample-gen-quantitative} respectively. We can observe that the models trained with the augmentation of our framework achieves better performance for both density estimation and sample generation than their corresponding baselines. We also validate and compare the goodness of the generated samples through qualitative visualizations in Figures \ref{qual-sample-begin} - \ref{qual-sample-end}. Note that CEFs perform poorer than the other baselines because they consist of a 2-dimensional base flow which is then raised to the 3-dimensional space using a conformal embedding. The other flows (RealNVP and MAF) are, on the other hand, trained in the 3-dimensional space. A particularly interesting observation here is that the data distributions learned by CEF without VQ-augmentation tend to be planar in the 3-dimensional space. This demonstrates the limited expressivity of global conformal dimension raising transformations. The local conformal transformations obtained with the augmentation of our framework are, on the other hand, able to better capture the global structure of the data distribution and generate better samples. 

\subsection{Gaussianization}
The ability of a normalizing flow to generate high fidelity samples from given data distribution is also governed by whether the latent space learned through the flow transformation matches the assumed prior. For a flow with a Normal distribution assumed in the latent space, this means that the forward flow transformations should effectively  Gaussianize the given data distribution. In Figures \ref{gauss-begin} to \ref{gauss-end} we thus visualize and compare how different data distributions are transformed gradually by each layer of a RealNVP flow trained with and without the augmentation of our proposed framework. We can observe that the models trained with VQ-augmentation learn to better transform the input space to match the assumed prior. As a result, they are also able to generate better samples.

\section{Implementation Details}

\begin{figure*}[h!]
    \centering
     \begin{tabular}{cc}     
    \subfloat[Forward Transformation]{\includegraphics[width=0.3\linewidth]{figures/diagrams/cond_realnvp_forward.pdf}} \hspace{50pt}
    \subfloat[Inverse Transformation]{ \includegraphics[width=0.3\linewidth]{figures/diagrams/cond_realnvp_inverse.pdf}}
    \end{tabular}
    \caption{Parametrizing the conditional coupling layer transformation.}
    \label{fig:cond-transform}
\end{figure*}

To experimentally validate the efficacy of the proposed framework, we consider the ten datasets presented in Section 1. Each dataset consists of $10,000$ datapoints, $5,000$ of which we use for training and $2,500$ each for validation and testing. We train three different normalizing flows - RealNVP, Masked Autoregressive Flows (MAF) and Conformal Embedding Flows (CEF).  We define each model using $5$ flow transformations and train them for $100$ epochs using an Adam optimizer with a learning rate of $1e-4$ and a batch size of $128$. We follow the same hyperparameters for a base flow and its VQ-counterpart without any tuning and report the performance averaged over $5$ independent trials. 
 We early stop if the validation performance does not improve over 10 epochs. The architectural details pertaining to each of the models are given below: 

\textbf{RealNVP}- We compose the RealNVP flow using $5$ coupling layer transformations, each followed by a batch-normalization. We use feedforward networks with $2$ hidden layers, each consisting of $128$ hidden nodes as the non-linear transformation to obtain the scaling and translation parameters. We use $tanh$ as the activation function for the scale network and $relu$ as the activation function for the translation network.


\textbf{MAF}- We compose the MAF flow using $5$ masked auto-regressive layer transformations, each followed by a batch-normalization. In each layer, we use a masked feedforward network with $1$ hidden layer, consisting of $128$ hidden nodes. We use $relu$ as the activation function for the feedforward network.


\textbf{CEF}-
 We compose the CEF flow  using $5$ coupling layer transformations in 2-dimensional space, followed by the conformal transformation that raises the dimension to $3$. We use the same architecture reported above for RealNVP in the coupling transforms. The conformal embedding is parameterized as given in \cite{ross2021conformal}, using a composition of Scaling, Shifting, Orthogonal, Special Conformal and Padding transformations. As CEF is an injective flow, we follow \cite{ross2021conformal} and train it to minimize the reconstruction loss for 20 epochs prior to employing the maximum likelihood training.

\textbf{VQ-\textit{flow}}-
We parameterize the encoder and decoder of the VQ-AE using feedforward neural networks. In each network, we use $4$ hidden layers each consisting of $128$ hidden nodes followed by batch-normalization and a leaky$-relu$ activation with negative slope of $0.2$.
To learn the partitioning of the data manifold, we use a latent dimension of $2$ with $k=32$ learnable quantized centers. We train the VQ-AE for $50$ epochs to minimize the reconstruction loss using an Adam optimizer with a learning rate of $1e-4$ and batch size of $128$.

To define the conditional normalizing flow, we use the parameterization given in \cite{lu2020conditional,maf}. The key idea is to incorporate the quantized center as additional conditioning information to the unrestricted (non-invertible) neural network used in the coupling and auto-regressive transformations. Figure  \ref{fig:cond-transform} demonstrates the construction of such a conditional coupling layer transform. To define conditional conformal transformations, we use $k$ conformal embeddings and index into it using the quantized center. We believe that we can extend our framework to other arbitrary flows by adapting the conditional flow transformations defined in \cite{cornish2020relaxing}, which we leave to future work.

\begin{figure*}[h!]
    \centering
    \includegraphics[width=\linewidth]{figures/gaussianize/gaussianization_BentLISSAJOUS_realnvp_VQ-False_SOFT-False-Compact-False.png}\\
    \includegraphics[width=\linewidth]{figures/gaussianize/gaussianization_BentLISSAJOUS_realnvp_VQ-True_SOFT-False-Compact-True.png}
    \caption{Visualization of the latent transformation achieved using RealNVP (Top Row) and VQ-RealNVP (Bottom Row) on the Bent-Lissajous data distribution.}
    \label{gauss-begin}
\end{figure*}

\begin{figure*}[h!]
    \centering
    \includegraphics[width=\linewidth]{figures/gaussianize/gaussianization_KNOTTED_realnvp_VQ-False_SOFT-False-Compact-False.png}\\
    \includegraphics[width=\linewidth]{figures/gaussianize/gaussianization_KNOTTED_realnvp_VQ-True_SOFT-False-Compact-True.png}
    \caption{Visualization of the latent transformation achieved using RealNVP (Top Row) and VQ-RealNVP (Bottom Row) on the Knotted data distribution.}
\end{figure*}

\begin{figure*}[h!]
    \centering
    \includegraphics[width=\linewidth]{figures/gaussianize/gaussianization_STAR_realnvp_VQ-False_SOFT-False-Compact-False.png}\\
    \includegraphics[width=\linewidth]{figures/gaussianize/gaussianization_STAR_realnvp_VQ-True_SOFT-False-Compact-True.png}
    \caption{Visualization of the latent transformation achieved using RealNVP (Top Row) and VQ-RealNVP (Bottom Row) on the Star data distribution.}
\end{figure*}

\begin{figure*}[h!]
    \centering
    \includegraphics[width=\linewidth]{figures/gaussianize/gaussianization_SPHERICAL_realnvp_VQ-False_SOFT-False-Compact-False.png}\\
    \includegraphics[width=\linewidth]{figures/gaussianize/gaussianization_SPHERICAL_realnvp_VQ-True_SOFT-False-Compact-False.png}
    \caption{Visualization of the latent transformation achieved using RealNVP (Top Row) and VQ-RealNVP (Bottom Row) on the Spherical data distribution.}
     \label{gauss-end}
\end{figure*}

\begin{table*}[h!]
\centering
\begin{tabular}{@{}cccccc@{}}
\toprule
\textbf{Model} & Non-Knotted   & Bent-Lissajous  & Disjoint-Circles  & Star \\ \midrule
Real NVP       & 0.53 $\pm$ 0.18  & 1.04 $\pm$ 0.22   &  1.71 $\pm$ 0.12     & 3.33 $\pm$ 0.18            \\
VQ-RealNVP     & 2.39 $\pm$ 0.24  & 2.62 $\pm$ 0.13   &  2.71 $\pm$ 0.19     & 4.23 $\pm$ 0.06             \\ \midrule
MAF            & 0.73 $\pm$ 0.18  & 1.48 $\pm$ 0.11   &  1.95 $\pm$ 0.12     & 3.53 $\pm$ 0.03             \\
VQ-MAF         & 2.41 $\pm$ 0.19  & 2.06 $\pm$ 0.12   &  2.87 $\pm$ 0.07     & 3.59 $\pm$ 0.12             \\ \midrule
CEF            & -0.46 $\pm$ 0.13 & -0.51 $\pm$ 0.16  & -0.71 $\pm$ 0.21     & 1.26 $\pm$ 0.11             \\
VQ-CEF         & -0.15 $\pm$ 0.09 & -0.54 $\pm$ 0.22  & 0.24 $\pm$ 0.15      & 1.32 $\pm$ 0.02             \\ \bottomrule
\end{tabular}%
\caption{ Quantitative performance evaluation for \textbf{Density Estimation} in terms of the test log-likelihood in nats (higher the better) on the toy 3D Datasets. The values are averaged across 5 independent trials, $\pm$ represents the 95\% confidence interval.}
\label{density-est-quant}
\end{table*}


\begin{table*}[t!]
\centering
\begin{tabular}{@{}cccccl@{}}
\toprule
\textbf{Model} & Non-Knotted   & Bent-Lissajous & Disjoint-Circles  & Star \\ \midrule
Real NVP       & 0.53  $\pm$  0.18  & 1.04  $\pm$  0.22     &  1.71  $\pm$  0.12     & 3.33  $\pm$  0.18            \\
VQ-RealNVP     & 2.39  $\pm$  0.24  & 2.62  $\pm$  0.13     &  2.71  $\pm$  0.19     & 4.23  $\pm$  0.06             \\ \midrule
MAF            & 0.73  $\pm$  0.18  & 1.48  $\pm$  0.11     &  1.95  $\pm$  0.12     & 3.53  $\pm$  0.03             \\
VQ-MAF         & 2.41  $\pm$  0.19  & 2.06  $\pm$  0.12     &  2.87  $\pm$  0.07     & 3.59  $\pm$  0.12             \\ \midrule
CEF            & -0.46  $\pm$  0.13 & -0.51  $\pm$  0.16    & -0.71  $\pm$  0.21     & 1.26  $\pm$  0.11             \\
VQ-CEF         & -0.15  $\pm$  0.09 & -0.54  $\pm$  0.22    & 0.24  $\pm$  0.15      & 1.32  $\pm$  0.02             \\ \bottomrule
\end{tabular}
\caption{ Quantitative performance evaluation for \textbf{Sample Generation} in terms of the log-likelihood in nats (higher the better) on the toy 3D Datasets. The values are averaged across 5 independent trials, $\pm$ represents the 95\% confidence interval.}
\label{sample-gen-quantitative}
\end{table*}



\begin{figure*}[h!]
    \centering
    \begin{tabular}{cc}     \subfloat[InterlockedCircles]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_InterlockedCIRCLES.png}}
    \subfloat[Bent-Lissajous]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_BentLISSAJOUS.png}}
    \subfloat[Non-Knotted]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_NonKNOTTED.png}}
    \subfloat[Disjoint-Circles]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_DisjointCIRCLES.png}}
    \subfloat[Star]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_STAR.png}}
    \end{tabular}\\
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_InterlockedCIRCLES_realnvp_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_BentLISSAJOUS_realnvp_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_NonKNOTTED_realnvp_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_DisjointCIRCLES_realnvp_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_STAR_realnvp_VQ-False_SOFT-False.png} \\ 
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_InterlockedCIRCLES_realnvp_VQ-True_SOFT-False.png} 
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_BentLISSAJOUS_realnvp_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_NonKNOTTED_realnvp_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_DisjointCIRCLES_realnvp_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_STAR_realnvp_VQ-True_SOFT-False.png}
    \caption{Qualitative visualization of the samples generated by a classical flow - \textbf{RealNVP} (Middle Row) and its VQ-counterpart (Bottom Row) trained on Toy 3D data distributions (Top Row).}
    \label{qual-sample-begin}
\end{figure*}


\begin{figure*}[h!]
    \centering
    \begin{tabular}{ccccc}
    \subfloat[Spherical]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_SPHERICAL.png}}
    \subfloat[Helix]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_HELIX.png}}
    \subfloat[Lissajous]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_LISSAJOUS.png}}
    \subfloat[Twisted-Eight]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_TwistedEIGHT.png}}
    \subfloat[Knotted]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_KNOTTED.png}}
    \end{tabular}\\
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_SPHERICAL_maf_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_HELIX_maf_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_LISSAJOUS_maf_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_TwistedEIGHT_maf_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_KNOTTED_maf_VQ-False_SOFT-False.png}\\
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_SPHERICAL_maf_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_HELIX_maf_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_LISSAJOUS_maf_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_TwistedEIGHT_maf_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_KNOTTED_maf_VQ-True_SOFT-False.png}
    \caption{Qualitative visualization of the samples generated by a classical flow - \textbf{MAF} (Middle Row) and its VQ-counterpart (Bottom Row) trained on Toy 3D data distributions (Top Row).}
\end{figure*}


\begin{figure*}[h!]
    \centering
    \begin{tabular}{cc}     \subfloat[InterlockedCircles]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_InterlockedCIRCLES.png}}
    \subfloat[Bent-Lissajous]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_BentLISSAJOUS.png}}
    \subfloat[Non-Knotted]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_NonKNOTTED.png}}
    \subfloat[Disjoint-Circles]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_DisjointCIRCLES.png}}
    \subfloat[Star]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_STAR.png}}
    \end{tabular}\\
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_InterlockedCIRCLES_maf_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_BentLISSAJOUS_maf_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_NonKNOTTED_maf_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_DisjointCIRCLES_maf_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_STAR_maf_VQ-False_SOFT-False.png} \\ 
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_InterlockedCIRCLES_maf_VQ-True_SOFT-True.png} 
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_BentLISSAJOUS_maf_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_NonKNOTTED_maf_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_DisjointCIRCLES_maf_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_STAR_maf_VQ-True_SOFT-False.png}
    \caption{Qualitative visualization of the samples generated by a classical flow - \textbf{MAF} (Middle Row) and its VQ-counterpart (Bottom Row) trained on Toy 3D data distributions (Top Row).}
\end{figure*}


%CEF Results

\begin{figure*}[h!]
    \centering
    \begin{tabular}{ccccc}
    \subfloat[Spherical]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_SPHERICAL.png}}
    \subfloat[Helix]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_HELIX.png}}
    \subfloat[Lissajous]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_LISSAJOUS.png}}
    \subfloat[Twisted-Eight]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_TwistedEIGHT.png}}
    \subfloat[Knotted]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_KNOTTED.png}}
    \end{tabular}\\
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_SPHERICAL_cef_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_HELIX_cef_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_LISSAJOUS_cef_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_TwistedEIGHT_cef_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_KNOTTED_cef_VQ-False_SOFT-False.png}\\
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_SPHERICAL_cef_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_HELIX_cef_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_LISSAJOUS_cef_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_TwistedEIGHT_cef_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_KNOTTED_cef_VQ-True_SOFT-False.png}
    \caption{Qualitative visualization of the samples generated by \textbf{CEF} (Middle Row) and its VQ-counterpart (Bottom Row) trained on Toy 3D data distributions (Top Row). CEF consists of a 2-dimensional RealNVP flow post composed with a conformal embedding that raises it to 3D. }
\end{figure*}


\begin{figure*}[h!]
    \centering
    \begin{tabular}{cc}     \subfloat[InterlockedCircles]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_InterlockedCIRCLES.png}}
    \subfloat[Bent-Lissajous]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_BentLISSAJOUS.png}}
    \subfloat[Non-Knotted]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_NonKNOTTED.png}}
    \subfloat[Disjoint-Circles]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_DisjointCIRCLES.png}}
    \subfloat[Star]{\includegraphics[width = 0.2\linewidth]{figures/datasets/realdata_STAR.png}}
    \end{tabular}\\
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_InterlockedCIRCLES_cef_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_BentLISSAJOUS_cef_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_NonKNOTTED_cef_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_DisjointCIRCLES_cef_VQ-False_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/samples/generated_data_STAR_cef_VQ-False_SOFT-False.png} \\ 
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_InterlockedCIRCLES_cef_VQ-True_SOFT-False.png} 
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_BentLISSAJOUS_cef_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_NonKNOTTED_cef_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_DisjointCIRCLES_cef_VQ-True_SOFT-False.png}
    \includegraphics[width = 0.195\linewidth]{figures/gen_data/generated_data_STAR_cef_VQ-True_SOFT-False.png}
    \caption{Qualitative visualization of the samples generated by  \textbf{CEF} (Middle Row) and its VQ-counterpart (Bottom Row) trained on Toy 3D data distributions (Top Row). CEF consists of a 2-dimensional RealNVP flow post composed with a conformal embedding that raises it to 3D. }
    \label{qual-sample-end}
\end{figure*}

\bibliographystyle{unsrt}  
\bibliography{sidheekh_534-supp}

\end{document}
