AI-Assisted Detector Design for the EIC (AID(2)E)

Artificial Intelligence is poised to transform the design of complex, large-scale detectors like the ePIC at the future Electron Ion Collider. Featuring a central detector with additional detecting systems in the far forward and far backward regions, the ePIC experiment incorporates numerous design parameters and objectives, including performance, physics reach, and cost, constrained by mechanical and geometric limits. This project aims to develop a scalable, distributed AI-assisted detector design for the EIC (AID(2)E), employing state-of-the-art multiobjective optimization to tackle complex designs. Supported by the ePIC software stack and using Geant4 simulations, our approach benefits from transparent parameterization and advanced AI features. The workflow leverages the PanDA and iDDS systems, used in major experiments such as ATLAS at CERN LHC, the Rubin Observatory, and sPHENIX at RHIC, to manage the compute intensive demands of ePIC detector simulations. Tailored enhancements to the PanDA system focus on usability, scalability, automation, and monitoring. Ultimately, this project aims to establish a robust design capability, apply a distributed AI-assisted workflow to the ePIC detector, and extend its applications to the design of the second detector (Detector-2) in the EIC, as well as to calibration and alignment tasks. Additionally, we are developing advanced data science tools to efficiently navigate the complex, multidimensional trade-offs identified through this optimization process.


Introduction
The Electron Ion Collider (EIC) stands out as one of the pioneering large-scale experiments to incorporate artificial intelligence (AI) right from its design phase.As highlighted in the 2019 DOE Town Halls on AI for Science: "AI techniques that can optimize the design of complex, large-scale experiments have the potential to revolutionize the way experimental nuclear physics is currently done."This paper presents AID(2)E, a DOE-funded initiative aimed at developing a scalable and distributed framework for AI-assisted detector design at the EIC.
The project was initiated to address the limitations of current detector optimization methods.Traditionally, each subsystem is optimized individually within global design constraints before integration.This conventional approach, often relying on ad hoc or brute-force methods like grid search, is sub-optimal.It struggles with handling multiple design parameters, fails to optimize multiple objectives simultaneously (such as efficiency, resolution, and costs), and lacks holistic optimization of the entire detector.Furthermore, it does not fully exploit the benefits of multiobjective optimization, which can reveal optimal trade-offs between competing objectives.The rationale for employing a multi-objective optimization approach in detector design is that there is no single optimal solution; instead, there exists a spectrum of viable solutions that balance factors such as detector response, physics design requirements, and costs.This is especially significant given the high costs associated with large-scale detectors, exemplified by the estimated $300M budget for the ePIC detector [1].As demonstrated in previous studies (e.g., [2,3]), these methods provide new insights into internal correlations among design parameters and enable trade-offs that are not achievable with traditional methods.AI-assisted optimization complements the expertise of detector specialists and, as shown in [3], can improve objectives compared to a baseline design across a large phase space.A holistic optimization of the entire detector, considering multiple objectives simultaneously, represents a paradigm shift in detector design.AI-assisted methods can significantly impact future large nuclear physics projects, such as those at the EIC.Using realistic simulation pipelines and minimizing the computational budget required, the AID(2)E Collaboration aims to streamline the design process while ensuring high-fidelity results.The primary goal of AID(2)E is to develop infrastructure that optimizes detector design in a scalable and distributed manner.The project begins with two closure tests designed to demonstrate the convergence of the Pareto front in multi-objective optimization problems and to validate the effectiveness of distributing the compute-intensive simulations of design points suggested by the optimizer.AID(2)E has already made contributions towards optimizing the ePIC detector subsystems.Currently, the collaboration is optimizing two detector subsystems, which are discussed in this proceeding.This optimization approach can potentially be extended to other subsystems of ePIC, making it one of the first largescale detector designed with the assistance of AI.Evaluating different solutions on the Pareto front of ePIC at various budget levels can yield significant cost benefits.Even fractional improvements in objectives, such as resolution and efficiency, can lead to a more efficient use of beam time, a major cost factor for the EIC over its lifetime.Characterizing the Pareto front can inform the design of a complementary Detector-2 at EIC.Our team is also developing a suite of data science tools to facilitate effective exploration of the determined Pareto front [4].It is worth mentioning that the AID(2)E framework also holds potential for other applications, such as calibration and distributed machine learning inference engines.Furthermore, AID(2)E aims to engage the community through bootcamps and short-term schools for students.

