DCTD: Deep Conditional Target Densities for Accurate Regression

Fredrik K. Gustafsson, Martin Danelljan, Goutam Bhat, Thomas B. Schön

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.

The DCTD architecture predicts an un-normalized density $p(y|x; \theta)$ from input $x$ and target $y$.

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:

  1. Object Detection (COCO 2017): DCTD achieved a 2.2% AP improvement over the FPN Faster-RCNN baseline, outperforming specialized methods like IoU-Net.
  2. 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}$).
  3. 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.
Qualitative examples of learned target densities for visual tracking, showing the model's ability to handle complex poses and motion.

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

Abstract

While deep learning-based classification is generally tackled using standardized approaches, a wide variety of techniques are employed for regression. In computer vision, one particularly popular such technique is that of confidence-based regression, which entails predicting a confidence value for each input-target pair (x,y). While this approach has demonstrated impressive results, it requires important task-dependent design choices, and the predicted confidences lack a natural probabilistic meaning. We address these issues by proposing a general and conceptually simple regression method with a clear probabilistic interpretation. In our proposed approach, we create an energy-based model of the conditional target density p(y|x), using a deep neural network to predict the un-normalized density from (x,y). This model of p(y|x) is trained by directly minimizing the associated negative log-likelihood, approximated using Monte Carlo sampling. We perform comprehensive experiments on four computer vision regression tasks. Our approach outperforms direct regression, as well as other probabilistic and confidence-based methods. Notably, our model achieves a 2.2% AP improvement over Faster-RCNN for object detection on the COCO dataset, and sets a new state-of-the-art on visual tracking when applied for bounding box estimation. In contrast to confidence-based methods, our approach is also shown to be directly applicable to more general tasks such as age and head-pose estimation. Code is available at https://github.com/fregu856/ebms_regression.
BibTeX
@inproceedings{gustafsson2020dctd,
  author = {Fredrik K. Gustafsson and Martin Danelljan and Goutam Bhat and Thomas B. Schön},
  title = {{DCTD: Deep Conditional Target Densities for Accurate Regression}},
  booktitle = {Lecture Notes in Computer Science},
  year = {2020},
  doi = {10.1007/978-3-030-58565-5\_20},
}
Figure