|  | 
|  | 1 | +--- | 
|  | 2 | +title: "Implementing AD in CMS Combine" | 
|  | 3 | +layout: post | 
|  | 4 | +excerpt: "A  CERN Summer Student 2025 project aiming at the integration of  | 
|  | 5 | +automatic differentiation (AD) into the CMS Combine tool to accelerate statistical | 
|  | 6 | +inference by leveraging RooFit's AD support and LLVM-based gradient generation." | 
|  | 7 | +sitemap: false | 
|  | 8 | +author: Galin Bistrev | 
|  | 9 | +permalink: blogs/2025_galin_bistrev_introduction_blog/ | 
|  | 10 | +banner_image: /images/blog/gsoc-banner.png | 
|  | 11 | +date: 2025-07-05 | 
|  | 12 | +tags: cern cms root combine c++ rooFit automatic-differentiation  | 
|  | 13 | +--- | 
|  | 14 | + | 
|  | 15 | +### Introduction | 
|  | 16 | +Greetings! I’m Galin Bistrev, a fourth-year student specializing in Nuclear and  | 
|  | 17 | +Particle Physics at the University of Sofia "St. Kliment Ohridski". | 
|  | 18 | +As part of the CERN Summer Student Programme 2025, I’m working on a project to  | 
|  | 19 | +integrate automatic differentiation (AD)  | 
|  | 20 | +into the CMS Combine tool. | 
|  | 21 | + | 
|  | 22 | +### Project description | 
|  | 23 | + | 
|  | 24 | +This project focuses on implementing automatic differentiation (AD) into the CMS  | 
|  | 25 | +Combine tool, which the primary statistical analysis framework used by the CMS experiment | 
|  | 26 | +at CERN. Combine is built on top of RooFit, which recently introduced AD  | 
|  | 27 | +technology  to support  minimization methods. | 
|  | 28 | +By generating computationally efficient gradients through AD, RooFit enables significant | 
|  | 29 | +performance gains. RooFit’s implementation of AD works by converting internal  | 
|  | 30 | +likelihood representations into standalone C++ code, from which gradient code is  | 
|  | 31 | +produced. This approach not only accelerates fitting but also improves  | 
|  | 32 | +the portability and shareability of likelihood models, making them accessible | 
|  | 33 | +even to users without deep knowledge of RooFit or Combine internals. | 
|  | 34 | + | 
|  | 35 | +### Brief description of the CMS Combine engine | 
|  | 36 | +Combine is a statistical analysis tool designed to compare a model of expected  | 
|  | 37 | +observations with real data. It’s commonly used for tasks such as discovering  | 
|  | 38 | +new particles or processes, setting limits on potential new physics, and measuring | 
|  | 39 | +physical quantities like cross sections.While Combine was developed with High  | 
|  | 40 | +Energy Physics (HEP) applications in mind, it contains no built-in physics  | 
|  | 41 | +knowledge,thus it remains completely general and independent of the interpretation | 
|  | 42 | +of any specific analysis. This flexibility allows it to be used across a wide range  | 
|  | 43 | +of statistical problems | 
|  | 44 | + | 
|  | 45 | +### Project goals | 
|  | 46 | +The main goals of this project are: | 
|  | 47 | + | 
|  | 48 | +- Support external users in working with Combine-generated models without needing | 
|  | 49 | +to dive into RooFit or Combine internals. | 
|  | 50 | + | 
|  | 51 | +- Optimize performance in high-complexity workflows within the Combine framework. | 
|  | 52 | + | 
|  | 53 | + | 
|  | 54 | +### Implementation strategy  | 
|  | 55 | + | 
|  | 56 | +- Refactor Combine to use standard RooFit primitives where possible, and add AD support to custom components. | 
|  | 57 | + | 
|  | 58 | +- Integrate RooFit's AD- generated gradients into Combines's likelyhood   | 
|  | 59 | +evaluation and minimization workflows to improve performance and enable external  | 
|  | 60 | +gradient use. | 
|  | 61 | + | 
|  | 62 | + | 
|  | 63 | +- Developing benchmarks to quantitevly demonstrate the performance improvements AD brings to Combine overflows. | 
|  | 64 | + | 
|  | 65 | +##Conclusion  | 
|  | 66 | + | 
|  | 67 | +By integrating automatic differentiation into the CMS Combine tool, we aim to make | 
|  | 68 | +statistical inference not only faster but also more accessible to the broader  | 
|  | 69 | +community. I’m excited to contribute to this effort during my time at CERN and  | 
|  | 70 | +look forward to sharing progress, insights, and benchmarks as the project evolves. | 
|  | 71 | + | 
|  | 72 | +### Related Links | 
|  | 73 | +- [CMS Combine GitHub page]https://cms-analysis.github.io/HiggsAnalysis-CombinedLimit/latest/ | 
|  | 74 | +- [ROOT official repository]https://github.com/root-project/root | 
|  | 75 | +- [My GitHub profile]https://github.com/GalinBistrev2  | 
0 commit comments