Methodology and Strategy
The primary goal of the AID(2)E project is to develop a scalable and distributed AI-assisted Detector Design framework for the EIC, specifically focusing on the ePIC detector.Central to AID(2)E is Multi-Objective Optimization (MOO), which evaluates various design objectives such as sub-detector intrinsic responses (e.g., resolution and efficiency), performance for key EIC physics channels, and material cost proxies.This project is pioneering in its application of MOO at such a scale, facilitated by a developing distributed workflow infrastructure, enhanced with PanDA for simulation workflows [5].Our strategy includes two closure tests: first, we want to test and characterize the perforamnce of approaches like Multi-Objective Bayesian Optimization (MOBO) [6] and Multi-Objective Genetic Algorithms (MOGA), specifically NSGA-II [7], using test functions.The second one proves the effectiveness of distributing the simulations of different design points, coordinating data collection for objective updates, and refining the design iteratively.The framework supports continuous and distributed AI-driven optimization.Initial efforts are concentrated on optimizing specific sub-detector systems within ePIC, paving the way for broader application.Detailed discussions on the optimization approach, distributed workflow, and specific applications to the ePIC detector are presented in what follows.

Multi-Objective Optimization
The definition of a generic detector MOO problem can be formulated as follows: where one has  objective functions   to optimize (e.g., detector resolution, efficiency, signal/background for a physics channel, costs), subject to  inequalities   () and  equality constraints ℎ  () (e.g., mechanical constraints), in a design space of  dimensions (e.g., geometry parameters that change the Geant4 design) with lower (  ) and upper (  ) bounds on each dimension.We are utilizing Multi-Objective Bayesian Optimization (MOBO) and Multi-Objective Optimization using Genetic Algorithms (MOGA) to tackle detector design optimization.These techniques assess multiple objectives such as sub-detector responses, physics channel performance, and material costs, and are detailed in our workflow illustrated in Fig. 1.The left panel shows the Bayesian workflow MOBO, which is the primary choice in this project (generally capable of providing accurate determination Pareto fronts).The right panel shows MOGA (NSGA-II, based on genetic algorithms [7]), which is an alternative approach (more suitable to handle, e.g., possible discontinuities or high-dimensional spaces).
MOBO is our primary choice for the ePIC detector, driven by our improved understanding of technology and parameter ranges, the ability to incorporate uncertainties and physics-inspired acquisition functions, and a more accurate approximation of the Pareto front compared to MOGA.This approach has proven efficient in requiring fewer evaluations to converge and allows for custom acquisition functions, supported by tools like ax-platform and BoTorch [8,9].We are currently testing MOBO with a qNEHVI acquisition function [10], optimizing for scalability across multiple design points and dimensions.Scalability challenges for MOBO include computational constraints as the number of observations grows, which we can address using techniques to manage the increasing complexity of the surrogate model, such as SAASBO and TURBO.Both MOBO and MOGA offer distinct computational and scalability properties that dictate their application and workload distribution, crucial for the efficient design of the ePIC detector.One advantage of MOGA compared to MOBO is the possibility of handling nondifferentiable terms, and higher dimensionality problems, leveraging the inherent parallelization of genetic algorithms.

Distributed Workflow
The AID2E team is committed to advancing AI-based detector design optimization at the EIC by developing a scalable and distributed framework.This framework is refined through its application to the ePIC detector design and is delivered as a robust, experiment-agnostic solution ready for broader detector design applications.The project leverages existing, scalable distributed workflow and workload management tools like PanDA [11], developed for the ATLAS experiment and now supporting complex AI/ML workflows including Bayesian Optimization.
Historically, these systems have supported large-scale data handling and processing needs of the ATLAS experiment and other projects like the Rubin Observatory and sPHENIX, demonstrating the versatility and scalability of the PanDA and the intelligent Data Delivery Service (iDDS).These tools have been integral in managing workflows across diverse computing environments-grids, clouds, and supercomputers-enhancing their stability and adaptability.
Recent developments have focused on integrating complex AI/ML workflows, particularly those utilizing GPUs, into this system.This includes hyperparameter optimization and active learning based on Bayesian optimization, extending the capabilities of ATLAS analyses.Additionally, full-chain integrated production-analysis workflows, including the use of REANA in the analysis phase, have been supported.The PanDA/iDDS development program emphasizes ease of use and accessibility, supporting a range of AI/ML applications through a unified platform that integrates multiple computing facilities.This capability is critical for processing-intensive, distributed AIbased detector design, offering: (i) seamless operation across distributed resources; (ii) support for comprehensive AI/ML tools and full-chain workflows from simulation to iterative refinement; (iii) efficient authentication and user-friendly interfaces, including support for modern and legacy security mechanisms.Ultimately, this framework not only supports current project needs but is also adaptable to similar future applications, demonstrating its potential through an implementation of Bayesian Optimization-based active learning now enhancing the physics reach of ATLAS analyses.

