Encrypted Superconductor Screening with Collapsible Separable Crystal Graph Layers

A materials lab that has invented a new candidate superconductor has a problem if it wants to use someone else's machine-learning model to estimate it. It can send the exact crystal structure to the model owner, which reveals proprietary stoichiometry and geometry. Or the model owner can ship its weights to the lab, which gives the model away. Fully homomorphic encryption (FHE) offers a way out. FHE is encryption that lets a server compute on data it cannot read: the lab encrypts its structure, the server runs the network on the ciphertext, and only the lab can decrypt the prediction. The obstacle is cost. Every multiplication adds noise, and each layer of multiplications "spends a level." Deeper circuits need larger encryption parameters or periodic "bootstrapping," a very slow noise-refresh step, and these slow down every operation.

We propose a crystal graph network built so that its layers cost very few encryption levels. The structure is fixed in advance rather than found by architecture search. The key observation is this. In a depthwise separable graph layer, each feature channel gets its own neighbor-weighting filter (the "depthwise" step), and a per-atom linear map then mixes channels (the "pointwise" step). If each channel's filter is a learned linear combination of a fixed set of distance features, the two steps can be rearranged algebraically into a sum of a few terms. Each term needs only one encrypted-times-encrypted multiplication. The lab computes the distance features itself, in plaintext, before encrypting. The result has the extra capacity of channel-specific filters at the encryption depth of a plain graph convolution. The product of geometry and features also supplies the network's nonlinearity, so no polynomial activation function is needed. We test this on superconductor prediction tasks: predicting the electron–phonon spectral function and critical temperature, and classifying whether a material superconducts. Under this design, the nonlinear physics post-processing happens on the lab's side after decryption.

Core Claim

