19 Parameters Is All You Need: Tiny Neural Networks for Particle Physics
As particle accelerators increase their collision rates, and deep learning
solutions prove their viability, there is a growing need for lightweight and
fast neural network architectures for low-latency tasks such as triggering. We
examine the potential of one recent Lorentz- and permutation-symmetric
architecture, PELICAN, and present its instances with as few as 19 trainable
parameters that outperform generic architectures with tens of thousands of
parameters when compared on the binary classification task of top quark jet
tagging.
Alexander Bogatskiy, Timothy Hoffman, Jan T. Offermann
# 19 Parameters Is All You Need:

###### Abstract

As particle accelerators increase their collision rates, and deep learning solutions prove their viability, there is a growing need for lightweight and fast neural network architectures for low-latency tasks such as triggering. We examine the potential of one recent Lorentz- and permutation-symmetric architecture, PELICAN, and present its instances with as few as 19 trainable parameters that outperform generic architectures with tens of thousands of parameters when compared on the binary classification task of top quark jet tagging.

## 1 Introduction

Particle collisions at the Large Hadron Collider at CERN happen every 25 nanoseconds, producing immense amounts of data that have to be processed in real time. Much of the event filtering is done by the Level-1 trigger [1; 5], which uses algorithms implemented on FPGAs that need to operate at below-microsecond latency to avoid loss of valuable data. Low-latency tasks include charged particle track reconstruction and energy measurements. Implementing neural networks under such constraints is a significant challenge, however the most recent attempts to do so have finally surpassed their traditional non-ML counterparts. The current state-of-the-art implementations in this area are based on the JEDI-net Graph Neural Network (GNN) architecture, see [17; 23; 24]. The network input data consist of lists of jet constituents, with a certain number of geometric features describing each constituent.

GNN architectures are inherently permutation-equivariant, providing a significant boost to efficiency and model size by virtue of weight sharing, but no other physical symmetries are necessarily respected. Physics-informed architectures that are inherently equivariant with respect to rotational and Lorentz-boost symmetries have recently shown themselves to provide state-of-the-art performance at tasks such as jet tagging (see e.g. [2; 3; 4; 9; 12; 15]), and they do so despite the relatively small model size.

In this work we study the current state-of-the-art architecture for top-quark jet tagging, PELICAN [4]. It is fully Lorentz-invariant and its permutation-equivariant layers are based on the general higher-order permutation-equivariant mappings introduced in [16; 19]. The full reduction of all relevant symmetries allows small instances of PELICAN with just a few thousand parameters to perform on par with much larger models with hundreds of thousands or even millions of parameters.
Moreover, the simplicity of the architecture presents a unique opportunity for explainability and even interpretability.

Our goal here is to explore the small model size limit of PELICAN and compare it against the previous state-of-the-art (and also Lorentz-equivariant) architecture, LorentzNet [9]. The benchmark task for this comparison is that of top-quark tagging due to the publicly available dataset [10] and the extensive prior exploration of architectures trained on it [12]. The input consists of a list of \(N\) 4-momenta of jet constituents, \(\{p_{i}\}_{i=1}^{N}\) which PELICAN reduces to the \(N\times N\) array of pairwise Lorentz-invariant dot products, \(d_{ij}=p_{i}\cdot p_{j}\). Thus the reduced input is an array with one channel. We find that a stripped down version of PELICAN consisting of nothing but two linear permutation-equivariant blocks with just two channels in the hidden layer and exactly one nonlinear activation function in between outperforms generic architectures such as the fully-connected TopoDNN which has 59k parameters [12]. This model nominally has 26 parameters, but through absorption of multiplicative factors and a simplification of the output layer that number can be effectively reduced to 19. Despite the costly \(N^{2}\) scaling of the memory that PELICAN requires, its symmetric architecture can provide ultra-lightweight networks that can be viably used in low-latency and high-throughput applications.

## 2 The original PELICAN architecture

The original PELICAN architecture consists of an input block which encodes the \(N\times N\) array of pairwise dot products \(\{d_{ij}\}\), followed by a sequence of so-called \(\text{Eq}_{2\to 2}\) permutation-equivariant blocks (the index 2 indicates the rank of the input and output arrays) that produce transformed \(N\times N\) arrays. Each of these blocks consists of a fully-connected "messaging" layer that mixes the channels but is shared among all components of the \(N\times N\) array, and an "aggregation" layer that applies a general linear permutation-equivariant operation that exchanges information between the various components of the array. Finally, a similar \(\text{Eq}_{2\to 0}\) block reduces the array to a permutation-invariant (rank 0) scalar, after which an output MLP layer produces the two binary classification weights \(\{w_{0},w_{1}\}\). The diagram below summarizes this architecture, see [4] for details.