Closure Tests
The primary objective of the closure tests within the AID(2)E framework is to rigorously evaluate system constraints and identify potential bottlenecks.This framework enhances the distribution of simulations using the ePIC software stack [12] and advances MOO techniques for detector design.The first closure test analyzes these bottlenecks within a test optimization problem, employing MOBO to assess its scalability and efficiency relative to problem complexity.To meet the computational demands of evaluating multiple detector design points, the ePIC detector design optimization requires a large volumes of simulated data.The PanDA System [11] is utilized to manage these tasks across varied geographic locations, coordinated by the iDDS.The second closure test integrates and stress-tests the PanDA framework, initially with test functions and subsequently with actual ePIC simulation payloads.This process validates the framework's capability to efficiently distribute simulations and synchronize them with an optimization strategy, ensuring robust performance across diverse operational scenarios.A high-level workflow of the AID(2)E framework, based on the mentioned closure tests, is displayed in Fig. 2.
The primary goal of Closure Test 1 is to evaluate the complexity of the optimization algorithm for convergence with up to 5 objectives and O (100) design parameters.This test identifies bottlenecks in multi-objective Bayesian optimization algorithms and helps deploy the AID(2)E framework for complex optimization problems.A realistic test function is chosen to pinpoint choke points.Improvements are achieved by reducing computational time and space complexity or the number of iterations needed for convergence.Closure Test 1 uses a test function with a known Pareto front to evaluate convergence.The DTLZ-2 problem is selected for this purpose, defined as follows.Given  decision variables and  objectives, where  ≥ 2, the decision vector  = [ 1 ,  2 , . . .,   ] is subject to the constraints 0 ≤   ≤ 1 for  = 1, 2, . . ., , and () =  = (  − 0.5) 2 − cos(20(  − 0.5)) ≤ 0. The objective functions are defined as: High-level Workflow We also show the feasibility of distributing these simulations across various HPC/HTC clusters using the PanDA framework [11] (closure test 2).Following closure test 1, we replace the test functions with the ePIC software (compute-intensive simulations and reconstruction).The final step is a full integration, where the ePIC software is coupled with a distributed AI-assisted framework that asynchronously orchestrates the design points suggested by AI.
Here, () is the sum constraint defined earlier.The solution to this multi-objective function is satisfied when at least  design variables meet the condition   = 0.5 for  = 1, 2, . . ., .This function is chosen because, like real-world scenarios, not all design variables influence every objective.The true Pareto front for the DTLZ-2 problem is known for given  design variables and  objectives.The convergence criterion is based on the computed hyper-volume, with a tolerance of 5% to the true hyper-volume: To understand the optimization algorithm's complexity and bottlenecks, we study the time and space complexity as functions of  objectives and  design variables.The overall complexity is the convolution of the complexities in building the surrogate model and using the acquisition function.Current studies evaluate these complexities at each step of the Bayesian process.Preliminary results are shown in Fig. 3. Future work will extend this to more combinations of surrogate models and acquisition functions to verify the complexities reported in the literature.
Closure Test 2 aims to efficiently distribute simulations for various optimization tasks through three stages of parallelization.First, multi-processing within a single node is used when simulation time is negligible compared to queue time.This is parallelized with Joblib, as in Closure Test 1.Second, parallelization with HPC workload managers like SLURM and PBS is applied when simulation time is comparable to queue time.Third, parallelization with PanDA [11] -a datadriven workload management system designed for the LHC data processing scale-is used when the simulation time is much longer than the queue wait time for job submission.Closure Test 2 objectives are to integrate the optimization pipeline to use PanDA for evaluating design points and to integrate the ePIC software stack with PanDA for detector design evaluation.PanDA offers advantages such as OIDC authentication for cross-site submissions and PanDA Monitor for job status tracking.Ongoing efforts include creating authentication pipelines and retrieving information from various sites.

