Variational Bayesian Logistic Tensor Regression with Application to Image Recognition

Yunzhi Jin, Yanqing Zhang, Niansheng Tang

This paper, recently published in Bayesian Analysis, introduces a sophisticated yet efficient framework for image recognition that treats images as they are—multi-dimensional tensors—rather than flattening them into simple vectors. By combining tensor decomposition with a fast Variational Bayesian approach, the authors provide a method that preserves spatial structure while remaining computationally feasible for high-dimensional data.

TL;DR

The authors develop Variational Bayesian Logistic Tensor Regression (VBLTR), a model that performs image classification by approximating high-dimensional coefficient tensors using low-rank CP decomposition. By utilizing a variational approach instead of traditional MCMC sampling, the method achieves significant speedups and better accuracy while automatically identifying sparse, important features in image data.

What Problem Does This Paper Address?

Traditional machine learning methods (like SVMs or Random Forests) typically require image data to be "vectorized"—flattened into a long one-dimensional array. This process destroys the inherent spatial structure of the image (the fact that a pixel is related to its neighbors). While deep learning (CNNs) preserves this structure, it often requires massive datasets to avoid overfitting.

Existing "tensor regression" models attempt to solve this by treating images as 3D arrays (height x width x color), but they face two major hurdles:

  1. The Curse of Dimensionality: The number of parameters in a raw tensor model is astronomical.
  2. Computational Cost: Bayesian versions of these models usually rely on Markov Chain Monte Carlo (MCMC) sampling, which is notoriously slow and memory-intensive for large images.

Methods

The researchers propose a three-pronged solution:

  1. CP Decomposition: They approximate the massive regression coefficient tensor using CANDECOMP/PARAFAC (CP) decomposition. This breaks a high-dimensional tensor into a sum of rank-1 components, drastically reducing the number of parameters to estimate.
  2. Multiway Shrinkage Priors: To handle sparsity (the idea that only certain parts of an image are relevant for classification), they employ Multiway Dirichlet Generalized Double Pareto (M-DGDP) priors. This allows the model to automatically "shrink" unimportant coefficients toward zero.
  3. Variational Bayesian Inference: Instead of slow MCMC sampling, they use a Coordinate Ascent Algorithm. To make the logistic function's math tractable, they apply a $\xi$-transformation (a quadratic lower bound). This results in closed-form updates for the model parameters, making the training process orders of magnitude faster than sampling-based methods.

Datasets

The model was evaluated using:

  • Extensive Simulations: Testing various sample sizes ($N=100$ to $1000$) and tensor dimensions to compare against seven other methods (including CNNs and MCMC-based tensor regression).
  • Flower Dataset: A subset of the 17-category UK flower dataset (Nilsback & Zisserman), specifically classifying snowdrops vs. daffodils.
  • Chest X-ray Data: Used to validate the model's performance on medical imaging (detailed results provided in the paper's supplementary material).

Key Insights and Ideas

  • Structure is Signal: By maintaining the tensor format, the model captures spatial correlations that vector-based models miss. This leads to better "Rate" scores (correctly identifying active vs. inactive components).
  • Optimization over Sampling: The shift from MCMC to Variational Inference is the "aha moment" for scalability. The authors demonstrate that they can achieve similar or better accuracy than MCMC-based "BTLR" while being roughly 10 to 50 times faster.
  • Automated Feature Selection: The M-DGDP prior acts as an automated "mask," identifying which regions of the image tensor are actually predictive of the class label.

Key Results

  • Superior Accuracy: In the flower classification task, VBLTR achieved an accuracy of ~91.7%, outperforming BTLR (~85.6%), Random Forests (~82.8%), and even a standard CNN (~79.9%) on the same small-sample task.
  • Efficiency: In a simulation with 1000 samples, VBLTR completed its task in 4,050 seconds, compared to 85,652 seconds for the MCMC-based BTLR—a massive reduction in computational overhead.
  • Sparsity: The model showed a much lower False Discovery Rate (FAR) in identifying active pixels compared to non-Bayesian or non-tensor methods, proving it is less likely to be "fooled" by noise.

Limitations and Future Work

  • Binary Focus: The current implementation focuses on binary classification (e.g., Disease vs. No Disease). Extending this to multi-class problems is a natural next step.
  • Mean-Field Assumption: The variational approach assumes that the posterior distribution factorizes (independence between parameters). While efficient, this might ignore some complex dependencies between tensor modes.
  • Rank Selection: Choosing the optimal rank ($R$) for the CP decomposition currently relies on maximizing the Evidence Lower Bound (ELBO). While effective, finding a more automated or dynamic way to select $R$ during training could further streamline the process.

Summary updated

Abstract

In recent years, image recognition method has been a research hotspot in various fields such as video surveillance, biometric identification, unmanned vehicles, human-computer interaction, and medical image recognition. Existing recognition methods often ignore structural information of image data or depend heavily on the sample size of image data. To address this issue, we develop a novel variational Bayesian method for image classification in a logistic tensor regression model with image tensor predictors by utilizing tensor decomposition to approximate tensor regression. To handle the sparsity of tensor coefficients, we introduce the multiway shrinkage priors for marginal factor vectors of tensor coefficients. In particular, we obtain a closed-form approximation to the variational posteriors for classification prediction based on the matricization of tensor decomposition. Simulation studies are conducted to investigate the performance of the proposed methodologies in terms of accuracy, precision and F1 score. Flower image data and chest X-ray image data are illustrated by the proposed methodologies.
BibTeX
@inproceedings{jin2025variational,
  author = {Yunzhi Jin and Yanqing Zhang and Niansheng Tang},
  title = {{Variational Bayesian Logistic Tensor Regression with Application to Image Recognition}},
  booktitle = {Bayesian},
  year = {2025},
  doi = {10.1214/25-ba1533},
}
Figure