1st AI_INFN Advanced Hackathon 2024
Processing data from
the LHCf detector:
Construction of a multi-layer Neural Network
Rosa Petrini
Andrea Paccagnella
2
Subjects
Types of data and different analyses
Why different type of analysis?
Many different types of data must be combined to discriminate events
3
Energy
from calorimeters
Dense
Neural Network
Position
from trackers
Convolutional
Neural Network
Neural Networks
4
Dense Neural Network
Key features:
5
A type of artificial neural network in which every neuron in a layer is connected to every neuron in the next layer.
Example of a neural network with a single neuron
Sigmoid
Dense Neural Network
Composition:
6
Full connectivity ensures that all features from one layer contribute to the next, maximising learning capacity.
Backpropagation
7
This procedure is called backpropagation because we are propagating information in the opposite direction of the neural network
Dense Neural Network: Problems
8
Problems in image analysis with Dense networks:
Same image but with the pixels mixed together
(1588, 1138)
Dense equivalent:
1807144 input feature
football crest
Dense Neural Network: Problems
9
Why CNNs are better:
Problems in image analysis with Dense networks:
Dense equivalent:
1807144 input feature
Convolutional Neural Network
A specialized neural network designed for processing structured data like images or videos.
CNN are computationally efficient and can handle spatial hierarchies in data.
A neural network capable of processing structured data. The convolution is defined:
where A is an M · N matrix (input image), H is a k · k square matrix. H is called kernel.
C is the Activation Map
Key Features:
10
Convolutional Neural Network
11
Convolutional Neural Network: Convolutional Layers
12
The Filter is like a learned matrix multiplication. It is like the weights of Dense NN.
By going over the image, each filter can focus on the local features
We will have filter specializing in recognizing the same element over multiple training images
The result of the convolution operation between kernel and image is called ACTIVATION MAP
Convolutional Neural Network: looking at convolution
13
Thanks to Francesca Lizzi
Convolutional Neural Network: looking at convolution
14
Thanks to Francesca Lizzi
Convolutional Neural Network: Convolutional Layers
15
The Filter is like a learned matrix multiplication
By going over the image, each filter can focus on the local features
We will have filter specializing in recognizing the same element over multiple training images
The result of the convolution operation between kernel and image is called ACTIVATION MAP
Convolutional Neural Network: Pooling
16
Types of Pooling:
Max Pooling is more effective than Average Pooling for noise reduction and feature preservation.
Convolutional Neural Network: Pooling
17
Activation Maps (26x26)
Example Max Pooling (13x13)
Stride = 2 Pixel
Filter Size = 2x2 Pixel
Convolutional Neural Network
The last part of the network is usually a feedforward NN which reasons on such a representation: integrate learned features to make a final prediction.
18
Reduces parameter size compared to dense networks.
Captures spatial hierarchies (e.g., edges, textures, objects)
Design of a model
19
The Sequential model
20
A Sequential model is appropriate for a plain stack of layers where each layer has exactly one input tensor and one output tensor.
The Sequential model is used when the model architecture consists of a simple linear stack of layers.
Examples of projects with Sequential model:
Boundaries:
The Functional API
21
Examples of projects with Functional API model:
Composition of input data from LHCf
22
22
Composition of input data from LHCf
23
Energy released in the calorimeter tower
Dense Neural Network
Composition of input data from LHCf
24
Position of particle’s incidence in the last 2 xy planes of the tracer
1D
Convolutional
Neural Network
Composition of input data from LHCf
25
Position of particle’s incidence in the first 2 xy planes of the tracer
2D
Convolutional Neural Network
Creation of a 2D image