Applications to the ePIC Detector
We are currently optimizing two detection systems in ePIC: the dual-RICH (dRICH) in the central region and the B0 detector in the forward region.
The dual-radiator Ring Imaging Cherenkov detector (dRICH) will provide charged-hadron particle ID in the forward rapidity region of ePIC for a wide momentum range of ∼ 2 GeV/ <  < 50 GeV/ [2,13].The objective of this optimization is to improve pion-kaon and kaon-proton separation, as well as acceptance, at both low and high momentum across the full  range covered by the dRICH.An initial study applying MOBO to the design of the ePIC dRICH has been conducted, with design points evaluated using the ePIC full simulation.The design parameters used in this optimization are the aerogel disk radius, the spherical mirror position (z,x) and radius (with the z position constrained such that the mirror backplane is within 4 cm of the dRICH back wall), and the photosensor sphere position (z,x) and radius (with the z position constrained such that sensors are within the sensor box required for services).This totals seven design parameters with two hard constraints on the search space.Overlap checks are conducted for each sampled design point before simulation.For each design point, 1000  + and 1000  + particles are simulated in six / ranges.The momentum values are 15 GeV/ and 40 GeV/, at the upper edge of the momentum range covered by each radiator.The  ranges sampled are [1.3,2.0], [2.0, 2.5], [2.5, 3.5].Following [2], the objectives chosen for this test optimization are the  pion-kaon separation for the low and high  ranges, computed as where ⟨⟩ is the average reconstructed Cherenkov angle for pions/kaons, ⟨ photons ⟩ is the average number of reconstructed photons per track, and   is the Cherenkov angle resolution from a Gaussian fit to the Cherenkov angle residual, averaged over pions and kaons. − is averaged over the two momentum points for each  range.This optimization was carried out with 50 initial Sobol points, a SAASBO surrogate model, and a qNEHVI acquisition function, with the optimization executed for 200 total evaluations in batches of 10.1 Convergence was achieved after 150 trials.Preliminary Pareto-optimal points found after these trials include potential designs that outperform the nominal dRICH geometry.Initial results shown at the dRICH working group meetings of ePIC suggest that while the nominal dRICH geometry is well-optimized for the large  region, the MOBO algorithm identifies opportunities for improvement within the available design space.
Far-forward detectors [15] measure very forward neutral and charged particles [16].The EIC far-forward detectors consist of four independent subsystems: B0 Tracking and Photon Detection, Roman Pots, Off-Momentum Detectors, and the Zero-Degree Calorimeter.The B0 system measures charged particles in the forward direction and tags neutral particles.Off-momentum detectors measure charged particles from decays and fission, Roman pot detectors measure charged particles near the beam, and the zero-degree calorimeter measures neutral particles at small angles.The optimization objective for the B0 ECAL calorimeter is to improve momentum resolution under a non-homogeneous magnetic field while simultaneously increasing the B0 ECAL acceptance.Acceptance is defined as the ratio of the number of tracks before the first tracking disk to the number of showers detected by the B0 ECAL.This is challenging because the magnetic field peaks within a limited range in , and moving it to extremes can disrupt acceptance.There are four main design parameters, specifically the disk z positions.Some constraints have also been applied to reflect the real scenario, such as all trackers should be placed within 6.65 m, and the sum of the z-positions of two subsequent trackers should be ≥ 10 cm.
A visualization of the sub-detecting systems described in this section is shown in Fig. 4.
1Definitions of Sobol points, SAASBO and qNEHVI can be found in the tutorial [14].

Broader Impact and Future Work
Our work with the dRICH and B0 sub-detectors at the ePIC experiment demonstrates the potential for extending our methodologies to other sub-detector systems, tailoring to the ePIC detector needs.Following the approach implemented in [3], the tracking system preceding the dRICH is a prime candidate for further optimization in combination with the dRICH.This method is largely experiment-agnostic and applicable to various detection systems, although MOBO currently handles up to four objective functions effectively.For more complex scenarios, the MOGA approach currently available within the AID2E framework offers a viable alternative.
Large-scale, compute-intensive applications often face resource-based limitations that hinder iterative development, training, and optimization.Our framework facilitates AI/ML workflows across geographically distributed, multi-platform sites, significantly enhancing the scalability and accessibility for researchers.This reduces barriers from small-scale development to large-scale deployment, enabling deeper and more complex model processing that can yield substantial scientific benefits.The potential applications of this framework include: (i) Design of future large-scale experiments in nuclear physics and high-energy physics, such as the early-stage second EIC detector, optimizing for complementarity with the ePIC detector across their full physics reach; (ii) Alignments and calibrations, addressing compute-intensive and multi-objective needs in detector operations; (iii) Multi-objective hyperparameter optimization for deep neural networks, aiming to balance network performance against complexity, as shown in [18].