\[\{d_{ij}\}\ \xrightarrow{}\text{Emb}\ \xrightarrow{}\text{[Eq}_{2\to 2}]^{L}\ \xrightarrow{}\text{Eq}_{2\to 0}\ \xrightarrow{}\text{MLP}\ \xrightarrow{}\{w_{c}\} \tag{1}\]

Notably, the aggregation step inside \(\text{Eq}_{2\to 2}\), called \(\text{LinEq}_{2\to 2}\), applies 15 different operations that provide a basis for the space of all linear permutation-equivariant transformations of rank 2 arrays, which temporarily increases the size of the activation by a factor of 15, marking the peak of PELICAN's memory utilization. This is followed by a trainable linear layer that applies \((C_{\text{in}}\times 15)\times C_{\text{out}}\) weights and adds two biases per channel (one bias added to the entire \(N\times N\) array and one only to the diagonal), where \(C_{\text{in}}\) and \(C_{\text{out}}\) are the number of input and output channels. Similarly, \(\text{Eq}_{2\to 0}\) involves only 2 aggregators (total sum and trace), a linear layer of shape \((C_{\text{in}}\times 2)\times C_{\text{out}}\), and one bias per channel.

## 3 nanoPELICAN architecture

In this section we simplify the PELICAN architecture to a single hidden layer and reduce parameters further based on symmetry arguments, which we refer to as nanoPELICAN (nPELICAN). The only two linear symmetric observables that can be constructed from the input dot products (assuming sum-based aggregation that does not explicitly depend on the multiplicity \(N\)) are \(N\), the jet mass \(m_{J}^{2}=\sum_{i,j}d_{ij}\), and the total mass \(\sum_{i}d_{ii}\). The top-tagging dataset has only massless constituents, so the latter observable is irrelevant. A non-parametric top-dagger based on a simple jet mass cut achieves an AUC of only 90.6%. A linear PELICAN, which outputs \(p(N)m_{J}^{2}+q(N)\) with some learned polynomials \(p\) and \(q\), cannot far exceed this.

To this end, we set out to find the smallest and most interpretable modification of PELICAN that is still nonlinear and performs competitively on the top-tagging task. We thus omit the input embedding layer, all messaging layers, and the output MLP, and are left with just two linear equivariant blocks, \(\text{LinEq}_{2\to 2}\) and \(\text{LinEq}_{2\to 0}\), separated by a single activation function, which we choose to be ReLU. The architecture is summarized in the following diagram:

\[\{d_{ij}\}\ \xrightarrow{}\text{LinEq}_{2\to 2}^{\text{nano}}\ \xrightarrow{}\text{ReLU}\ \xrightarrow{}\text{LinEq}_{2\to 0}\ \xrightarrow{}\{w_{c}\}. \tag{2}\]
Here, we also notice that since the array of dot products, \(\{d_{ij}\}\), is symmetric, and since the constituents in the top-tagging dataset are massless (\(d_{ii}=0\)), many of the 15 basis aggregators in LinEq\({}_{2\to 2}\) are redundant. We remove 5 aggregators that depend only on the diagonal of the input, and one from each of 4 pairs of aggregators that attain the same value on symmetric inputs. We are left with just 6 aggregators which constitute LinEq\({}_{2\to 2}^{\text{nano}}\). To help with training, each equivariant layer is still preceded by a Dropout layer. Moreover, keeping BatchNorm layers just before the dropout can also help the model converge, meanwhile the extra parameters from these layers can be almost completely absorbed into the linear layers for inference. Namely, the multiplicative weights of BatchNorm can be absorbed into the following LinEq\({}_{2\to 2}\), whereas the biases can be either left or absorbed into the biases of LinEq\({}_{2\to 2}\) at the cost of turning them into quadratic polynomials of \(N\), adding 2 parameters per output channel. Since there are two distinct bias parameters per channel, such a BatchNorm effectively adds \(\min\{C_{\text{in}},4C_{\text{out}}\}\) parameters. In the case of LinEq\({}_{2\to 0}\) there is only one bias parameter per channel, thus the number of added parameters is \(\min\{C_{\text{in}},2C_{\text{out}}\}\).

The only remaining hyperparameter is \(C_{\text{hidden}}\), the number of channels in the hidden layer (between LinEq\({}_{2\to 2}\) and LinEq\({}_{2\to 0}\)). The total number of parameters is then \(1\times 6\times C_{\text{hidden}}+2\cdot C_{\text{hidden}}+C_{\text{hidden}} \times 2\times 2+2=12C_{\text{hidden}}+2\) (ignoring BatchNorm). In addition, since for binary classification only the difference in weights \(w_{1}-w_{0}\) matters, it is possible to have only 1 output channel, in which case we have \(10C_{\text{hidden}}+1\) parameters. The models presented below produce only one output weight called \(w\). Leaving in the two BatchNorm layers effectively adds only 3 new parameters if \(C_{\text{hidden}}>1\) and 2 otherwise. Finally, since we're using the ReLU activation, which is a homogenous function, one more multiplicative factor can be absorbed in each channel. The final number of parameters then is \(9C_{\text{hidden}}+4\) for \(C_{\text{hidden}}>1\) and 12 otherwise.

