Skip to content

gr3gor1/MAB_UCB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

If this repository is useful to you, the following work can be cited:

@misc{papanikolaou2026comparativeanalysisperformanceupper,
      title={A Comparative Analysis on the Performance of Upper Confidence Bound Algorithms in Adaptive Deep Neural Networks}, 
      author={Grigorios Papanikolaou and Ioannis Kontopoulos and Konstantinos Tserpes},
      year={2026},
      eprint={2604.24810},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2604.24810}, 
}

MAB_UCB

Adaptive Deep Neural Networks (ADNNs) incorporating Dynamic Depth Sparsity provide the possibility of skipping entire layers during inference even resulting in early exits sacrificing a certain percentage of accuracy in favor of reduced latency and energy consumption.

This repository contains scripts for training adaptive and non-adaptive, ResNet and MobileViT, models. In addition, there is also a script used for evaluating such models in respect to exit distribution, inference time, energy consumption and accuracy.

The decision of ending inference prematurely relies on deciding the optimal threshold. The unsupervised learning procedure of threshold selection during inference has been studied in the context of Multi-Armed Bandits framework utilizing mainly UCB1. However, this repository enables the use of other Upper Confidence Bounds variants that account for factors such as Bayesian uncertainty, mean cost of reward and variance of rewards.

Not only is it visible that there are variants besides UCB1 dominating Pareto Frontiers:

ResNet variants Pareto frontiers across different sets of arms for accuracy-inference time and accuracy-energy consumption on CIFAR10.1v6

renergy_10.1_res.png

rinf_10.1_res.png

MobileViT Pareto frontiers across different sets of arms for accuracy-inference time and accuracy-energy consumption on CIFAR10.1v6

ming_10.1.png

menergy_10.1.png

But cumulative regret convergence is also different in respect to the chosen UCB algorithm:

MobileViT and ResNet cumulative regret across time steps for CIFAR-100 and CIFAR-10 testing sets respectively.

r50reg.png

mreg_1.png

Note: The experiments revolving around inference were run on a single L4 GPU.

About

This repository contains the code for comparing the performance of various UCB algorithms on ADNNs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors