The autoencoder model typically uses an encoder to map data to a lower dimensional latent space and a decoder to reconstruct it. However, relying on an encoder for inversion can lead to suboptimal representations, particularly limiting in physical sciences where precision is key. We introduce a decoder-only method using gradient flow to directly encode data into the latent space, defined by ordinary differential equations (ODEs). This approach eliminates the need for approximate encoder inversion. We train the decoder via the adjoint method and show that costly integrals can be avoided with minimal accuracy loss. Additionally, we propose a $2^{nd}$ order ODE variant, approximating Nesterov's accelerated gradient descent for faster convergence. To handle stiff ODEs, we use an adaptive solver that prioritizes loss minimization, improving robustness. Compared to traditional autoencoders, our method demonstrates explicit encoding and superior data efficiency, which is crucial for data-scarce scenarios in the physical sciences. Furthermore, this work paves the way for integrating machine learning into scientific workflows, where precise and efficient encoding is critical. \footnote{The code for this work is available at \url{https://github.com/k-flouris/gfe}.}
翻译:自编码器模型通常使用编码器将数据映射到低维潜在空间,并使用解码器进行重构。然而,依赖编码器进行逆映射可能导致次优表示,在精度至关重要的物理科学中尤其受限。我们提出一种仅使用解码器的方法,通过梯度流将数据直接编码到由常微分方程(ODEs)定义的潜在空间。该方法无需近似编码器逆映射。我们通过伴随方法训练解码器,并证明在精度损失最小的情况下可避免计算代价高昂的积分。此外,我们提出一种二阶ODE变体,近似涅斯捷罗夫加速梯度下降以实现更快收敛。为处理刚性ODE,我们采用以损失最小化为优先的自适应求解器,从而提升鲁棒性。与传统自编码器相比,我们的方法实现了显式编码和更优的数据效率,这对物理科学中数据稀缺的场景至关重要。此外,本研究为将机器学习集成到科学工作流程铺平了道路,其中精确高效的编码至关重要。\footnote{本工作的代码发布于 \url{https://github.com/k-flouris/gfe}。}