Abstract
Regression is a fundamental task in computer vision, yet it lacks the standardized deep learning approaches seen in classification. While direct regression and confidence-based methods are common, they often rely on restrictive assumptions or lack probabilistic rigor. We propose a general framework using Energy-Based Models (EBMs) to predict the un-normalized conditional target density $p(y|x)$. By minimizing the negative log-likelihood via Monte Carlo sampling, our model learns flexible, task-agnostic densities. Our approach achieves state-of-the-art results in visual tracking and significant improvements in object detection, age estimation, and head-pose estimation.
Introduction
In computer vision, predicting continuous values—such as bounding box coordinates, age, or head pose—is typically handled through direct regression or confidence-based scoring. Direct regression, often using $L^2$ loss, implicitly assumes a unimodal Gaussian distribution, which struggles with the ambiguity and multimodality inherent in real-world data. Confidence-based methods, like IoU-Net, predict scores for input-target pairs but require complex "pseudo-label" engineering and lack a clear probabilistic interpretation.
We bridge this gap by introducing Deep Conditional Target Densities (DCTD), a method that combines the flexibility of confidence-based approaches with a rigorous probabilistic framework.
Methodology: Regression via Energy-Based Models
The core of our approach is modeling the conditional target density $p(y|x)$ as an Energy-Based Model (EBM): $$p(y|x; \theta) = \frac{e^{f_\theta(x, y)}}{Z(x, \theta)}$$ where $f_\theta(x, y)$ is a deep neural network predicting a scalar value for any input-target pair $(x, y)$, and $Z(x, \theta)$ is the normalizing partition function.
Training and Inference
Training is performed by minimizing the negative log-likelihood (NLL). To handle the intractable partition function $Z$, we employ Monte Carlo importance sampling using a mixture of Gaussians centered at the ground truth as a proposal distribution. This allows the model to learn directly from raw data without the need for engineered pseudo-labels.
During inference, we find the most likely target $y^*$ by maximizing the network output $f_\theta(x, y)$ with respect to $y$. This is achieved through efficient gradient-based refinement (gradient ascent), allowing the model to "polish" an initial estimate into a high-precision prediction by following the learned density gradient.
Experimental Evaluation
We evaluated DCTD across four diverse regression tasks, consistently outperforming both direct regression baselines and specialized state-of-the-art methods:
- Object Detection (COCO 2017): DCTD achieved a 2.2% AP improvement over the FPN Faster-RCNN baseline, outperforming specialized methods like IoU-Net.
- Visual Tracking (TrackingNet, UAV123): When integrated into the ATOM tracker, our method set a new state-of-the-art, specifically excelling in high-accuracy estimation metrics (e.g., $OP_{0.75}$).
- Age and Head-Pose Estimation: DCTD consistently reduced Mean Absolute Error (MAE) compared to direct regression baselines. For age estimation, it improved the MAE of a standard $L^2$ model from 4.81 to 4.65.
Conclusion
DCTD provides a flexible and principled framework for deep regression. By learning un-normalized densities directly from data, it avoids the pitfalls of fixed-distribution assumptions and manual label engineering. The model's ability to capture complex distributions and refine predictions via gradient ascent makes it a powerful tool for a wide range of computer vision tasks.
Code is available at: https://github.com/fregu856/ebms_regression
Summary updated