Density functional theory (DFT), the workhorse method for computing the electronic structure of molecules and materials, is slow because it repeatedly diagonalizes a matrix whose size grows with the system. Each diagonalization costs roughly the cube of that size, and it must be repeated until a self-consistent solution emerges, typically dozens of times. Neural networks that predict a good starting matrix can cut the number of repetitions. These models are trained on large proprietary datasets, though, and the molecules users want to compute are often proprietary too. Today the only way to use such a model is to trust someone. Either the user sends the molecule to the model owner, or the owner ships the weights to the user. Shipping weights is risky because molecular models are known to leak their training molecules. Sending the molecule is risky because nearly all scientific network traffic still uses key exchange that a future quantum computer can break retroactively.
We propose to run the warm-start network under lattice-based homomorphic encryption. This is encryption that lets a server compute on data it cannot read, and its security rests on the same lattice problems as post-quantum key exchange. The central observation is that the warm start does not need to be exact. The user runs the self-consistent loop locally, in plaintext, and that loop converges to the same answer from any reasonable starting point. Encryption-induced noise, low-precision arithmetic and crude polynomial stand-ins for nonlinearities therefore cost iterations, never accuracy. This error tolerance is what makes encrypted inference plausibly cheap enough to pay for itself.
Core Claim
An equivariant Hamiltonian-prediction network can be made friendly to homomorphic encryption by deliberately degrading it: lower angular resolution, polynomial gates and coarse fixed-point precision. The degraded network still saves enough self-consistent iterations to beat a classical cold start in end-to-end wall time above a predictable system size. Because the only objects that leave the user's machine are Ring-LWE ciphertexts, an adversary who harvests the traffic today learns nothing even after quantum computers arrive. This holds even when the transport layer still uses classical key exchange. A model owner who is malicious or simply wrong can only slow the user down, never corrupt the converged result, because the final answer is certified by the user's own self-consistent loop.
A simple cost model makes the claim testable. Let $N$ be the number of basis functions. Let $c_{HE}$ be the per-atom cost of one encrypted forward pass, which is linear because message passing is local. Let $c_{d}$ be the prefactor of one cubic diagonalization, and let $\Delta K$ be the number of self-consistent iterations the warm start saves relative to a cold start. Encryption pays for itself when the iteration savings exceed the inference cost, which gives the break-even size
$$N^{*} \approx \sqrt{\frac{c_{HE}}{\Delta K \, c_{d}}},$$
where the square root comes from equating the linear-in-$N$ inference cost with the cubic-in-$N$ savings. The project measures all three quantities, $c_{HE}$, $\Delta K$ and $c_d$, rather than assuming them, and reports where $N^*$ actually falls.
Relation to Prior Work
Three lines of work motivate the proposal. First, the QH9 benchmark (QH9) showed that a Hamiltonian predicted by QHNet (Efficient and Equivariant Graph Networks for Predicting Quantum Hamiltonian) substantially reduces self-consistent iterations when used as an initial guess. QHNet itself made equivariant Hamiltonian prediction cheaper by pruning tensor products by 92%. That work assumes plaintext inference by a trusted party, and we keep its architecture as the starting point. Second, Extracting Training Data from Molecular Pre-trained Models recovered training molecules from black-box molecular encoders with 49.0% average precision, which is evidence that releasing weights or embeddings to users leaks the owner's data. That attack targets 2D graph encoders. We do not claim the same leakage holds for 3D Hamiltonian models; we test it. Third, Sowa et al. measured post-quantum key exchange in only 0.029% of SSH connections at a national supercomputing center, with over 83% of servers dating to 2019 or earlier. That long tail is why we put post-quantum protection in the payload itself rather than waiting for transport upgrades. The same paper's finding that post-quantum keys overflow scientific token headers warns us that ciphertext size is a real deployment cost, and we measure it.
Two further works constrain the design. Kaniselvan et al. (MALOQ) observe that single-shot surrogate Hamiltonians fail when charge redistributes under bias and argue that surrogates should feed back into the self-consistent loop. We take exactly that position: we never trust the surrogate's output as a final answer. Lu's analysis of divide-and-conquer (Analysis of the divide-and-conquer method) shows that electronic structure is local for gapped systems. This is the physical reason a local, low-depth message-passing network can produce a useful guess, and the reason its encrypted cost can scale linearly.
No paper in the file combines homomorphic encryption with DFT initialization. The closest cryptographic neighbors are lattice primitives for constrained devices, such as Ye et al. and I-(OT)^2. Both secure generic computation but are unaware of a downstream solver that tolerates errors.
Research Program
The first component is an encryption-friendly equivariant network. Starting from QHNet's code in the AIRS library, we will make four changes. We cap angular degree at the minimum needed to produce s, p and d orbital blocks of the Def2SVP Hamiltonian. We replace the norm-gating sigmoid with low-degree polynomials fitted to it. We limit network depth so that the total multiplicative depth fits a CKKS parameter set without bootstrapping. CKKS is the Ring-LWE homomorphic scheme for approximate real arithmetic, and bootstrapping is its expensive noise-refresh step. Finally, we pack atom and orbital-pair features into ciphertext slots so that the equivariant tensor products become batched slot-wise multiplications. Training happens in plaintext with these approximations and with simulated CKKS noise injected, so the network learns to be robust to them.
The second component is a training objective that rewards iteration savings rather than matrix accuracy. A matrix error of $76.31 \times 10^{-6}$ Hartree is not the quantity users pay for. We will compare training on Hamiltonian mean absolute error with fine-tuning on a differentiable proxy for convergence speed. The proxy is the error of the density after one diagonalization step, relative to the converged density. This tests whether the network can afford to be wrong in directions the self-consistent loop corrects quickly.
The third component is a client–server protocol. The client encrypts atomic coordinates and element types under its own CKKS key and sends the ciphertext. The server evaluates the network and returns an encrypted Hamiltonian. The client decrypts it, symmetrizes it and runs standard DFT to convergence. We will analyze three security properties. Against harvesting, the input and output are lattice ciphertexts. The model owner learns nothing about the molecule under standard CKKS assumptions, though the leakage of approximate CKKS decryption results under adaptive queries must be addressed by noise flooding. Against weight exposure, we will measure what the client can learn about the owner's training set from output Hamiltonians alone, using a Molextract-style membership score adapted to Hamiltonian outputs.
Baselines
The naive reference point is a standard cold start. The superposition-of-atomic-densities guess (SAD) and extended Hückel are the default initializations that QH9 reports as requiring many more self-consistent iterations. We will run them in the same DFT code, at the same B3LYP/Def2SVP level and convergence threshold, on the same hardware. Beating it means lower total wall time to the same converged energy, including encryption, transfer and decryption.
The strongest existing method is plaintext QHNet used as a warm start, which is an upper bound on iteration savings with no privacy. On QH9-stable-id, QH9 reports a Hamiltonian MAE of 76.31 × 10⁻⁶ Hartree for QHNet. We found no reported iteration-count figure on Lacuna for the QHNet warm start, so we will measure it ourselves with the released code, retrained on our splits with the same tuning budget as our model. Our encrypted model does not need to beat this baseline on iterations. Success means retaining at least half of its iteration savings while adding post-quantum two-sided secrecy. Matching its savings would be a surprise.
The relevant privacy-preserving competitor is a trusted model owner reached over hybrid post-quantum key exchange of the sntrup761x25519 kind studied by Sowa et al.. It delivers plaintext QHNet speed but reveals the molecule to the server. We will report its latency and bandwidth next to ours, so the price of not trusting the server is explicit.
Two ablations isolate the key ingredient. The first runs the degraded network in plaintext, with polynomial gates, capped degree and simulated noise, which separates approximation loss from encryption overhead. The second is a high-precision encrypted port that keeps QHNet's full architecture and uses bootstrapping. If the error-tolerance argument is right, this port should give similar iteration savings at a far higher $c_{HE}$, moving $N^*$ outward by a large factor.
Why not just…?
Why not just use post-quantum TLS to a trusted provider? Post-quantum TLS fixes harvesting on the wire but leaves the molecule in plaintext on the provider's servers, which is precisely what pharmaceutical users object to. Provider-side upgrades also follow the slow server tail documented by Sowa et al.. If users are willing to trust the provider, this alternative wins on speed, and our baseline table will show by how much. The proposal is only relevant in the mutual-distrust setting, and we will say so plainly.
Why not just give the user the model, perhaps a distilled or differentially private copy? Molextract shows that molecular encoders leak training structures and that chemical-property filters do not stop it. Differentially private training adds noise that would likely erode the small matrix errors that make a warm start useful. This is a genuine threat, however, because a warm start tolerates error just as our encrypted model does, so a differentially private model might lose little. We will train a DP-SGD QHNet at several privacy budgets and measure both its iteration savings and its extraction leakage. If it matches our approach at acceptable privacy levels, that is a reason to adopt it instead of homomorphic encryption.
Why not just use a cheaper classical guess, such as Hückel or a minimal-basis calculation projected up? This is the most serious objection. For QM9-sized molecules, a DFT run takes seconds, and encrypted inference could take far longer. The break-even analysis exists to answer it: if the measured $N^*$ lies beyond the sizes where the network still generalizes, the idea fails. That outcome is plausible, given the size-generalization drop reported in QH9. We will include a projected minimal-basis guess as an additional baseline, since it is the strongest free competitor.
Why not just run DFT itself under homomorphic encryption? Iterative diagonalization and nonlinear exchange-correlation potentials require deep circuits with repeated bootstrapping on a computation that is already cubic, as the overview of accelerator bottlenecks in SoK: Fully Homomorphic Encryption Accelerators makes clear. Our design encrypts only the one step that is local, shallow and allowed to be wrong.
Proposed Experiments
Training and in-distribution evaluation use QH9-stable. Out-of-equilibrium tests use QH9-dynamic, with both geometry-wise and molecule-wise splits; QH9 reports that error roughly doubles between these splits. MD17 molecules, including uracil, provide timing comparisons against the per-iteration figures in QHNet. To locate $N^*$, we will add a size sweep: molecules drawn from the ZINC15 pool used by Molextract, binned by heavy-atom count from 9 to roughly 40, with ground truth computed at B3LYP/Def2SVP.
The metrics are self-consistent iterations to convergence, converged-energy agreement with the cold start, and end-to-end wall time broken into encryption, server evaluation, transfer and the local loop. We also report ciphertext bytes per molecule and Molextract-style membership precision against output Hamiltonians.
Three checks are decisive. The first is whether the plaintext-degraded network keeps at least half of plaintext QHNet's iteration savings; if it does not, error tolerance is too weak and the project stops. The second is whether measured $N^*$ falls within the heavy-atom range where savings persist on the size sweep; this decides whether the method is useful or merely secure. The third is whether a deliberately poisoned server model changes only iteration counts and never the converged energies, which would confirm the built-in integrity claim on every test molecule.
References
- QH9: A Quantum Hamiltonian Prediction Benchmark for QM9 Molecules
- Efficient and Equivariant Graph Networks for Predicting Quantum Hamiltonian
- Extracting Training Data from Molecular Pre-trained Models
- Post-Quantum Cryptography (PQC) Network Instrument: Measuring PQC Adoption Rates and Identifying Migration Pathways
- Ab initio Modeling of MoS2/Oxide Device Interfaces with Machine Learned Electronic Structures
- Analysis of the divide-and-conquer method for electronic structure calculations
- A Highly-efficient Lattice-based Post-Quantum Cryptography Processor for IoT Applications
- I-(OT)^2: A Client-optimal Oblivious Transfer Protocol for IoT Devices
- SoK: Fully Homomorphic Encryption Accelerators