Some materials superconduct even though their main crystal structure says they should not. Tungsten diboride under pressure keeps its ordinary, non-superconducting structure, yet reaches a superconducting transition at 17 K. Molybdenum diboride with the same chemical formula superconducts when it is cooled very fast and does not when it is cooled slowly. The accepted explanation is that thin sheets of misstacked atoms (stacking faults and twin boundaries) locally recreate the flat boron layers of a known superconductor. Once enough of these sheets connect, they form a continuous superconducting path through the sample. The difficulty is proving which defect is responsible. X-ray patterns from heavily faulted or quenched samples are broad and ambiguous. Theorists can propose dozens of candidate defects, and the match to experiment is currently made by hand.
Software engineering has a mature answer to a problem with the same structure. Spectrum-based fault localization ranks lines of code by how much more often they run in failing tests than in passing ones. Multi-modal fault localization then corrects this statistical signal with independent evidence such as bug reports and code structure. We propose to treat each synthesized or compressed sample as a "test," whether it superconducts as the "pass/fail" outcome, and candidate defect motifs as the "statements" to be ranked. A motif is suspicious if X-ray fitting says it is abundant in superconducting samples and scarce in non-superconducting ones. That contrastive score is then combined, without labeled training data, with first-principles plausibility evidence. The output is a ranked, checkable list of which defect most likely causes the superconductivity.
Core Claim
The idea that is actually new here is contrast across a family of samples. Today each sample's diffraction pattern is interpreted on its own. A single broad pattern is underdetermined: a small inclusion of a second phase and a dense array of planar faults can fit it equally well, which is exactly the ambiguity that Dee et al. report for splat-quenched MoB₂. A family of samples breaks that tie. The MoB₂ series from that paper includes arc-melted, P-bar cooled, splat-quenched, and transition-metal-doped samples, and the WB₂ pressure series runs from below 50 GPa to 187 GPa. Both families pair a superconductivity outcome with a diffraction pattern under controlled variation of synthesis.
We claim that a soft spectrum-based score over such a family, fused with physics priors, identifies the causal defect motif more reliably than the best single-sample structural refinement. "Soft" here means each sample is weighted by the motif fraction estimated from its pattern, rather than counted as simply containing the motif or not. Concretely, let $F$ be the set of superconducting samples and let $c_{s,m}\in[0,1]$ be the fitted fraction of motif $m$ in sample $s$. The basic score is a soft version of the Ochiai formula used in software,
$$\mathrm{susp}(m)=\frac{\sum_{s\in F} c_{s,m}}{\sqrt{|F|\,\sum_{s} c_{s,m}}},$$
which is large when a motif's abundance is concentrated in the superconducting samples. Software fault localization also warns of a specific failure mode, which it calls "coincidental correctness" and which Le et al. identify as the core weakness of spectrum-only methods. In this setting the failure mode is concrete: fast quenching produces vacancies, strain broadening, and stacking faults together, so a non-causal motif can ride along with the causal one. This is why the score must be fused with independent evidence rather than used alone.
Research Program
The work has three components.
The first is a motif library and forward model. For WB₂ and MoB₂ we enumerate candidate local structures. These include stacking-fault sequences and twin boundaries that produce flat-boron, MgB₂-like environments, boron-layer puckering variants, metal vacancies, and nanoscale inclusions of the high-pressure P6/mmm or hP3 phase. Each candidate gets a first-principles formation energy as a function of pressure, following the analysis in Lim et al., and a local electronic similarity to the superconducting hP3 phase. Pei et al. identify local flat-boron density as the relevant structural variable, and we use it as a further descriptor. A faulted-supercell diffraction simulator then maps any mixture of motifs to a predicted pattern. Fitting all samples in a family jointly gives the fractions $c_{s,m}$, with uncertainty.
The second component is a borrowing-strength fit. Following the graph regularization of NetML, which lets poorly documented bugs share parameters with similar ones, we add a penalty that keeps $c_{s,m}$ close for samples with similar synthesis histories. Adjacent pressure points and the two fast-cooling routes are examples of such neighbors. Badly resolved patterns are then anchored by their neighbors instead of being fit freely. The synthesis record enters only through this similarity graph. It plays the role that bug-report text plays in software, but we deliberately do not parse free text.
The third component is unsupervised fusion. We combine the contrastive ranking with three other rankings. One is by formation energy. One is by hP3-likeness, ideally the electron–phonon coupling of a supercell, checked against the coupling constants of 0.4 to 0.65 that Dee et al. extract from specific heat. The last is a percolation consistency check: does the fitted motif fraction cross an estimated connectivity threshold in exactly the superconducting samples? The four rankings are merged with the cross-entropy rank aggregation of RAFL from Motwani and Brun. That work showed RAFL can merge orthogonal ranked lists with no ground-truth labels, which is necessary here because labeled defect-cause data do not exist.
Baselines
The naive reference is the equilibrium-structure view used by current superconductivity machine learning. 3DSC matches SuperCon formulas to ideal Materials Project and ICSD crystals, and S2SNet classifies those ideal crystals as superconducting or not. S2SNet reports 91.28% accuracy and 0.9118 AUC on its benchmark, but that number measures a different task. Both models see only the ideal hP12 WB₂ structure and the identical formula of arc-melted and quenched MoB₂, so neither can assign a cause. We run S2SNet's published model on the parent structures and on the candidate supercells, cut to its input size, and record whether its activation maps point at the right sites. Beating this reference means producing any ranking that separates samples with the same formula.
The strongest competitor is per-sample faulted-structure refinement. Each pattern is fit independently with the same motif library and the same simulator, and the motif with the largest fitted fraction in the superconducting samples is reported. This is what a careful crystallographer would do, and it uses every ingredient of our method except contrast across samples and the similarity graph. It receives the same compute and the same fitting budget: restarts and the regularization strength tuned on a held-out portion of the synthetic benchmark. I found no reported result on Lacuna for automated defect-motif localization in superconductors, so there is no published number to beat. The software analogues indicate only the size of gain fusion has given elsewhere: AML reports a MAP of 0.237, a 28.80% gain over fixed-weight PROMESIR, and NetML reports a MAP of 0.347, a 19.2% gain over the runner-up. Neither number transfers to this domain. To count as beating per-sample refinement, the full method must improve top-1 accuracy and mean average precision in localizing the planted causal motif by a margin outside seed-to-seed variance, and it must do so specifically under heavy peak broadening.
The third baseline is a "theory only" ranking that picks the candidate with the lowest formation energy or the highest predicted superconducting temperature. It tests whether the experimental data add anything at all.
Three ablations isolate the key ingredients. The first uses the contrastive score alone, without fusion. The second replaces rank aggregation with fixed equal weights, in the manner of PROMESIR. The third removes the synthesis similarity graph.
Why not just…?
Why not just do a better Rietveld or faulted-structure refinement of each pattern? This is the real threat. If the patterns carry enough information individually, contrast across samples adds nothing. Our argument rests on the documented ambiguity of quenched MoB₂ patterns, where inclusions and faults fit equally well. The synthetic benchmark settles the question directly. We sweep peak broadening from sharp to severe and report where, if anywhere, the two methods diverge. If they never diverge, the contrastive framing is unnecessary and we will say so.
Why not just compute the superconducting temperature of every candidate defect and pick the highest? A high predicted temperature says a motif could cause superconductivity, not that the sample contains it. The WB₂ result shows the distinction matters: an idealized hP3 phase is predicted at 25 to 40 K, yet the bulk sample remains hP12, so presence must be established from data. The theory-only baseline measures exactly this gap.
Why not just extend S2SNet or a crystal graph network to defect supercells? These models learn from labeled ideal crystals. No labeled corpus pairs defect motifs with superconductivity outcomes. Their activation maps also highlight important atoms without saying whether a motif is present in a given sample. Retraining on the handful of real defect samples would be badly underdetermined. We include this as a comparison anyway, but expect it to function as a prior at best.
Why not just prompt a large language model with the patterns and synthesis notes, as FuseFL does for code? FuseFL reports that 78.5% of its failures occur on output errors, meaning code that runs cleanly but gives wrong answers. Defect-induced superconductivity has that shape: the crystal looks normal and the output is anomalous. We therefore treat language-model explanation as optional reporting on top of the ranking, not as the localizer.
Proposed Experiments
The decisive experiment uses a synthetic benchmark with known answers. We generate families of 8 to 20 virtual samples per family. In each family a planted motif controls superconductivity through a percolation rule, and planted confounders such as vacancies and strain broadening are correlated with synthesis but not with superconductivity. Patterns are simulated with realistic noise and broadening. We report top-1 accuracy, top-3 accuracy, and mean average precision for localizing the causal motif, as functions of broadening, family size, and confounder correlation. These are the same metrics the cited fault-localization work reports for buggy methods. The key prediction is that the full method's advantage over per-sample refinement grows with broadening and with confounder strength. A second prediction is that the rank-aggregation ablation degrades most when a confounder dominates the contrastive score alone.
Real-data validation then uses the published WB₂ pressure series and the MoB₂ synthesis series. These are case studies, not accuracy benchmarks, because ground truth is itself uncertain. Two outcomes count as decisive. First, the method should rank flat-boron planar-fault motifs above P6/mmm inclusions for pure quenched MoB₂, while ranking stabilized P6/mmm environments first for the doped samples. Second, the WB₂ ranking should change sensibly at the 50 GPa onset and remain stable across the irreversible decompression branch.
A held-out prediction provides the strongest test. We fit on part of a series and predict whether a withheld synthesis condition superconducts, for example an intermediate cooling rate or pressure, from its pattern alone. Where new measurements are possible, the top-ranked motif yields a falsifiable prediction for transmission electron microscopy of the quenched MoB₂.
References
- Diboride compounds doped with transition metals: A route to superconductivity through structure stabilization as well as defects
- Creating superconductivity in WB2 through pressure-induced metastable planar defects
- Information retrieval and spectrum based bug localization: better together
- Distinct superconducting behaviors of pressurized WB2 and ReB2 with different local B layers
- Network-Clustered Multi-Modal Bug Localization
- Better Automatic Program Repair by Using Bug Reports and Tests Together
- 3DSC - a dataset of superconductors including crystal structures
- S2SNet: A Pretrained Neural Network for Superconductivity Discovery
- Demystifying Faulty Code: Step-by-Step Reasoning for Explainable Fault Localization