We consider the vector embedding problem. We are given a finite set of items, with the goal of assigning a representative vector to each one, possibly under some constraints (such as the collection of vectors being standardized, i.e., have zero mean and unit covariance). We are given data indicating that some pairs of items are similar, and optionally, some other pairs are dissimilar. For pairs of similar items, we want the corresponding vectors to be near each other, and for dissimilar pairs, we want the corresponding vectors to not be near each other, measured in Euclidean distance. We formalize this by introducing distortion functions, defined for some pairs of the items. Our goal is to choose an embedding that minimizes the total distortion, subject to the constraints. We call this the minimum-distortion embedding (MDE) problem. The MDE framework is simple but general. It includes a wide variety of embedding methods, such as spectral embedding, principal component analysis, multidimensional scaling, dimensionality reduction methods (like Isomap and UMAP), force-directed layout, and others. It also includes new embeddings, and provides principled ways of validating historical and new embeddings alike. We develop a projected quasi-Newton method that approximately solves MDE problems and scales to large data sets. We implement this method in PyMDE, an open-source Python package. In PyMDE, users can select from a library of distortion functions and constraints or specify custom ones, making it easy to rapidly experiment with different embeddings. Our software scales to data sets with millions of items and tens of millions of distortion functions. To demonstrate our method, we compute embeddings for several real-world data sets, including images, an academic co-author network, US county demographic data, and single-cell mRNA transcriptomes.
翻译:我们考虑的是矢量嵌入问题。 我们得到了一组有限的物品, 目标是为每个物体指定一个具有代表性的矢量, 目标可能是在某种限制下( 例如, 矢量的收集正在标准化, 也就是说, 零平均值和单位变量 ) 。 我们得到的数据显示, 某些对项是相似的, 还有一些其他配对是不同的。 对于相近的物品, 我们希望对应的矢量彼此相近, 我们希望对应的矢量不会相互接近, 在 Euclidean 距离下测量。 我们通过引入扭曲功能, 定义某些物品的对等( 比如, 矢量的矢量的收集, 即: 标准化的矢量的收集。 我们的目标是选择一个嵌入最小的矢量的矢量, 选择最小化的对数( MDE ) 嵌入的问题。 MDE 框架简单但很一般。 它包括多种嵌入方法, 比如光谱嵌入、 主要组件分析、 多层面的组合、 缩放方法( 如Isomap and UMAP ) 、 硬质版版版版版版版版的对等数据库数据。