How Far Can Foundation Models Be Distilled for Efficient Jet Tagging?
Organizations: BITS Pilani, KEK · BITS Pilani
Abstract
Jet tagging is one of the most important applications of machine learning at the Large Hadron Collider. Recent models build in more physics knowledge or rely on large-scale pretraining, but the experiments place strict limits on their inference cost. Knowledge distillation can transfer their performance to small students that are cheap to run. We ask which properties of a teacher help the student, how small a student can get and how close it can come to the state of the art. On a jet tagging benchmark, we distil six teachers that differ in architecture, symmetry and pretraining, including two foundation models, into five small students. Every teacher improves every student, and the gain depends mainly on the strength of the teacher. We then shrink our two strongest distilled students, Transformer and L-GATr-slim, in width and in depth. With 20 thousand parameters, a distilled L-GATr-slim outperforms every published jet tagger trained from scratch at a fraction of the inference cost of every teacher. Even with two thousand parameters, it matches ParT, a model with a thousand times as many parameters. We also study what the students learn from their teachers. Our benchmark of inference cost shows that students of the same size can differ by almost an order of magnitude in speed. We release the code and the weights of all trained models.
Figures & tables
| Teacher | Params | AUC | ( ) | ( ) |
| ParT | 2.1M | 0.98571 0.00011 | 394 14 | 1,586 19 |
| MIParT | 0.7M | 0.98632 0.00005 | 467 5 | 1,871 69 |
| L-GATr ∗ | 1.1M | 0.98680 0.00005 | 528 14 | 2,189 176 |
| L-GATr-slim ∗ | 2.0M | 0.98711 0.00008 | 541 5 | 2,321 46 |
| OmniLearned-S † | 2.7M | 0.98746 0.00001 | 546 11 | 2,403 100 |
| ParT-f.t. † | 2.1M | 0.98769 0.00005 | 644 16 | 2,556 0.2 |
| Student | Params | AUC | ( ) | ( ) |
|---|---|---|---|---|
| Transformer | 188k | 0.98512 0.00013 | 393 5 | 1,612 121 |
| LorentzNet ∗ | 203k | 0.98556 0.00010 | 413 16 | 1,714 83 |
| ParT | 205k | 0.98565 0.00004 | 384 7 | 1,603 76 |
| MIParT | 200k | 0.98580 0.00019 | 410 5 | 1,767 83 |
| L-GATr-slim ∗ | 202k | 0.98622 0.00016 | 425 20 | 1,704 80 |
| Student | |||||
| Teacher | Transformer | LorentzNet ∗ | ParT | MIParT | L-GATr-slim ∗ |
| No teacher | 0.98512 0.00013 | 0.98556 0.00010 | 0.98565 0.00004 | 0.98580 0.00019 | 0.98622 0.00016 |
| ParT | 0.98617 0.00010 | 0.98630 0.00010 | 0.98607 0.00001 | 0.98624 0.00005 | 0.98643 0.00005 |
| MIParT | 0.98646 0.00007 | 0.98655 0.00010 | 0.98622 0.00008 | 0.98631 0.00002 | 0.98660 0.00001 |
| L-GATr ∗ | 0.98680 0.00011 | 0.98671 0.00018 | 0.98659 0.00007 | 0.98675 0.00007 | 0.98693 0.00001 |
| L-GATr-slim ∗ | 0.98691 0.00006 | 0.98685 0.00014 | 0.98671 0.00011 | 0.98690 0.00011 | 0.98712 0.00007 |
| No teacher | ParT-f.t. † | ||||||
|---|---|---|---|---|---|---|---|
| Student | Params | AUC | AUC | ||||
| Transformer | 1.2k | 0.97422 0.00052 | 115 4 | 398 27 | 0.97401 0.00049 | 112 5 | 377 11 |
| 16k | 0.98388 0.00012 | 318 14 | 1,246 57 | 0.98624 0.00019 | 488 8 | 1,975 67 | |
| 84k | 0.98495 0.00012 | 373 8 | 1,431 46 | 0.98688 0.00009 | 557 18 | 2,347 57 | |
| L-GATr-slim ∗ | 1.8k | 0.98491 0.00018 | 358 5 | 1,449 86 | 0.98567 0.00004 | 416 22 | 1,872 153 |
| GPU | CPU | |||||||
| Model | Params | AUC | MFLOP | jets/s | MB | ms/jet | ||
| Teachers | ||||||||
| ParT | 2.1M | 0.98571 | 394 14 | 1,586 19 | 197 | 18,198 | 1,099 | 7.9 |
| MIParT | 0.7M | 0.98632 | 467 5 | 1,871 69 | 76.0 | 7,225 | 5,132 | 8.9 |
| L-GATr ∗ | 1.1M | 0.98680 | 528 14 | 2,189 176 | 1,868 | 4,263 | 707 | 50.5 |
| L-GATr-slim ∗ | 2.0M | 0.98711 | 541 5 | 2,321 46 | 309 | 16,546 | 339 | 8.1 |
Appendix figures & tables28 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Width | Heads | Blocks | Read-out | Params |
| Teachers | |||||
| ParT | 128 | 8 | 8 + 2 | class token | 2,141,005 |
| MIParT | 64 | 8 | 5 + 5 + 2 | class token | 656,949 |
| L-GATr ∗ | 16 mv, 32 s | 8 | 12 | global token | 1,077,474 |
| L-GATr-slim ∗ | 32 v, 96 s | 8 | 12 | global token | 2,030,817 |
| OmniLearned-S † | 128 | 8 | 8 + 2 | 4 class tokens | 2,708,149 |
| Model | Optimizer | Learning rate | Weight decay | Batch | Steps | Schedule |
| Transformer | AdamW | 0.1 | 256 | 200,000 | cosine | |
| LorentzNet ∗ | AdamW | 128 | 336,000 | cosine | ||
| ParT | Ranger | 512 | 48,000 | flat, then decay | ||
| MIParT | Ranger | 256 | 72,000 | flat, then decay | ||
| L-GATr-slim ∗ | Lion | 2 | 128 | 200,000 | cosine | |
| Transformer 84k | AdamW | 0.1 | 256 | 200,000 | cosine |
| This work | Published | |||||||
| Model | Params | AUC | Params | AUC | ||||
| ParT | 2.1M | 0.98571 0.00011 | 394 14 | 1,586 19 | 2.1M | 0.9858 | 413 16 | 1,602 81 |
| MIParT | 0.7M | 0.98632 0.00005 | 467 5 | 1,871 69 | 0.7M | 0.9868 | 505 8 | 2,010 97 |
| L-GATr ∗ | 1.1M | 0.98680 0.00005 | 528 14 | 2,189 176 | 1.1M | 0.9870 0.0001 | 540 20 | 2,240 70 |
| L-GATr-slim ∗ | 2.0M | 0.98711 0.00008 | 541 5 | 2,321 46 | 2.0M | 0.9869 0.0001 | 546 7 | 2,264 93 |
| Single run | Ensemble of three runs | |||||
| Teacher | AUC | AUC | ||||
| ParT | 0.98571 0.00011 | 394 14 | 1,586 19 | 0.98630 | 448 | 1,960 |
| MIParT | 0.98632 0.00005 | 467 5 | 1,871 69 | 0.98663 | 499 | 1,972 |
| L-GATr ∗ | 0.98680 0.00005 | 528 14 | 2,189 176 | 0.98719 | 554 | 2,462 |
| L-GATr-slim ∗ | 0.98711 0.00008 | 541 5 | 2,321 46 | 0.98748 | 589 | 2,490 |
| Student | |||||
|---|---|---|---|---|---|
| Teacher | Transformer | LorentzNet ∗ | ParT | MIParT | L-GATr-slim ∗ |
| AUC | |||||
| L-GATr-slim ∗ | 0.98691 0.00006 | 0.98685 0.00014 | 0.98671 0.00011 | 0.98690 0.00011 | 0.98712 0.00007 |
| L-GATr-slim ∗ ens. | 0.98701 0.00003 | 0.98711 0.00009 | 0.98678 0.00010 | 0.98698 0.00010 | 0.98719 0.00003 |
| OmniLearned-S † | 0.98705 0.00007 | 0.98713 0.00018 | 0.98677 0.00010 | 0.98705 0.00010 | 0.98727 0.00002 |
| at | |||||
| Student | |||||
| Teacher | Transformer | LorentzNet ∗ | ParT | MIParT | L-GATr-slim ∗ |
| at | |||||
| No teacher | 393 5 | 413 16 | 384 7 | 410 5 | 425 20 |
| ParT | 441 20 | 446 25 | 423 12 | 441 12 | 458 12 |
| MIParT | 482 9 | 488 2 | 448 10 | 474 11 | 487 9 |
| L-GATr ∗ | 537 14 | 527 9 | 512 8 | 523 9 | 533 24 |
| L-GATr ∗ | OmniLearned-S † | ||||||
|---|---|---|---|---|---|---|---|
| Student | Params | AUC | AUC | ||||
| Transformer | 1.2k | 0.97391 0.00031 | 113 5 | 391 26 | 0.97360 0.00038 | 111 3 | 377 17 |
| 16k | 0.98590 0.00009 | 457 9 | 1,876 142 | 0.98615 0.00021 | 468 20 | 1,976 120 | |
| 84k | 0.98658 0.00011 | 503 19 | 2,230 133 | 0.98669 0.00006 | 530 6 | 2,152 183 | |
| L-GATr-slim ∗ | 1.8k | 0.98560 0.00012 | 403 2 | 1,773 67 | 0.98543 0.00046 | 404 16 | 1,731 167 |
| No teacher | ParT-f.t. † | |||||||
|---|---|---|---|---|---|---|---|---|
| Student | Blocks | Params | AUC | AUC | ||||
| Transformer | 0 | 433 | 0.86367 | 10 | 16 | 0.86364 | 10 | 16 |
| 1 | 19k | 0.98143 | 222 | 869 | 0.98275 | 257 | 1,128 | |
| 2 | 38k | 0.98360 | 300 | 1,224 | 0.98577 | 435 | 1,771 | |
| 3 | 57k | 0.98459 | 346 | 1,355 | 0.98648 | 492 | 2,103 | |
| L-GATr ∗ | OmniLearned-S † | |||||||
|---|---|---|---|---|---|---|---|---|
| Student | Blocks | Params | AUC | AUC | ||||
| Transformer | 0 | 433 | 0.86357 | 10 | 16 | 0.86364 | 10 | 16 |
| 1 | 19k | 0.98295 | 273 | 1,091 | 0.98261 | 257 | 1,020 | |
| 2 | 38k | 0.98549 | 408 | 1,836 | 0.98557 | 425 | 1,711 | |
| 3 | 57k | 0.98641 | 502 | 2,148 | 0.98647 | 506 | 2,040 | |
| Transformer | LorentzNet ∗ | ParT | MIParT | L-GATr-slim ∗ | ||||||
| Teacher | without | with | without | with | without | with | without | with | without | with |
| Background jets the teacher rejects | ||||||||||
| ParT | 185 | 87 | 178 | 76 | 179 | 105 | 163 | 87 | 145 | 71 |
| MIParT | 201 | 74 | 183 | 69 | 186 | 91 | 150 | 60 | 156 | 61 |
| L-GATr ∗ | 248 | 77 | 222 | 85 | 243 | 105 | 217 | 87 | 191 | 73 |
| L-GATr-slim ∗ | 253 | 88 | 224 | 91 | 255 | 111 | 229 | 95 | 200 | 74 |
| Fastest setting | ||||
|---|---|---|---|---|
| Model | Particle lists | Attention | GPU | CPU |
| ParT | padded | built-in | padded, compiled, built-in | padded, compiled, built-in |
| MIParT | padded | built-in | padded, compiled, built-in | padded, compiled, built-in |
| L-GATr ∗ | packed, padded | xFormers, Flex | packed, compiled, xFormers | padded, compiled, xFormers |
| L-GATr-slim ∗ | packed, padded | xFormers, Flex | packed, compiled, xFormers | packed, compiled, xFormers |
| OmniLearned-S † | padded | built-in | padded, compiled, built-in | padded, compiled, built-in |
| GPU | CPU | |||
| Model | Params | jets/s | MB | ms/jet |
| Teachers | ||||
| ParT | 2.1M | 38,503 | 388 | 7.3 |
| MIParT | 0.7M | 28,320 | 1,007 | 8.5 |
| L-GATr ∗ | 1.1M | 5,641 | 785 | 47.6 |
| L-GATr-slim ∗ | 2.0M | 17,485 | 351 | 7.6 |
| GPU | CPU | |||||||
| Model | Params | AUC | MFLOP | jets/s | MB | ms/jet | ||
| Students | ||||||||
| Transformer | 188k | 0.98512 | 393 5 | 1,612 121 | 21.6 | 70,175 | 87 | 2.7 |
| LorentzNet ∗ | 203k | 0.98556 | 413 16 | 1,714 83 | 537 | 7,601 | 1,722 | 11.0 |
| ParT | 205k | 0.98565 | 384 7 | 1,603 76 | 21.9 | 26,228 | 2,166 | 2.3 |
| MIParT | 200k | 0.98580 | 410 5 | 1,767 83 | 20.4 | 12,181 | 1,709 | 7.8 |
| GPU | CPU | |||||||
| Model | Params | AUC | MFLOP | jets/s | MB | ms/jet | ||
| Teacher | ||||||||
| ParT | 2.1M | 0.98571 | 394 14 | 1,586 19 | 197 | 18,198 | 1,099 | 7.9 |
| Students | ||||||||
| Transformer | 188k | 0.98617 | 441 20 | 1,826 143 | 21.6 | 70,175 | 87 | 2.7 |
| LorentzNet ∗ | 203k | 0.98630 | 446 25 | 1,897 96 | 537 | 7,601 | 1,722 | 11.0 |
| GPU | CPU | |||||||
| Model | Params | AUC | MFLOP | jets/s | MB | ms/jet | ||
| Teacher | ||||||||
| MIParT | 0.7M | 0.98632 | 467 5 | 1,871 69 | 76.0 | 7,225 | 5,132 | 8.9 |
| Students | ||||||||
| Transformer | 188k | 0.98646 | 482 9 | 1,834 95 | 21.6 | 70,175 | 87 | 2.7 |
| LorentzNet ∗ | 203k | 0.98655 | 488 2 | 1,758 71 | 537 | 7,601 | 1,722 | 11.0 |
| GPU | CPU | |||||||
| Model | Params | AUC | MFLOP | jets/s | MB | ms/jet | ||
| Teacher | ||||||||
| L-GATr ∗ | 1.1M | 0.98680 | 528 14 | 2,189 176 | 1,868 | 4,263 | 707 | 50.5 |
| Students | ||||||||
| Transformer | 188k | 0.98680 | 537 14 | 2,294 166 | 21.6 | 70,175 | 87 | 2.7 |
| LorentzNet ∗ | 203k | 0.98671 | 527 9 | 2,260 37 | 537 | 7,601 | 1,722 | 11.0 |
| GPU | CPU | |||||||
| Model | Params | AUC | MFLOP | jets/s | MB | ms/jet | ||
| Teacher | ||||||||
| L-GATr-slim ∗ | 2.0M | 0.98711 | 541 5 | 2,321 46 | 309 | 16,546 | 339 | 8.1 |
| Students | ||||||||
| Transformer | 188k | 0.98691 | 546 10 | 2,374 103 | 21.6 | 70,175 | 87 | 2.7 |
| LorentzNet ∗ | 203k | 0.98685 | 539 6 | 2,261 38 | 537 | 7,601 | 1,722 | 11.0 |
| GPU | CPU | |||||||
| Model | Params | AUC | MFLOP | jets/s | MB | ms/jet | ||
| Teacher | ||||||||
| OmniLearned-S † | 2.7M | 0.98746 | 546 11 | 2,403 100 | 427 | 3,736 | 13,221 | 17.0 |
| Students | ||||||||
| Transformer | 188k | 0.98705 | 565 6 | 2,325 121 | 21.6 | 70,175 | 87 | 2.7 |
| LorentzNet ∗ | 203k | 0.98713 | 536 12 | 2,483 120 | 537 | 7,601 | 1,722 | 11.0 |
Jet Tagging
Jet tagging uses particle-collision data to classify jets by their underlying particles or processes, supporting precision measurements and searches for new physics.
See all 18 papers