At a glance
- Who
- Dr. Gagik Gavalian and colleagues at Jefferson Lab, with Old Dominion University (Norfolk, Virginia).
- The task
- Track reconstruction: turning raw detector signals into particle paths. It took 80–90% of all event processing time.
- The problem
- At high beam intensity the detector fills with background, the possible combinations explode and good tracks get lost.
- The solution
- Two small feed-forward networks built with the open source Deep Netts community edition, inside the lab's Java software.
- The result
- 15.6% more tracks, 35% faster tracking and 15–35% more events for physics – from the same data.
See it in motion
One event in the CLAS12 detector, from the collision to the tracks the two Deep Netts networks pick out. Play it, pause it, or click a step.
- 0
- Segments
- 0
- Candidates
- 0
- Rejected
- 0
- Tracks found
A 10.6 GeV electron beam hits a 5 cm liquid-hydrogen target. This event has an electron and two pions – one of the reactions the paper analysed.
Source: G. Gavalian et al., CLAS12 Track Reconstruction with Artificial Intelligence (arXiv:2202.06869) – detector layout, network, two-pass workflow, Table 1, run conditions. The event drawn is illustrative.
Why tracking was the bottleneck
Jefferson Lab, a US Department of Energy laboratory in Newport News, Virginia, runs an electron accelerator called CEBAF. In its Hall B stands CLAS12, a large detector that studies what protons and neutrons look like inside.
The idea is simple: fire a tiny, well-understood particle – an electron – into a proton and watch what comes out. Which particles appear, in which directions and how fast tells physicists about the proton's inner structure. The data here come from standard running: a 10.6 GeV electron beam at 45 nA hitting a 5 cm cell of liquid hydrogen.
One collision, step by step
Collision
An electron hits a proton in the hydrogen target.
Particles fly out
For example the scattered electron and one or two pions.
The magnet bends them
A six-coil magnet curves charged particles; + and − bend opposite ways.
Drift chambers
Each particle crosses three regions of wire chambers in its sector.
Wires fire
Wires next to its path give a small signal – the raw data.
Six sectors, six superlayers
The magnet's six coils split the detector into six wedge-shaped sectors, and a particle stays inside one of them – so each sector is reconstructed on its own. On its way a particle crosses six chambers called superlayers; each is 6 layers of 112 wires.
From wires to segments
Inside one superlayer a particle lights up about one wire per layer, in a slanted row. Neighbouring fired wires are grouped into a segment, and each segment is summed up in one number: its average wire position. A full track is therefore just six numbers.
The puzzle: which segments belong together?
Every event leaves many segments – from real particles and from background. To build a track the software takes one segment from each superlayer and has to decide whether that combination is real. The number of combinations grows very fast. Click through the steps:
- 21
- segments
- 1,728
- possible tracks
- 2
- real tracks
What the chambers see
Each superlayer reports short pieces of track, called segments. Two of them belong to real particles; the rest is background from the intense beam. At this point the software cannot tell which is which.
One sector, simplified; positions illustrative.It gets worse exactly when physicists want more data. A stronger beam gives more collisions per second, but also more background – more combinations, and more good tracks lost among them. Tracks with one segment missing, about 10% of all tracks before, suffer most.
Where Deep Netts fits in
The team replaced one step – deciding which candidates are real tracks – with two neural networks. Everything before and after stays the same, including the precise fits that compute each particle's momentum and direction.
- ClusteringFired wires become segments. Unchanged.
- CandidatesOne segment per superlayer. Unchanged.
- Deep NettsClassifierScores every 6-segment candidate: positive, negative or false track.
- Deep NettsAuto-encoderFills in the missing segment of 5-segment candidates.
- Precise fitsOnly the chosen tracks are fitted. Unchanged.
Pass 1: complete tracks
- BuildEvery 6-segment candidate in the sector.
- Deep NettsScoreThe classifier rates each one.
- Keep the bestTake the top candidate, drop every rival that shares a segment with it, repeat.
Pass 2: one segment missing
- Build5-segment candidates from what pass 1 left.
- Deep NettsFill the gapThe auto-encoder adds the missing segment.
- Deep NettsScore againThe same classifier picks the good ones.
To measure the gain fairly, the reconstruction ran two branches on the same data – one choosing tracks the conventional way, one with the networks – and both fed the same fitting code. Every difference in the output comes from the track choice alone.
The two networks
1. The classifier
The team compared three kinds of models on CLAS12 data – a convolutional network, extremely randomized trees and a multi-layer perceptron. The plain feed-forward network (MLP) won on speed and accuracy.
- In: 6 numbers – the average wire position of the segment in each superlayer.
- Inside: three hidden layers of 12 neurons.
- Out: 3 scores – positive track, negative track, false track.
Why it works: a charged particle in a magnetic field draws a smooth curve, so its six positions follow a smooth pattern – bending one way for positive charge, the other for negative. A random mix of segments breaks the pattern, and the network learns to see that.
It was trained on real experimental data already processed by the conventional tracking: well-fitted tracks that lead back to the target were the positive and negative examples; six-segment combinations the conventional code did not accept were the false ones. According to the authors, it keeps improving with more training on new data.
FeedForwardNetwork classifier = FeedForwardNetwork.builder() .addInputLayer(6) // mean wire, SL1..SL6 .addFullyConnectedLayer(12, ActivationType.TANH) .addFullyConnectedLayer(12, ActivationType.TANH) .addFullyConnectedLayer(12, ActivationType.TANH) .addOutputLayer(3, ActivationType.SOFTMAX) // positive, negative, false .lossFunction(LossType.CROSS_ENTROPY) .build(); classifier.train(trainingSet); // tracks from conventional reconstructionfloat[] scores = classifier.predict(meanWires); // e.g. [0.93, 0.01, 0.06]Layer sizes from the paper; activation functions and names are illustrative – the paper does not list them.
2. The auto-encoder
An auto-encoder is a network trained to give back the same numbers it receives. That sounds useless – until you damage the input on purpose. The team took good tracks, set one of the six values to zero at random, and trained the network to return all six correctly. It learns to fill the gap with a value that fits the other five.
On tracks it had never seen, its guess was on average 0.36 wires from the true position – less than half the gap between two neighbouring wires – and equally good whichever superlayer was missing.
Mean wire position in superlayers 1 … 6
↓ auto-encoder: 6 in, 6 out ↓
Results
Measured on real CLAS12 data at 45 nA, with both branches running on the same events.
| Track type | Conventional | With Deep Netts | Gain |
|---|---|---|---|
| 6 superlayers | 242,145 | 256,175 | +5.8% |
| 5 superlayers (one missing) | 24,155 | 52,839 | ×2.19 |
| All tracks | 267,339 | 309,058 | +15.6% |
The biggest win is in the hardest case – tracks with a missing segment, where the combinations are most numerous. The more candidates there are, the more the network gains over trying them one by one.
Better as the beam gets stronger
Across runs from 5 to 70 nA, conventional tracking lost about 0.40% of its efficiency per nA of beam current; with Deep Netts it lost only 0.22% per nA.
More events for physics
Physicists measure reactions by counting events. In two reactions with a missing nucleon, the networks found many more events – evenly across the distribution, so the physics is not distorted.
What it means
- 35% faster tracking: far fewer weak candidates reach the precise fit only to fail there.
- Shorter experiments: the same statistical precision in less beam time, or at a higher beam current.
- Old data gains value: data already collected can be re-processed for up to 35% more statistics.
- Simpler code: the authors describe a very small codebase – build the candidates, hand them to the networks.
- Next: other CLAS12 tracking detectors and other Jefferson Lab experiments.
Why Java and Deep Netts
CLAS12 reconstruction runs on CLARA, a framework of Java microservices – one per detector. The lab's analysis and plotting tools are Java too.
The first prototypes were written in Python with Keras and TensorFlow. For production the networks had to live inside the Java reconstruction, so both were built with the Deep Netts community edition. The paper calls Deep Netts lightweight, with minimal dependencies – portable code, without a large number of platform-dependent packages.
In his article for Deep Netts, Dr. Gavalian adds that the most popular alternative needed native libraries for every platform – over 1 GB to link to their code – while others were incomplete or poorly documented. Deep Netts' documented API let the team build and test prototype networks quickly.
Sources
- G. Gavalian, P. Thomadakis, A. Angelopoulos, N. Chrisochoides, CLAS12 Track Reconstruction with Artificial Intelligence, arXiv:2202.06869 (v3, 2022) – every number on this page.
- G. Gavalian, Deep Learning in Java for Nuclear Physics using Deep Netts – why the team chose Deep Netts.
- CLAS12 at Jefferson Lab
Glossary (18 terms)
- CEBAF
- Continuous Electron Beam Accelerator Facility – Jefferson Lab's electron accelerator.
- GeV
- Giga-electronvolt, a unit of energy. At 10.6 GeV the electrons move at almost the speed of light.
- nA, beam current
- Nanoamperes – how many electrons per second hit the target. More current: more collisions, more background.
- Luminosity
- How many collisions per second the setup can produce; grows with beam current.
- Nucleon
- A proton or a neutron.
- Pion (π⁺, π⁻)
- A light particle often produced in these collisions; + or − is its charge.
- Event
- One recorded collision with everything that came out of it.
- Sector
- One of six wedge-shaped parts of the forward detector, between the magnet's coils.
- Drift chamber
- A gas-filled box with thin wires; wires near a charged particle's path give a signal.
- Superlayer
- A chamber of 6 layers × 112 wires. A particle crosses six of them.
- Segment (cluster)
- Neighbouring fired wires in one superlayer – a short piece of track.
- Track candidate
- One segment from each superlayer joined into a possible path.
- χ² (chi-squared)
- How well a fitted curve matches the hits; used to pick high-quality training tracks.
- Kalman filter
- A precise step-by-step fit that refines a track with the drift times of its hits.
- Missing mass
- The mass of the undetected particle, computed from everything detected; real reactions show a peak.
- MLP, feed-forward network
- The classic neural network: numbers in, layers of neurons, scores out.
- Auto-encoder
- A network trained to reproduce its input; trained on damaged inputs, it learns to repair them.
- Inference
- Using a trained network to get an answer, as opposed to training it.