## 4 Top tagging performance

The top tagging dataset [10] consists of anti-\(k_{T}\) jets [6] corresponding with top quarks (signal) and light quarks or gluons (background). It includes up to 200 jet constituents per entry, each represented by a 4-momentum in Cartesian coordinates. A converted version of the dataset that can be directly used with PELICAN can be found at [11]. For our models we only use the 80 constituents with the highest transverse momentum \(p_{T}=\sqrt{p_{\pi}^{2}+p_{y}^{2}}\), which is typically enough to saturate our network's performance. We follow a training regime almost identical to that in [4], using an Nvidia H100 GPU. The only changes are that we disable weight decay, extend the training to 140 epochs (4 epochs of linear warm-up, 124 epochs of CosineAnnealingLR with \(T_{0}=4\) and \(T_{\text{mult}}=2\), and 12 epochs of exponential decay with \(\gamma=0.5\)), and increase the batch size to 512. Training took about 30 ms per batch, and the evaluation took about 23 ms per batch (including overhead).

We train several models with \(C_{\text{hidden}}\) ranging from 1 to 10. For comparison, we also train instances of LorentzNet with only one message passing block and the number of channels in the hidden layers set to 3 and the batch size of 512 (no other changes to hyperparameters and training were made). The results are reported in Table 2. We report the accuracy, the area under the ROC, and the background rejection (inverse false positive rate) at 30% signal efficiency (true positive rate). For each architecture, we pick the model with the lowest cross-entropy loss out of 10 trained instances initialized with different random seeds.

We observe that nPELICAN achieves competitive AUC and background rejection with as few as 2 channels in the hidden layer. In fact, its AUC surpasses that of the fully-connected TopoDNN with 59k parameters [12] (its average accuracy was 0.929(1), AUC 0.964(14), and background rejection \(424\pm 82\)). Moreover, the AUC of nPELICAN with 10 channels (101 parameters) is only about 1% behind that of ParticleNet (498k parameters) [21] and even ParT (2.1M parameters) [22]. Meanwhile,

\begin{table}
\begin{tabular}{l c c c c} \hline \hline Architecture & Accuracy & AUC & \(1/\epsilon_{B}\) & \# Params \\ \hline LorentzNet\({}_{n_{\text{hidden}}=3}\) & 0.907(2) & 0.966(3) & 174\(\pm\)44 & 120 \\ nPELICAN\({}_{C_{\text{hidden}}=10}\) & 0.921(1) & 0.9748(1) & 327\(\pm\)20 & 101 \\ nPELICAN\({}_{C_{\text{hidden}}=3}\) & 0.919(1) & 0.9730(4) & 256\(\pm\)12 & 31 \\ nPELICAN\({}_{C_{\text{hidden}}=2}\) & 0.918(1) & 0.9718(6) & 243\(\pm\)18 & 21 \\ nPELICAN\({}_{C_{\text{hidden}}=1}\) & 0.895(1) & 0.950(2) & 81\(\pm\)12 & 11 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of tiny top-taggers. Averaged over the top 5 (lowest loss) out of 25 random seeds. Uncertainty given by the standard deviation. \(1/\epsilon_{B}\) is the background rejection at 30% signal efficiency.
LorentzNet with one message-passing block lags far behind nPELICAN with a similar number of parameters. A visual comparison with many existing models is presented in Figure 1.

Interestingly, at such low depth the removal of fully connected messaging layers from PELICAN actually improved the performance. The element of the original network that can boost nPELICAN's performance the most with only a few new parameters is the \(N\)-dependent scaling of aggregators.

In our tests, replacing sum aggregation with means led to very low performance of nPELICAN, however enabling PELICAN's original flexible scaling of the means by an extra factor of \(N^{\alpha}/\bar{N}^{\alpha}\) turns out to be very beneficial, see Table 2.

## 5 Interpreting nanoPELICAN

Considering the extremely low complexity and relatively high performance of nPELICAN, there is high potential for a full interpretation of the model. Before attempting to interpret the weights, it is crucial to minimize any redundancies. In particular, since ReLU is a homogenous function, one multiplicative factor from the weights in LinEq\({}_{2\to 0}\) can be absorbed into the weights and biases of LinEq\({}_{2\to 2}\) in each channel of the hidden layer. For the model with \(C_{\text{hidden}}=2\) this means that the number of parameters can effectively be reduced to 19. Explicitly, the model can be written analytically as

