Quadric Hypersurface Intersection for Manifold Learning in Feature Space

Fedor Pavutnitskiy, Sergei O. Ivanov, Evgeniy Abramov, Viacheslav Borovitskiy, Artem Klochkov, Viktor Vyalov, Anatolii Zaikovskii, Aleksandr Petiushko

Abstract

The knowledge that data lies close to a particular submanifold of the ambient Euclidean space may be useful in a number of ways. For instance, one may want to automatically mark any point far away from the submanifold as an outlier or to use the geometry to come up with a better distance metric. Manifold learning problems are often posed in a very high dimension, e.g. for spaces of images or spaces of words. Today, with deep representation learning on the rise in areas such as computer vision and natural language processing, many problems of this kind may be transformed into problems of moderately high dimension, typically of the order of hundreds. Motivated by this, we propose a manifold learning technique suitable for moderately high dimension and large datasets. The manifold is learned from the training data in the form of an intersection of quadric hypersurfaces—simple but expressive objects. At test time, this manifold can be used to introduce a computationally efficient outlier score for arbitrary new data points and to improve a given similarity metric by incorporating the learned geometric structure into it.

Introduction

Deep learning models often map complex inputs, such as faces or text, into high-dimensional feature spaces. According to the manifold hypothesis, this data actually lies on a lower-dimensional structure within that space. Understanding this structure is vital for tasks like Out-of-Distribution (OOD) Detection and Similarity Refinement.

Existing methods often struggle to balance expressivity and scalability. Linear methods like PCA are too simple to capture complex curvatures, while non-linear methods like Isomap or LLE do not scale to millions of points. Kernel PCA is powerful but often lacks a clear "distance-to-manifold" score and can be highly sensitive to outliers during training. This research, presented at AISTATS 2022, proposes a "Goldilocks" solution: modeling manifolds as the intersection of multiple quadric hypersurfaces. This approach is more expressive than PCA, more scalable than traditional manifold learning, and more robust than Kernel PCA.

Modeling Manifolds as Quadric Intersections

The core idea is to represent a manifold as the set of points where a vector of quadratic polynomials $F(x)$ equals zero. Geometrically, this corresponds to the intersection of multiple quadric hypersurfaces—surfaces defined by quadratic equations such as spheres, ellipsoids, or hyperboloids.

Examples of manifolds formed by the intersection of quadric hypersurfaces.

To make this model practical for high-dimensional feature spaces, the authors introduce several key innovations:

  • Distance Approximation: Calculating the exact geometric distance to an intersection of quadrics is computationally difficult. The authors instead use a "distance of order 2" ($d_2$). This approximation is fast to compute, equivariant, and majorized by the true geometric distance, which prevents outliers from exerting infinite "pull" during training.
  • Equivariant Constraints: To ensure the model is independent of the coordinate system's orientation, the authors enforce Hilbert-Schmidt (HS) orthonormality on the polynomial coefficients.
  • Scalability: Unlike many manifold methods that require solving large matrix Eigen-problems, this model is optimized using Stochastic Gradient Descent (SGD), allowing it to handle datasets with millions of points.

Robust Outlier Detection

A significant advantage of the quadric-based approach is its robustness. Traditional manifold learning methods can be significantly warped by outliers in the training set, leading to poor generalization.

Manifold fitting on noisy data with an outlier (indicated by arrow).

By employing $l_1$-averaging of the $d_2$ distances, the proposed model (Q-FULL) becomes naturally resistant to "poisoned" training data. In experiments on face recognition feature spaces (typically ~512 dimensions), the method demonstrated superior performance in identifying out-of-distribution samples, such as anime faces or unrecognizable human images, compared to PCA and One-Class SVMs.

Key Results and Applications

The authors validated their approach on the MS1M-ArcFace dataset, containing approximately 6 million face embeddings:

  • Superior Outlier Detection: Q-FULL achieved an AUC-ROC of 0.97 for outlier detection, compared to 0.89 for standard PCA.
  • Similarity Robustification: The outlier score was used to penalize similarities; if a point is far from the manifold, its similarity to other points is reduced. This improved the Identification Rate (IR) on the challenging CPLFW dataset from 0.61 to 0.67.
  • Efficiency: The resulting model weights are compact (approx. 50MB), making it suitable for deployment in production pipelines where real-time performance is critical.

Conclusion and Future Work

Quadric hypersurface intersections provide a robust and scalable framework for manifold learning in moderately high dimensions. While the method excels at outlier detection and similarity refinement, future work remains in calculating geodesic distances along these quadric surfaces and managing hyperparameter sensitivity in low-data regimes. Nonetheless, the approach offers a significant step forward in making geometric data analysis practical for large-scale industrial applications.

Summary updated

BibTeX
@inproceedings{pavutnitskiy2022quadric,
  author = {Fedor Pavutnitskiy and Sergei O. Ivanov and Evgeniy Abramov and Viacheslav Borovitskiy and Artem Klochkov and Viktor Vyalov and Anatolii Zaikovskii and Aleksandr Petiushko},
  title = {{Quadric Hypersurface Intersection for Manifold Learning in Feature Space}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2022},
  url = {https://openreview.net/forum?id=vxvOQGJDcj},
}
Figure