Benchmarking New Hardware for Machine Learning for Particle Physics Cavendish Laboratory, Department of High Energy Physics, University of Cambridge Stefano Vergani 4. Specs of Different PUs For this study, three different types of PUs will be used. They have different specifics, prices, and energy consumption and all of them must be taken into account when choosing the right one. 1. LArTPC Detectors • Liquid argon time projection chamber (LArTPC) detectors measure ionisation tracks produced by charged particles inside a cryostat filled with liquid argon. • The ionisation electrons drift in an electric field towards wire planes, where their charge is collected and measured. • For this work, a fictitious LArTPC detector has been simulated with GEANT4. 5. Neural Networks 2. Processing Units A Processing Unit (PU) is a circuit which performs operations. There are several of them: • Central Processing Unit (CPU): processes the basic instructions that drive a computer • Graphics Processing Unit (GPU): used in graphic rendering software and in video games. In recent years, it has been used also to perform matrix calculations for Deep Learning (DL) • Neural Processing Unit (NPU): a special groups of PUs designed specifically to perform matrix calculations for DL References: • [1] MicroBooNE Collaboration, JINST 12, P02017 (2017), ArXiv: 1612.05824v2 • [2] https://coral.withgoogle.com/products/accelerator Notes: *There is currently a known issue in the quantization of TF Lite models meaning that the accuracy of inference on the Edge TPU is not representative, and is hence not given here at this stage. The accuracy is expected to be identical between the CPU, GPU (as demonstrated) and Edge TPU, and this will be verified in the near future Only a certain subset of possible Neural Networks (NNs) can run on an Edge TPU. Among them, Residual Network 50 (ResNet-50) V2 and DenseNet-169 have been identified as the most promising. They have been trained with 10k images equally divided between neutrino Neutral Current (NC), νμ Charged Current (numu CC), and ν𝒆Charged Current (nue CC) events. Validation has been done with another set of 2k images equally divided between NC, numu CC, and nue CC events. Training and validation have been done using the popular TensorFlow software. 3. Tensor Processing Unit Tensor Processing Units (TPUs) are a subset of NPUs designed by Google to do tensor calculations. Edge TPU has portable sizes (65 mm x 30 mm). They have a very low power consumption and come at a cheap price (~80 USD). Figure 2: Picture of an Edge TPU compared to the size of a clip. Taken from [2]. 6. TensorFlow Lite 7. Results and Future Work The TensorFlow (TF) trained models have been subsequently converted to all the available TF Lite optimizations to test their speed and accuracy on CPU, GPU, and Edge TPU. The idea behind TF Lite is to make a lighter and faster model using quantization, that is converting weights and/or activations into 8 bits or float 16. This could lead to some accuracy loss. Edge TPU works only with quantized models. Table 2 presents a comparison between different versions of TensorFlow Lite. Table 2: Comparison between features of different TF Lite Optimizations. • TensorFlow Lite appears to be particularly useful for users with limited RAM on the CPU/GPU. • Edge TPU could be an interesting solution for users who cannot afford a GPU. Research centers could equip each workstation with one. Interesting for future R&D in edge computing for particle physics. • Future plans comprehend testing more NNs and a publication. Figure 1: On the left, sketch of a LArTPC taken from [1]. On the right, ionisation 𝑒− collected in the three different wire planes, from a fictitious LArTPC simulation. Processor Type CPU GPU EDGE TPU Model Intel ® Core ™ i7- 8550U @ 1.8 GHz NVIDIA Tesla P100 16 GB Coral Edge TPU TDP* (in w) 15 250 2 Commercial Price 99 USD 7500 USD 80 USD Table 1: Specifics of all the PUs used for this study. * Thermal Design