\[w=b^{2\to 0}+\sum_{h=1}^{C_{\text{hidden}}}c_{0h}^{2 \to 0}\frac{1}{\bar{N}^{2}}\sum_{t,j}\text{ReLU}\left(\sum_{b=1}^{6}c_{bh}^{2 \to 2}\text{Agg}_{b}(d)_{ij}+b_{h}^{2\to 2}+b_{\text{diag},h}^{2 \to 2}\delta_{ij}\right)+\\ +\sum_{h=1}^{C_{\text{hidden}}}c_{1h}^{2\to 0}\frac{1}{\bar{N} }\sum_{i=j}\text{ReLU}\left(\sum_{b=1}^{6}c_{bh}^{2\to 2}\text{Agg}_{b}(d)_{ij}+b_{h}^{2 \to 2}+b_{\text{diag},h}^{2\to 2}\delta_{ij}\right). \tag{3}\]

Here, \(w\) is the output score (the jet is tagged as a top quark if \(w>0\)); \(c^{2\to 2}\), \(b^{2\to 2}\), and \(b_{\text{diag}}^{2\to 2}\) are the weights and biases of LinEq\({}_{2\to 2}\); \(c^{2\to 0}\) and \(b^{2\to 0}\) are the weights and the basis of LinEq\({}_{2\to 0}\); index \(b\) enumerates the 6 aggregators of LinEq\({}_{2\to 2}\); index \(h\) enumerates the channels in the hidden layer. \(\bar{N}\) is a hyperparameter that is used to control the magnitude of the sums over constituents, here set to be 49 (it is similarly used inside the aggregators Agg\({}_{b}\)).

\begin{table}
\begin{tabular}{l r r r r} \hline nPELICAN\({}_{N}\) width & Accuracy & AUC & \(1/\epsilon_{B}\) & \# Params \\ \hline \(C_{\text{hidden}}=10\) & 0.923(1) & 0.9764(1) & 448\(\pm\)10 & 108 \\ \(C_{\text{hidden}}=3\) & 0.9214(3) & 0.9752(2) & 384\(\pm\)16 & 38 \\ \(C_{\text{hidden}}=2\) & 0.9200(3) & 0.9745(1) & 368\(\pm\)17 & 28 \\ \(C_{\text{hidden}}=1\) & 0.902(2) & 0.960(2) & 150\(\pm\)16 & 18 \\ \hline \end{tabular}
\end{table}
Table 2: Performance of nPELICAN\({}_{N}\) – nPELICAN with \(N^{\alpha}\)-scaled aggregators. Metrics defined as in Table 2.

Figure 1: Comparison of top-tagger background rejection performance at signal efficiency \(\epsilon_{S}=0.3\) as a function of the number of parameters in each model considered. Results other than nPELICAN are taken from refs. [2, 4, 7, 9, 12, 13, 14, 18, 20, 21, 22]. Note that the curve for the original PELICAN was obtained by varying only the network width, so only the rightmost point is fully optimized.
Therefore the ReLU effectively sets a linear constraint on the dot products, and the output takes a sum over only those pairs \((i,j)\) that satisfy the constraint. More explicitly, denoting the jet momentum by \(J=\sum_{i}p_{i}\), the argument of the ReLU is a linear combination of relative masses (\(m_{ij}^{2}=-(p_{i}-p_{j})^{2}=2d_{ij}\)), jet-frame masses \(p_{i}\cdot J\), \(p_{j}\cdot J\), the jet mass \(m_{J}^{2}=\sum_{ij}d_{ij}\), and a constant term. In addition, we found that these parameters are stable across multiple random initializations, indicating that they can be directly interpreted as unique physical constraints that encode Lorentz-invariant quantities such as the top quark mass, which we intend to elucidate in future work.

## 6 Conclusions

We have presented nPELICAN, a miniaturized a version of the PELICAN architecture, which is both surprisingly performant relative to much larger networks and can be rewritten simply as a constraint on Lorentz invariant quantities with a single ReLU activation function. This represents a novel development in interpretability for neural networks in particle physics, and gives hope for the interpretability of much larger networks. Future studies will exploit the stability of the nPELICAN parameters to determine their dependencies on features of the training data such as jet energies and particle masses, as well as relating these parameters to traditional, discriminating kinematic variables for jet-tagging, such as jet constituent multiplicity, subjet multiplicity [25] and jet shapes [8]. The code can be found at [https://github.com/abogatskiy/PELICAN-nano](https://github.com/abogatskiy/PELICAN-nano).
