The density term turned out to be active and harmful. Before changing the method, I rebuilt the evaluation so the next answer — positive or negative — would be one I could defend.
Milestone 1 ended with a result that did not fit either of the stories I had prepared. The story I feared was the CIFAR one: a density term that runs, produces numbers, and changes nothing. The story I hoped for was a density term that lifts out-of-scope detection. CLINC150 delivered a third: the density term was demonstrably active — it moved evidence mass on in-distribution inputs by a median of 80% — and it made detection worse, from an AUROC of 0.9763 for plain EDL vacuity to 0.9713 for DAEDL.
A result like that invites two bad responses. One is to start tuning the method until the number turns around. The other is to write it up as a negative result on the strength of a single configuration and a seed standard deviation. Both skip the question that actually matters: is this difference real, and if so, where does it come from?
This report covers the eight pieces of instrumentation built to answer that question. None of them changes the model. All of them change what I am allowed to claim. The real runs come next; what follows is the machinery, the reasoning behind each design choice, and the decision each output will drive.
An audit of the Milestone 1 code and results produced four findings, and each one became a requirement for the next round.
The density estimate is not what fails. Tied-covariance Mahalanobis on the bottleneck features reaches an OOS AUROC of 0.974 with a plain CE model, in line with the 97.3 that Podolskiy et al. report for BERT-base on this dataset. Raw density separates validation OOS at roughly 0.97–0.98. Whatever goes wrong happens after the density is computed, in the step that couples it to the evidence.
EDL vacuity is the energy score in disguise. Under the EXP parameterization, α₀ = Σ exp(clip(z)) + Kε, so vacuity K/α₀ is a strictly decreasing function of the log-sum-exp of the clipped logits. It ranks every input exactly as the energy score does. The Milestone 1 headline — EDL vacuity 0.9763 beats CE MSP 0.9655 — therefore compares two scoring rules, not two training objectives. Matched on the score, CE with energy (0.979) sits slightly above EDL vacuity.
DAEDL's rule is a temperature, and it cannot flip predictions. I had written that the multiplicative rule α = exp(z ⊙ p̂) "can change the prediction." For a scalar p̂ > 0 the largest entry of p̂·z is the largest entry of z; the rule is softmax at temperature 1/p̂, which is DAEDL's own Theorem 4.3. Flips occur only when clipping sets p̂ to exactly 0 and every α ties. My log-additive alternative, by contrast, turns out to be an exact fusion rule:
The materiality gate looked at the wrong pairs. It compared plain and density-scaled evidence on in-distribution data only. AUROC depends only on how ID inputs are ordered against OOS inputs, so a gate that never sees an OOS input can call a perfect density term INERT (it leaves ID evidence alone) and an uninformative one ACTIVE (it shuffles ID evidence at random). Both happened in a synthetic check.
Two further problems were purely statistical. The DAEDL runs had each retrained their own EDL model, so "DAEDL versus EDL" compared different weights. And the reported ± values were seed standard deviations of 0.0005–0.0009, while every seed is scored on the same 1,000 OOS utterances, whose own sampling error is about 0.0034.
A negative result is only worth publishing if it survives the same scrutiny a positive one would. That meant comparing on the same weights, on matched scores, with an audit that looks at ID–OOS pairs, and with uncertainty that reflects a shared test set.
Every question above is a question about scores, not about weights. Yet the Milestone 1 harness could answer each one only by training a BERT model from scratch, because run_experiment.py evaluated in-process and kept nothing afterwards: no checkpoints, no logits, no features.
The fix is to separate the two concerns. Each run now finishes with one extra evaluation pass per split and writes what every later analysis needs: logits (N × 150), the 256-d bottleneck features, labels, and optionally the pooled 768-d [CLS] vector from before the bottleneck. About 39 MB per run, plus 73 MB for the pooled vectors.
if save_cache_arrays: # one more eval pass per split, then everything is post hoc
loaders_by_split = dict(zip(SPLITS, (tr_eval, va, te, ova, ote)))
arrays = {s: extract_split(model, ld, cfg.device, with_pooled=save_pooled)
for s, ld in loaders_by_split.items()}
save_cache(cfg.output_dir, arrays, meta={"arm": cfg.arm, "seed": cfg.seed, ...})
scripts/run_experiment.py — the cache block. Every DAEDL variant is now a function of a cached EDL run, so DAEDL and EDL are always compared on the same weights.
The consequence is a change in what an experiment costs. Training is reduced to two passes: CE and EDL for five seeds, then six ablation runs. Every coupling rule, normalizer, density model and statistical test afterwards runs on CPU in seconds to minutes.
Writing the extraction code meant asking which training examples the density model had actually seen. The answer was not all of them. The GDA fit read features through the training loader, which shuffles with drop_last=True; at batch size 32 that silently leaves 24 random utterances out of every fit, and a different 24 each time.
The fit now reads all 15,000 in file order. The effect on any single AUROC is tiny, but it was a source of irreproducibility that no test would have caught, because nothing about it is wrong in any one run.
The check that the cache tells the truth. A cached run must reproduce the numbers its own training process reported. The score-table script recomputes every AUROC from the cache and compares it with results.json. Scores built from log-sum-exp (energy, vacuity, Mahalanobis) must agree to numerical noise; in the end-to-end test they agreed to 1e-16.
The CE-versus-EDL comparison in Milestone 1 paired each arm with its "natural" score: maximum softmax probability for CE, vacuity for EDL. Once vacuity is known to be the clipped energy score, that pairing is no longer a fair test of the training objective. The fix is a score-matched table: every arm gets every score it supports.
| Score | CE | EDL |
|---|---|---|
| MSP | yes | yes |
| Energy (clipped for EDL) | yes | yes |
| Mahalanobis on the bottleneck | yes | yes |
| Vacuity, −α₀ | — | yes, ranks identically to the EDL energy row |
The identity gets a runtime check as well as a unit test. For every EDL run, the script verifies that the Spearman correlation between vacuity and clipped energy is exactly 1 and that their AUROCs agree to the last digit. It also reports how often the largest logit reaches the clamp at 15: above that value all inputs share the same evidence ceiling, and vacuity can no longer separate them.
If CE with energy matches or beats EDL with vacuity, the evidential training objective contributes nothing to OOS detection in this setting. That would not sink the project, but it would move the contribution away from "EDL works for intent detection" and toward what the density analysis reveals. It is better to know which paper this is before writing it.
The materiality gate was the methodological centerpiece of Milestone 1, and it needed rebuilding more than anything else. The idea survives intact: a pre-registered, automatic test of whether a post-hoc module did anything, with the power to veto a configuration. What changes is the object it inspects.
AUROC is the probability that a random OOS input scores above a random ID input, so everything it measures lives in ID–OOS pairs. Give each pair a credit c = 1 if the OOS input scores higher, ½ on a tie, 0 otherwise. Comparing the plain score (c₀) with the density-modified one (c₁) pair by pair yields an exact decomposition:
The two quantities answer different questions, and the gate now gives two verdicts.
| Verdict | Rule | What it means |
|---|---|---|
| INERT | flip rate < 0.001 | fewer than 0.1% of pairs reorder, so AUROC cannot move by more than 0.001 |
| ACTIVE | otherwise | the module changes the ranking |
| USEFUL / HARMFUL | 95% CI of ΔAUROC > 0 / < 0 | the reordering helps / hurts beyond test-set noise |
| NEUTRAL | CI inside ±0.001 | active, but the fixes and breaks cancel |
The decomposition is exact, including ties, and it is pinned by a unit test. On the synthetic counterexamples that broke the old gate, it gets both right: the perfect density term reorders many pairs and fixes them, the random one reorders as many and breaks them.
With the gate in place, the coupling question can be asked properly: three normalizers (min-max, quantile-sigmoid, ECDF) crossed with the multiplicative rule and the log-additive rule at λ ∈ {1, 2, 5, 10}, fifteen configurations per run, all computed post hoc on the same cached EDL weights through the repo's own NORMALIZERS and scale_alpha. The selection rule is fixed before any number is seen:
1. Drop configurations that are INERT on validation in at least half the seeds.
2. Pick the highest mean validation AUROC.
3. If the chosen λ sits on the edge of the grid, extend the grid and rerun.
Validation holds only 100 OOS utterances, an AUROC standard error of about 0.011, and every seed shares them. Close configurations will be separated mostly by noise, so the selection is treated as coarse and every configuration's test result goes into the appendix, where a reader can see whether the winner was luck.
The grid also closes a reporting gap. DAEDL's multiplicative rule changes the predictive distribution, but the harness reported the DAEDL arm's calibration from the plain logits. Each configuration now reports the ECE of its own density-scaled predictive mean.
Complementarity first. Before blaming a coupling rule for failing to combine two signals, it is worth asking whether the signals are complementary at all. Two numbers settle most of it: the rank correlation between energy and Mahalanobis density, measured separately within ID and within OOS inputs, and the best AUROC any linear combination of the two can reach.
The second number has a clean form. AUROC ignores scale, so every linear rule a·E + b·D is just a direction on the circle. Sweeping 720 directions gives two values: the direction chosen on validation, scored on test, which is an honest result; and the best direction on test, which is a ceiling no linear rule can exceed. The log-additive rule is itself a one-parameter slice of this family, so sweeping λ traces every possible add_log result for a given normalizer.
That comparison is diagnostic. If the linear ceiling barely beats the better of the two signals, no coupling rule can help and the negative result becomes structural. If the linear ceiling clears both but the add_log ceiling does not, the normalizer is throwing information away.
On the synthetic test bed used to check the code, that is exactly what happened: min-max and ECDF capped add_log at 0.92–0.93 against 0.98 for density alone. Both map everything outside the training range to a single value, and the training range's edge is precisely where OOS inputs sit. Whether real CLINC150 features behave the same way is one of the first things the new runs will show.
Then uncertainty that respects a shared test set. Every seed is scored on the same 1,000 OOS utterances. Seed-to-seed spread therefore measures training noise only, while the larger uncertainty, which utterances happened to land in the test set, is invisible to it. The replacement is a paired, stratified bootstrap over utterances:
Pairing is what makes the intervals tight enough to be useful. Two scores from the same model largely agree on which utterances are hard, so most of the sampling error cancels in their difference. Resampling is cheap because scores are sorted once and each replicate only reweights them; 5,000 replicates take seconds.
The comparisons are fixed in advance: the selected coupling against plain vacuity and against density alone, the Milestone 1 DAEDL configuration against vacuity, CE energy against EDL vacuity, and the two baselines' margins over MSP. The rule for the write-up is equally fixed: "A beats B" only when the interval excludes zero.
Milestone 1 justified its density pipeline with arguments: PCA to tame anisotropy, whitening to equalize directions, spectral normalization for distance awareness. Some of those arguments do not survive a closer look. Whitening is a mathematical no-op for a Mahalanobis distance whose covariance is re-estimated after the map. A linear map from 768 to 256 dimensions has a null space of at least 512 dimensions, so spectral normalization on it cannot make the features bi-Lipschitz. The replacement for argument is measurement.
The density model. On cached features, at no training cost, the harness sweeps PCA at none, 128 and 64 dimensions, on the bottleneck and on the pooled 768-d vector, and adds three near-OOD Mahalanobis variants from the literature:
| Variant | Source | Question it answers |
|---|---|---|
| Relative Mahalanobis | Ren et al. 2021 | Does subtracting a class-agnostic background distance help on near-OOD? |
| Mahalanobis++ | Müller & Hein 2025 | Do feature-norm differences distort the Gaussian assumption? |
| Partial Mahalanobis, top vs. bottom directions | Kamoi & Kobayashi 2020 | Is the OOS signal in the low-variance directions that PCA discards? |
The spectrum report adds two facts the PCA argument needs: how anisotropic the features actually are after fine-tuning, and what share of the between-class variance the top 128 components keep (150 classes span up to 149 directions).
One more check targets the normalizer. Training features of a fine-tuned encoder are denser than unseen ID features, so a normalizer fit on training log-densities may run systematically low on test. The harness compares a fit on training data with a cross-fitted fit on ID validation. On the synthetic test bed the effect was large: median test p̂ of 0.58–0.68 under the training fit against 0.87–0.88 under the validation fit.
The ablation sweep at real size was too slow at first: the Gaussian model computed tied-covariance distances with one triangular solve per class, 150 of them at up to 768 dimensions. Rewriting it as one solve plus one matrix product made it 25–70× faster with results identical to 1e-15, pinned by a test against the original loop.
The training choices. Two ablations need new runs, three seeds each. One turns spectral normalization off, which decides whether SN stays on the contribution list. The other trains with the official DAEDL loss (expected squared error under the Dirichlet, constant KL weight 5×10⁻²) in place of the digamma loss my port uses. Both are scored with the configuration the grid selected, never re-selected. On the synthetic test bed, the official loss with its constant KL weight trained much worse (test accuracy 0.57–0.71 against 0.92–0.96). If BERT loses more than 1.5 points, one more arm changes only the loss, so the loss and the regularizer are not confounded.
CIFAR, revisited from the OOD side. The claim that the CIFAR density term was inert rested on ID-only evidence. A two-phase script now extracts arrays from the replication's checkpoint once, then measures AUROC on SVHN and CIFAR-100 with and without density, runs the pair-flip gate, and traces the two prediction flips (the expectation: inputs whose clipped p̂ is exactly 0, so every α ties).
The official density fit reads the augmented training loader, twice: once to fit and once to score. Augmented outliers may be what produced the training log-density minimum of −8,155 against a 5th percentile of 659, the tail that squeezed min-max. Refitting on un-augmented images settles it.
A harness built to catch silent failures has to be held to its own standard. Three layers of checks ran before any real experiment.
Identities as unit tests. Eighteen new tests pin the statements the paper will lean on: the fast AUROC equals scikit-learn's, with and without ties; the reweighted bootstrap AUROC equals AUROC on actually resampled arrays; the pair-flip decomposition is exact; vacuity ranks like the clipped energy; add_log equals energy plus λ(1 − p̂) and leaves the predictive mean untouched; mul never changes argmax while p̂ > 0; the default loss reproduces the loss every earlier run used.
An end-to-end run on a model small enough to train in minutes. A two-layer BERT built locally, a synthetic twelve-intent dataset with near-OOS utterances that borrow words from two intents, and the full pipeline: training with caching for CE and EDL over three seeds, both ablations, then every analysis script and the aggregator. The checks that matter held on real cached runs: vacuity and clipped energy agreed with Spearman correlation 1 in every EDL run, and the cache reproduced each run's own reported AUROCs to 1e-16.
Timing at real size. Synthetic caches with CLINC150's exact shapes (15,000 / 3,000 / 4,500 / 100 / 1,000 utterances, 150 classes, 256-d and 768-d features) put the cost of the analyses at about six minutes for the score table, grid, complementarity and bootstrap across ten runs, plus about fifteen for the density ablations.
The CIFAR extraction phase ran against a stub with the official DAEDL interface, because the checkpoint and images live on another machine. It is the one component whose first real run is also its first test.
The order is short. Retrain CE and EDL once with caching, five seeds each. Run the score table, the grid, the complementarity analysis and the bootstrap. Then the density ablations, the two training ablations, and the CIFAR check. Only the two training passes need the GPU.
As in Milestone 1, the useful discipline is deciding in advance what each outcome means, so the results cannot be read to fit a story afterwards.
| Outcome | What it means for the paper |
|---|---|
| CE + energy ≥ EDL vacuity | EDL training adds nothing for OOS here; the contribution moves to the density analysis |
| Linear-fusion ceiling ≈ better single signal | Energy and density are redundant; no coupling can help; the negative result is structural |
Ceiling well above both, add_log ceiling not | The normalizer is the bottleneck; report which ones saturate and why |
| Selected coupling beats vacuity and density alone, CI excludes 0 | A positive result: a mean-preserving coupling that improves on its better ingredient |
| PCA none beats 128 | Drop PCA from the method; anisotropy was not the problem it was argued to be |
| SN off within noise of SN on | Remove spectral normalization from the contribution list |
| Coupling helps only under the official MSE loss | The negative result is specific to the port's loss and must be stated that way |
| Un-augmented CIFAR fit removes the heavy tail | The CIFAR "inert" result is partly an augmentation artifact of the reference pipeline |
If the density coupling never clears the bootstrap, it is written up as a diagnosed negative, now with a mechanism, an upper bound, and intervals instead of a single seed-std comparison.
The Milestone 1 article ended by reading the materiality gate as a direct test of Shen et al.'s critique: if EDL's uncertainty is really an energy-based OOD detector, then one should ask of every EDL result whether a reported gain is real or the underlying detector under another name. This round makes that reading literal. Vacuity is not like the energy score; under the EXP parameterization it is the energy score, up to a monotone map. DAEDL's coupling is a temperature on it. My own alternative is a weighted sum of energy and density. Once each component is written in its plainest form, the evaluation can ask the right questions: does the density add anything energy lacks, and does a given rule extract it?
The CIFAR replication taught me to check whether a module was doing anything. CLINC150 taught me to check what it was doing, on which pairs, and with how much certainty.
The broader lesson is about where effort goes in uncertainty work. Every component built here is unglamorous: a cache, a score table, a pair-level audit, a bootstrap, a sweep of ablations. None of it can make the method look better. All of it narrows what the method can be claimed to do, and that is what makes the eventual claim, positive or negative, worth reading.