To measure how matter and antimatter decay differently, experiments must know whether each neutral B meson was born as a particle or an antiparticle. A "flavour tagger", a classifier that reads the other tracks in the collision, makes this call. Its mistakes dilute the measured CP asymmetry, the matter–antimatter difference, and the dilution enters quadratically into statistical power. Neural taggers now beat expert systems in simulation. On real data they lose ground, because they are trained on simulation that does not match the detector. They also produce one confidence number per event, and that number is only as trustworthy as the simulation.
This note proposes building the tagger's internal representation around fixed, mutually orthogonal target vectors. One direction encodes flavour and flips sign exactly when every particle's charge is flipped. Separate orthogonal directions encode which physical mechanism carried the flavour information, for example a lepton or kaon from the other B decay. Whatever the network represents outside this designed span is unexplained structure, and its size is a per-event reliability signal that comes from internal layers rather than from the output. The claim is that this residual identifies the events where the simulation-trained mistag estimate is wrong in data. Calibrating with it should recover tagging power that is currently lost to simulation mismatch, while exact charge antisymmetry removes the share of matter/antimatter tagging asymmetry that comes from the algorithm itself.
Why the obvious combination is not enough
The tempting move is to replace the tagger's sigmoid with a Hadamard codebook. A Hadamard matrix has $\pm1$ entries and mutually orthogonal rows, and it is what Central Similarity Quantization and Hadamard Matrix Guided Online Hashing use as fixed class targets for image retrieval. With only two classes, $B^0$ and $\bar B^0$, the best codebook is a pair of opposite codes $c$ and $-c$. A per-bit loss against these codes then reduces to a scalar logit on the projection onto $c$, so nothing is gained. The gains reported in hashing (mAP 0.851 vs 0.652 at 16 bits on ImageNet for CSQ) come from many-class geometry and from avoiding pairwise losses. A binary tagger has neither problem. We therefore do not propose a codebook output.
Orthogonal codes become useful when there are several things to represent that should not interfere. Flavour taggers already have such structure. The Belle II category-based tagger in B-flavor tagging at Belle II splits the evidence into 13 physical categories (leptons, kaons, slow pions, and so on) and combines them with a boosted decision tree. That tagger outperformed the deep network on real data, with $\epsilon_{\text{eff}}$ of 30.0% vs 28.8%, a gap the authors attribute to mismodelled particle-identification inputs. We take the categories as additional orthogonal code directions and attach them to internal layers, not to the output.
Core Claim
Let $h_\ell(x)$ be a pooled, linearly projected slice of the activations at layer $\ell$ of a permutation-invariant set network on event $x$, in the style of the DeepSet of Fast Inclusive Flavour Tagging at LHCb. Let $\mathcal{C}$ be charge conjugation, which flips every track's charge and swaps particle-identification hypotheses accordingly. We take the rows $c_0, c_1, \dots, c_M$ of a $K\times K$ Hadamard matrix. Here $c_0$ is the flavour axis, $c_1,\dots,c_M$ are the mechanism categories with labels from simulation truth, and $M<K$. The representation is split by construction into a charge-odd part and a charge-even part:
$$ h^{-}_\ell(x)=\tfrac12\big(h_\ell(x)-h_\ell(\mathcal{C}x)\big),\qquad h^{+}_\ell(x)=\tfrac12\big(h_\ell(x)+h_\ell(\mathcal{C}x)\big). $$
Training pulls $h^-_\ell$ toward $q\,c_0$, where $q=\pm1$ is the true flavour. It pulls $h^+_\ell$ toward the codes of the mechanisms present in simulation truth, using the cosine-to-fixed-anchor objective of One Loss for All. The tagging logit is the projection of the last-layer $h^-$ onto $c_0$. Because that projection is odd under $\mathcal{C}$, the algorithm assigns exactly opposite answers to an event and its charge mirror.
The reliability score is the out-of-span residual
$$ \rho(x)=\sum_\ell \big\| h_\ell(x)-P_\ell\, h_\ell(x)\big\|, $$
where $P_\ell$ projects onto the span of $c_0,\dots,c_M$. The score is large when the network has encoded something it was not asked to encode, which is the multi-layer distance-to-code idea of Total Activation Classifiers (Constraining Representations Yields Models That Know What They Don't Know). That paper reached 97.28% AUROC for out-of-scope detection on CLINC150 but was never tested on physics data, set architectures, or binary problems with a symmetry. Our hypothesis is specific: at fixed predicted mistag $w$, the true data mistag depends on $\rho$. If it does, calibrating $w$ in bins of $\rho$ on control channels raises the realised effective tagging power $\epsilon_{\text{eff}}=\epsilon_{\text{tag}}\langle(1-2w)^2\rangle$, since that quantity rewards only correctly calibrated per-event dilutions.
Research Program
The work has three parts. First, we build the antisymmetric set tagger with orthogonal code heads, using a 16-dimensional Sylvester Hadamard matrix. Thirteen Belle II-style categories plus the flavour axis fit inside it, which avoids the Bernoulli-sampled codes needed when classes outnumber the dimension. Second, we study the geometry. We check whether residual mass concentrates on events with simulated tracking or particle-identification corruption, and whether the inter-class/intra-class ratio that A Lower Bound of Hash Codes' Performance ties to retrieval precision tracks dilution along the flavour axis. We treat that paper as a diagnostic lens, not as a training objective. Third, we calibrate on data, replacing the standard single linear mistag calibration with a calibration that is piecewise in $\rho$.
One constraint has to be stated openly. Exact antisymmetry forbids the network from compensating real detector asymmetries, such as different material interaction rates for $K^+$ and $K^-$. We expect antisymmetry to remove algorithmic asymmetry but leave detector asymmetry for calibration to handle. Part of the study is to check that this split is cleaner than letting the network absorb an unknown mixture of the two.
Precision measurements need collaboration data. To make the method testable publicly first, we run a preliminary study on JetClass, which has 125 million simulated jets in 10 classes. Ten classes fit naturally into 16-bit orthogonal codes. We then compare the residual distribution on the real CMS jets of Aspen Open Jets with that on held-out simulation, to test whether $\rho$ detects the simulation-to-data shift on real collider events at all. The flavour-tagging stage requires Belle II or LHCb collaboration access.
Baselines
The naive reference is the tagger used as-is with only the standard global linear mistag calibration on flavour-specific control decays. For Belle II this is the deep network of B-flavor tagging at Belle II, which reports $\epsilon_{\text{eff}}=(28.8\pm1.2\pm0.4)\%$ on 62.8 fb$^{-1}$ of real $B^0\to D^{(*)-}h^+$ data.
The strongest existing method on real data is the category-based boosted decision tree from the same paper, with $\epsilon_{\text{eff}}=(30.0\pm1.2\pm0.4)\%$. It is the right competitor because it encodes the same physical categories that our mechanism codes borrow, and because it currently wins on data. On simulated high-pileup conditions, the strongest method is the inclusive DeepSet of Fast Inclusive Flavour Tagging at LHCb, which reports $\epsilon_{\text{eff}}=6.36\%$ for $B^+\to J/\psi K^+$ in Run 3 simulation against 3.75% for classical taggers. That result is simulation only. All neural models share one backbone size, the same simulated training sample (20 million events in the Belle II setting), the same hyperparameter search budget, and the same control-channel calibration data. We compare on identical events, so that the paired difference in $\epsilon_{\text{eff}}$ has much smaller uncertainty than the ±1.2% of each separate number.
The ablations isolate each ingredient. An antisymmetrized DeepSet trained with plain binary cross-entropy tests whether symmetry alone explains any gain. Our model without mechanism codes, where $\rho$ is measured against the flavour axis alone, tests whether the orthogonal mechanism directions matter. Our model scored by output confidence $|1-2w|$ instead of $\rho$ tests whether internal layers add anything.
Beating the baselines means two things on data. The paired $\epsilon_{\text{eff}}$ must exceed the boosted decision tree by more than its paired uncertainty. The algorithmic tagging asymmetry must be consistent with zero, with the residual asymmetry explained by detector-level calibration.
Why not just…?
Why not just keep the boosted decision tree? It wins on real Belle II data today, so it is a real threat. Expert taggers also abstain on 10–15% of events, while inclusive networks tag every event, according to Fast Inclusive Flavour Tagging at LHCb. Our design keeps the decision tree's category structure as code axes. If the paired comparison shows no gain over the decision tree, the honest conclusion is that its robustness to mismodelling comes from its hand-built inputs, not from structure a network can imitate.
Why not just antisymmetrize the network and train with ordinary cross-entropy? This probably delivers most of the asymmetry benefit at almost no cost, which is why it is our primary ablation and not our contribution. It provides no reliability signal, though. The claim that orthogonal codes add value stands or falls on whether $\rho$ predicts calibration residuals beyond what this simpler model achieves.
Why not just use output confidence to flag unreliable events? For a binary task, the output may already hold everything useful. TAC's evidence that internal-layer distances beat output confidence comes from vision and language benchmarks, not physics. The decisive test is a regression of the control-channel mistag residual on $\rho$ at fixed predicted $w$. A slope consistent with zero means the idea fails.
Why not just reweight the simulation to match data? Reweighting corrects known, modelled differences such as particle-identification likelihood shapes. It is complementary, and we apply it to all models equally. The residual is aimed at mismatches nobody has modelled, which reweighting by construction cannot reach.
Decisive Checks
The method is supported if four things hold together. In the JetClass/Aspen preliminary study, $\rho$ separates real from simulated jets better than output confidence does. On Belle II control channels, the mistag residual depends significantly on $\rho$ at fixed $w$. Calibration binned in $\rho$ raises paired $\epsilon_{\text{eff}}$ above the 30.0% boosted-decision-tree reference by more than its uncertainty. The tagger's algorithmic B/$\bar B$ asymmetry vanishes while detector asymmetry remains measurable.
Downstream, the payoff is smaller statistical uncertainty on time-dependent CP parameters at fixed luminosity, for example in $B^0\to J/\psi\pi^0$ (Belle study). If the residual does not predict miscalibration, the negative result is still informative: it would show that internal-code distances, which help in vision and language, do not transfer to the simulation-mismatch problem in collider physics.
References
- Central Similarity Quantization for Efficient Image and Video Retrieval
- Hadamard Matrix Guided Online Hashing
- B-flavor tagging at Belle II
- Fast Inclusive Flavour Tagging at LHCb
- One Loss for All: Deep Hashing with a Single Cosine Similarity based Learning Objective
- Constraining Representations Yields Models That Know What They Don't Know
- A Lower Bound of Hash Codes' Performance
- Aspen Open Jets: Unlocking LHC Data for Foundation Models in Particle Physics
- Study of time-dependent CP violation in B0 → J/ψπ0 decays