Recent advances in machine learning have opened new avenues for optimizing detector designs in high-energy physics, where the complex interplay of geometry, materials, and physics processes has traditionally posed a significant challenge. In this work, we introduce the end-to-end. AI Detector Optimization framework (AIDO), which leverages a diffusion model as a surrogate for the full simulation and reconstruction chain, enabling gradient-based design exploration in both continuous and discrete parameter spaces. Although this framework is applicable to a broad range of detectors, we illustrate its power using the specific example of a sampling calorimeter, focusing on charged pions and photons as representative incident particles. Our results demonstrate that the diffusion model effectively captures critical performance metrics for calorimeter design, guiding the automatic search for a layer arrangement and material composition that align with known calorimeter principles. The success of this proof-of-concept study provides a foundation for the future applications of end-to-end optimization to more complex detector systems, offering a promising path toward systematically exploring the vast design space in next-generation experiments.
In this work, we present a conditional denoising-diffusion surrogate for electromagnetic calorimeter showers that is trained to generate high-fidelity energy-deposition maps conditioned on key detector and beam parameters. The model employs efficient inference using denoising diffusion implicit model sampling and is pre-trained on GEANT4 simulations before being adapted to a new calorimeter geometry through low-rank adaptation, requiring only a small post-training dataset. We evaluate physically meaningful observables, including total deposited energy, energy-weighted radius, and shower dispersion, obtaining relative root mean square error values below 2 for representative high-energy cases. This is in line with state-of-the-art calorimeter surrogates which report comparable fidelity on high-level observables. Furthermore, we compare gradients of a reconstruction-based utility function with respect to design parameters between the surrogate and finite-difference references. The diffusion surrogate reproduces the qualitative structure and directional trends of the true utility landscape, providing usable sensitivities for gradient-based optimization. These results show that diffusion-based surrogates can accelerate simulation-driven detector design while enabling differentiable, gradient-informed analysis.