Let $X \in \mathbb{R}^{n \times C}$ hold the features of the $n$ atoms in a unit cell (with $C$ channels). Let $B_k \in \mathbb{R}^{n \times n}$, for $k = 1..K$, be fixed radial-basis matrices: entry $(i,j)$ is the $k$-th Gaussian of the periodic distance between atoms $i$ and $j$, with a smooth cutoff. Define a separable layer whose channel-$c$ filter is $A_c = \sum_k w_{ck} B_k$ and whose pointwise mixer is $W \in \mathbb{R}^{C \times C'}$. Here $w_{ck}$ and $W$ are server weights. The output column for channel $o$ is $\sum_c W_{co} A_c X_{:,c}$. Exchanging the sums gives

$$ H' \;=\; \sum_{k=1}^{K} B_k \, X \, U_k, \qquad U_k = \mathrm{diag}(w_{:,k})\, W , $$

where each $U_k \in \mathbb{R}^{C \times C'}$ is a plaintext matrix the server precomputes.

The consequences for encryption are direct. $X U_k$ is a plaintext-weight multiplication, costing one level. $B_k (X U_k)$ is one encrypted-times-encrypted multiplication, costing one more. The $K$ terms are added, which is nearly free. So a full channel-specific separable layer costs two levels, the same as the dense $A X W$ graph convolution that Penguin encrypts.

Because $B_k$ is itself an encrypted input, each layer raises the polynomial degree of the output in the inputs. That interaction between geometry and features is the nonlinearity. It plays the same role as the Hadamard-product branches that PolyNeXt's PolyConv uses to drop activation functions in vision models. Degree normalization and cutoff smoothing depend only on geometry, so the lab folds them into $B_k$ before encryption. Batch-norm scales fold into $U_k$.

Our expectation for a three-layer network with a linear readout is roughly eight levels in total. That should fit in a leveled CKKS parameter set without any bootstrapping. CKKS is the FHE scheme for approximate real-number arithmetic. The estimate counts two levels per layer plus one to two for pooling and the head. It is a prediction to verify, not a result.

Relation to Prior Work

Two papers motivate the design, three supply its methods, and one constrains it.

Unified GCNs motivates the architecture. It shows that GCNs and graph attention networks are depthwise separable convolutions with one filter shared by all channels. Its channel-specific variant, S-UGCN, reaches 95.56% versus 90.56% for a GCN on MUTAG. That work is plaintext and uses only topological graphs. We restrict its learnable filters to linear combinations of distance features. This is a loss of generality, but it is what makes the collapse above possible.

HEMET constrains the design. It documents the "depth trap": splitting a layer into depthwise and pointwise steps can add multiplicative levels and slow encrypted inference. It escapes partly through block-wise search and coefficient merging, which gives about 20% of its latency gain. FastFHE fuses the pointwise convolution with batch-norm and masking for image CNNs. It reports 763 s for ResNet20 on CIFAR-10 and 26 s amortized. Both works operate on image grids, where the depthwise filter is plaintext. In our setting the filter depends on the client's private geometry, so it is encrypted. The fusion we need is therefore different: it reorders a sum over basis functions, not a merge of affine maps.

Penguin supplies the packing method. It encrypts both adjacency and features and balances node and feature slots, reaching 0.24 s amortized per node on Cora. It handles only scalar-feature GCNs on citation graphs. It does not handle distance-attributed edges, periodic cells, or separable layers.

On the materials side, BEE-NET supplies the task and the strongest accuracy baseline. It predicts the full Eliashberg function $\alpha^2F(\omega)$, which describes how strongly electrons couple to lattice vibrations at each frequency. It then derives the critical temperature $T_c$ through the Allen–Dynes formula and reports a $T_c$ MAE of 0.87 K against DFT. S2SNet and 3DSC supply classification and regression benchmarks.

None of these works encrypts a materials model. We also inherit BEE-NET's stated limitation: models trained at ambient pressure extrapolate poorly to high-pressure hydrides. We therefore scope claims to ambient-pressure, chemically stabilized candidates of the kind that motivate this direction, such as Nb-stabilized MoB2 in the P6/mmm structure.

Research Program

The protocol works as follows. The lab relaxes its structure and builds the neighbor list with periodic images. It computes the $K$ radial-basis matrices and a one-hot vector of atom species, then encrypts them under CKKS at 128-bit security. The server applies a plaintext species embedding and then three collapsed separable layers. It sum-pools over atoms and applies a linear head that outputs $\alpha^2F(\omega)$ on a fixed frequency grid. The lab decrypts the spectrum and computes the electron–phonon coupling strength, the logarithmic average phonon frequency, and $T_c$ locally in plaintext. Allen–Dynes involves exponentials and divisions, which are expensive under FHE, so moving it to the lab's side avoids that cost entirely. For classification, the head outputs a logit instead.

Unit cells in these datasets are small, so a whole cell's matrices fit into a few ciphertexts. We will adapt Penguin's two-dimensional packing to the $n \times n$ basis matrices. We will count rotations per layer as a function of $n$, $K$ and $C$. Rotations are cyclic shifts of packed values and are the dominant cost after level consumption.

The engineering work has three parts: the packed collapsed layer, a level-accounting tool that verifies the depth claim per configuration, and training recipes for the purely polynomial network. Training stability is the main risk. Products of unbounded features can blow up with depth. We will rely on folded normalization, bounded basis functions, weight-scale regularization, and a plaintext range check on training data to set CKKS scales.

A secondary analysis asks whether the per-channel filters learn anything physically interpretable. One question is whether some channels respond to short-range octahedral distortions while others respond to uniform contraction. This is the distinction that chemical versus physical pressure studies on bilayer nickelates show to matter. We treat this as exploratory, not as a claim.

Baselines

The naive reference is a composition-only model: a ridge regressor or classifier on elemental fraction features. It establishes how much geometry contributes at all. On 3DSC the cited formula-only model reaches an MSLE of 0.776.

The strongest plaintext accuracy competitor differs by task. For $\alpha^2F$ and $T_c$ it is BEE-NET, which reports a $T_c$ MAE of 0.87 K on its DFT dataset. For superconductor classification it is S2SNet, at 91.28% accuracy and 0.9118 AUC on the S2S dataset, with CGCNN at 82.4% and MEGNet at 80.3% in the same paper. For $T_c$ regression on 3DSC, the reference is XGBoost with DSOAP descriptors at an MSLE of 0.748 3DSC.

These plaintext models bound what any encrypted model could achieve. We will rerun them on our exact splits where code allows, and otherwise quote them as reported. "Beating" them is not the goal. The target is to come within a small, pre-registered margin, about 10% relative in MAE or 2 points in accuracy, while running encrypted.

The strongest encrypted competitor is a Penguin-style GCN. It uses one shared filter $\sum_k w_k B_k$ with the same packing, depth budget, CKKS library, security level, and thread count. It is the direct analogue of prior encrypted graph inference. Penguin has no materials result; there is no reported result on Lacuna for encrypted materials or crystal-graph inference. Beating it means lower $T_c$ MAE or higher AUC at equal or lower encrypted latency.

The ablation that isolates our key ingredient is the same separable network evaluated unfused. In that version the depthwise step and pointwise step are applied sequentially, with a quadratic activation between layers in the style of HEMET. This version should show the depth trap. If the collapsed form is not faster at matched accuracy, the central claim fails.

All learned models will get the same training data and splits, the same hyperparameter budget of 40 trials, and the same GPU hours for training. All encrypted runs will use identical hardware and parameter-selection rules.

Why not just…?

Why not just encrypt a small polynomial model on client-computed descriptors? This is the most serious threat. The lab can compute SOAP-style descriptors locally without any server weights. A degree-2 polynomial head on those descriptors would need only about two levels under encryption. The 3DSC results show that DSOAP adds only modest gains over composition (0.776 to 0.748 MSLE). The S2SNet and MatSciML results suggest learned message passing beats hand-built features, but neither tested an encrypted or polynomial-head setting. We therefore run this baseline at matched encrypted latency. If it matches our network within the margin, the honest conclusion is that private materials screening should use descriptor heads, and we will report that.

Why not just use a shared-filter GCN under encryption, as Penguin does? The collapsed separable layer costs the same depth as a shared-filter layer. Channel-specific filters are therefore nearly free in levels. They add only $K$ ciphertext–ciphertext products in place of one, plus extra rotations. Whether that buys accuracy on crystals is untested. The MUTAG gap from Unified GCNs is suggestive but comes from molecules without geometry. The shared-filter baseline at equal depth answers this directly.

Why not just ship the weights, use a hardware enclave, or use multi-party computation? Shipping weights surrenders the model owner's asset. Enclaves shift trust to a hardware vendor. Multi-party computation is interactive, requiring many rounds of communication between client and server. That is the drawback the encrypted-ML literature cites (Mitigating the Computational Overhead of Encrypted Machine Learning). These are trust-model choices, not empirical ones, so we do not claim FHE dominates them. We claim only that, if non-interactive encryption is required, our design makes it cheap for crystal models.

Proposed Experiments

The first decisive check is plaintext accuracy. We train the activation-free collapsed network on the BEE-NET $\alpha^2F$ dataset, S2S, and 3DSC, and compare it with the baselines above and with a ReLU version of the same separable network. A large gap to the ReLU version would mean the geometry–feature product is an insufficient nonlinearity. In that case we would add a single folded quadratic and re-measure the level cost.

The second check is encrypted fidelity. We decrypt the encrypted outputs for every test structure and compare them with plaintext outputs. We report maximum absolute $T_c$ deviation after client-side Allen–Dynes, and the change in classification accuracy. FastFHE's 92.61% encrypted versus 92.66% plaintext sets the expected order of degradation.

The third check is cost. For the collapsed network, the unfused separable network, and the shared-filter GCN, we report levels consumed, ring dimension required, rotations, ciphertext sizes, and wall-clock latency per structure. We sweep cell size $n$ and basis count $K$, and verify that the collapsed network needs no bootstrapping.

The final check is a screening scenario. We hold out chemically substituted variants of known ambient-pressure superconductor families, drawn from the BEE-NET and 3DSC data. We then measure whether the encrypted model ranks DFT-confirmed high-$T_c$ candidates as well as plaintext BEE-NET, using top-$k$ recall. This is the property a lab protecting its candidate list actually needs.