A constrained latent variable model

Aydin Varol, Mathieu Salzmann, Pascal Fua, Raquel UrtasunCVPR 2012

Abstract

Latent variable models provide valuable compact representations for learning and inference in many computer vision tasks. However, most existing models cannot directly encode prior knowledge about the specific problem at hand. In this paper, we introduce a constrained latent variable model whose generated output inherently accounts for such knowledge. To this end, we propose an approach that explicitly imposes equality and inequality constraints on the model's output during learning, thus avoiding the computational burden of having to account for these constraints at inference. Our learning mechanism can exploit non-linear kernels, while only involving sequential closed-form updates of the model parameters. We demonstrate the effectiveness of our constrained latent variable model on the problem of non-rigid 3D reconstruction from monocular images, and show that it yields qualitative and quantitative improvements over several baselines.

Introduction

Latent Variable Models (LVMs), such as PCA or Gaussian Process Latent Variable Models (GPLVM), are workhorses in computer vision, used to find compact representations of complex data like human poses or deforming surfaces. However, standard LVMs are typically "physics-blind." They learn purely from data distributions and often generate physically impossible outputs—for example, a 3D mesh of a shirt where the sleeves have stretched to twice their original length.

Comparison between a standard LVM (left) and the proposed constrained LVM (right), illustrating how constraints restrict the output to a physically valid manifold.

While researchers have previously attempted to incorporate constraints, they usually do so in the latent space, which does not guarantee valid outputs, or by adding a heavy optimization step during inference. This paper introduces a framework that moves the constraint-checking burden from the user at inference to the training phase, resulting in a model that inherently respects physical laws without sacrificing test-time speed.

Methodology

The core innovation is a constrained optimization framework that treats physical and geometric constraints as a fundamental part of the mapping from latent space to output space.

  1. Primal-Dual Optimization: The authors formulate a loss function that minimizes prediction error on labeled data while simultaneously satisfying constraints on a set of unlabeled examples.
  2. Iterative Linearization: Since physical constraints (like fixed edge lengths) are often non-linear, the authors use a first-order Taylor expansion to linearize them, solving the problem through sequential closed-form updates.
  3. Kernelization: To handle complex deformations, the model is fully kernelized, allowing it to use powerful tools like Radial Basis Function (RBF) kernels to capture intricate shapes.

Efficiency Strategies

To handle large-scale problems with up to 60,000 constraints, the authors implemented strategies such as "summing constraints" (grouping individual edge constraints) and "active sets" (focusing only on the most violated constraints during training).

Analysis of training time scaling and the efficiency gains achieved by using 'Sum' and 'Most-violated' constraint handling strategies compared to a 'Single' constraint approach.

Experiments and Results

The model was evaluated on both synthetic and real-world data, including motion capture datasets of cardboard and cloth, and a novel Kinect dataset of deforming paper and t-shirts.

  • Accuracy: On the cardboard dataset, the proposed model reduced 3D reconstruction error compared to the unconstrained version (4.27mm vs. 4.64mm).
  • Physical Validity: The most dramatic improvement was in constraint violation. For the cardboard dataset, the constrained model reduced violation by more than 50% (0.41mm vs. 0.98mm).
  • Robustness to Noise: In synthetic tests with added Gaussian noise, the constrained model's performance degraded much more gracefully than the baselines, as the physical constraints prevented the model from "hallucinating" wild, noisy shapes.

Discussion and Conclusion

One of the key insights of this work is that constraints act as a powerful form of regularization. By defining what cannot happen, the model learns the underlying structure of valid configurations more effectively, especially when labeled training data is sparse. Furthermore, using unlabeled data to enforce constraints allows the model to learn from a wider variety of configurations without requiring ground-truth 3D measurements.

While the reliance on iterative linearization means the model finds a local optimum, the resulting inference speed is a major advantage. Because the constraints are baked into the learned mapping, the model performs a simple matrix multiplication at test time, avoiding the need for iterative refinement and making it highly suitable for real-time computer vision tasks.

Summary updated

BibTeX
@inproceedings{varol2012constrained,
  author = {Aydin Varol and Mathieu Salzmann and Pascal Fua and Raquel Urtasun},
  title = {{A constrained latent variable model}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2012},
  url = {https://openreview.net/forum?id=S1ZrZxfO-B},
}

Loading related content...

Figure