Documentation and Outreach
We will employ GitBook along with other knowledge-sharing platforms to support our documentation and outreach efforts, ensuring that these resources are easily accessible to beginners.Automated documentation will be implemented using a Retrieval-Augmented Generation (RAG)-based approach, as described in [19], with an AI4EIC bot available to the public via a specific URL.The AID(2)E project employs a comprehensive suite of data science tools to analyze the results of various optimizations.Interested readers can refer to [20] for a dashboard that displays the performance of closure tests, and to [4] for an example of interactive navigation of Pareto front solutions from the ECCE tracker design.This project will also feature summer bootcamps on AIassisted design optimization at William & Mary, incorporating lectures cited in [21] and [22], along with hands-on research activities with the AID(2)E group.Participants will engage in cutting-edge research, learning about AI applications in detector design and data science for physics.Additional information about the project is available in the main repository, detailed in [23].

Conclusions
We are actively working to integrate Multi-Objective Optimization with the EIC shell software, and initial results have already been obtained for two detector systems: the dRICH in the central region and the B0 in the far-forward region of ePIC.This development represents a significant milestone, testing the capabilities of our approach in a real-world scenario.Ultimately, our goal is to develop a scalable and distributed framework capable of holistically optimizing large-scale detectors.Detector-2 at the EIC currently presents an ideal application for this framework, considering its developmental stage.During construction phases of detector projects, numerous changes are often necessary, such as adjustments due to material availability or budget constraints.The AID(2)E framework is the ideal tool to optimize these design modifications efficiently, utilizing objectives like cost reduction.Moreover, this framework is poised to have broader impacts beyond its immediate application.It is versatile enough to be adapted for various experimental setups and is particularly well-suited for compute-intensive tasks that require Multi-Objective Optimization, such as calibrations and alignments or optimization of complex machine learning pipelines.

Figure 1 :
Figure 1: Multi-objective optimization workflows:The left panel shows the Bayesian workflow MOBO, which is the primary choice in this project (generally capable of providing accurate determination Pareto fronts).The right panel shows MOGA (NSGA-II, based on genetic algorithms[7]), which is an alternative approach (more suitable to handle, e.g., possible discontinuities or high-dimensional spaces).

Figure 2 :
Figure 2: High-level workflow of AID(2)E: We first demonstrate an AI-assisted framework handling multiple test objectives ("simulations") with a known Pareto front (closure test 1).We also show the feasibility of distributing these simulations across various HPC/HTC clusters using the PanDA framework[11] (closure test 2).Following closure test 1, we replace the test functions with the ePIC software (compute-intensive simulations and reconstruction).The final step is a full integration, where the ePIC software is coupled with a distributed AI-assisted framework that asynchronously orchestrates the design points suggested by AI.

Figure 3 :
Figure 3: Results from closure test (Left) The figure depicts the total explored points before DTLZ-2 convergence as a function of design parameters ().Each trial was repeated for statistical robustness, with varying colors indicating a different number of objective.The process continued until either 1000 points were explored or convergence was reached, except for cases with  = [50, 100] and  = 4 where convergence was not achieved.A comparison with expected computational complexity is underway.(Right) The figure illustrates the time complexity of the qNEHVI acquisition function.According to [10], it is O ( • ( + )  ), where  is the observed points and  is partitions in the cached box decomposition.Further studies on varying design parameters and standard latency are in progress to elaborate on the problem's complexity.

Figure 4 :
Figure 4: Sub-detector system in ePIC optimized with AID2E: (left) the dRICH design is characterized by two radiators (aerogel and gas) and 6 identical sectors with photosensors [17]; (right) The B0 Tracker and the B0 ECAL detector.The magnetic field in the B0 Region is inhomogenous making the optimization more challenging.