Automatic Differentiation of Binned Likelihoods With Roofit and Clad

04/04/2023
by   Garima Singh, et al.
0

RooFit is a toolkit for statistical modeling and fitting used by most experiments in particle physics. Just as data sets from next-generation experiments grow, processing requirements for physics analysis become more computationally demanding, necessitating performance optimizations for RooFit. One possibility to speed-up minimization and add stability is the use of Automatic Differentiation (AD). Unlike for numerical differentiation, the computation cost scales linearly with the number of parameters, making AD particularly appealing for statistical models with many parameters. In this paper, we report on one possible way to implement AD in RooFit. Our approach is to add a facility to generate C++ code for a full RooFit model automatically. Unlike the original RooFit model, this generated code is free of virtual function calls and other RooFit-specific overhead. In particular, this code is then used to produce the gradient automatically with Clad. Clad is a source transformation AD tool implemented as a plugin to the clang compiler, which automatically generates the derivative code for input C++ functions. We show results demonstrating the improvements observed when applying this code generation strategy to HistFactory and other commonly used RooFit models. HistFactory is the subcomponent of RooFit that implements binned likelihood models with probability densities based on histogram templates. These models frequently have a very large number of free parameters and are thus an interesting first target for AD support in RooFit.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/11/2022

GPU Accelerated Automatic Differentiation With Clad

Automatic Differentiation (AD) is instrumental for science and industry....
research
11/07/2017

Tangent: Automatic Differentiation Using Source Code Transformation in Python

Automatic differentiation (AD) is an essential primitive for machine lea...
research
01/20/2021

Automatic Differentiation via Effects and Handlers: An Implementation in Frank

Automatic differentiation (AD) is an important family of algorithms whic...
research
10/12/2021

A Brief Introduction to Automatic Differentiation for Machine Learning

Machine learning and neural network models in particular have been impro...
research
11/28/2019

Eigen-AD: Algorithmic Differentiation of the Eigen Library

In this work we present useful techniques and possible enhancements when...
research
04/13/2023

Fast And Automatic Floating Point Error Analysis With CHEF-FP

As we reach the limit of Moore's Law, researchers are exploring differen...
research
02/23/2021

Event-Based Automatic Differentiation of OpenMP with OpDiLib

We present the new software OpDiLib, a universal add-on for classical op...

Please sign up or login with your details

Forgot password? Click here to reset