Cargando…
Automatic Differentiation of Binned Likelihoods With Roofit and Clad
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...
Autores principales: | , , , , |
---|---|
Lenguaje: | eng |
Publicado: |
2023
|
Materias: | |
Acceso en línea: | http://cds.cern.ch/record/2859795 |
_version_ | 1780977711953477632 |
---|---|
author | Singh, Garima Rembser, Jonas Moneta, Lorenzo Lange, David Vassilev, Vassil |
author_facet | Singh, Garima Rembser, Jonas Moneta, Lorenzo Lange, David Vassilev, Vassil |
author_sort | Singh, Garima |
collection | CERN |
description | 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. |
id | cern-2859795 |
institution | Organización Europea para la Investigación Nuclear |
language | eng |
publishDate | 2023 |
record_format | invenio |
spelling | cern-28597952023-06-05T12:22:03Zhttp://cds.cern.ch/record/2859795engSingh, GarimaRembser, JonasMoneta, LorenzoLange, DavidVassilev, VassilAutomatic Differentiation of Binned Likelihoods With Roofit and Cladstat.COMathematical Physics and Mathematicscs.MSComputing and ComputersRooFit 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.arXiv:2304.02650oai:cds.cern.ch:28597952023-04-04 |
spellingShingle | stat.CO Mathematical Physics and Mathematics cs.MS Computing and Computers Singh, Garima Rembser, Jonas Moneta, Lorenzo Lange, David Vassilev, Vassil Automatic Differentiation of Binned Likelihoods With Roofit and Clad |
title | Automatic Differentiation of Binned Likelihoods With Roofit and Clad |
title_full | Automatic Differentiation of Binned Likelihoods With Roofit and Clad |
title_fullStr | Automatic Differentiation of Binned Likelihoods With Roofit and Clad |
title_full_unstemmed | Automatic Differentiation of Binned Likelihoods With Roofit and Clad |
title_short | Automatic Differentiation of Binned Likelihoods With Roofit and Clad |
title_sort | automatic differentiation of binned likelihoods with roofit and clad |
topic | stat.CO Mathematical Physics and Mathematics cs.MS Computing and Computers |
url | http://cds.cern.ch/record/2859795 |
work_keys_str_mv | AT singhgarima automaticdifferentiationofbinnedlikelihoodswithroofitandclad AT rembserjonas automaticdifferentiationofbinnedlikelihoodswithroofitandclad AT monetalorenzo automaticdifferentiationofbinnedlikelihoodswithroofitandclad AT langedavid automaticdifferentiationofbinnedlikelihoodswithroofitandclad AT vassilevvassil automaticdifferentiationofbinnedlikelihoodswithroofitandclad |