Reliability-Weighted Encrypted Ensembles from Decrypted Agreement Statistics

When a client sends encrypted queries to a cloud service that runs several models, the service usually combines those models with an equal-weight vote. That is fine when every model is equally good. It fails when some models are weak on the client's data, or when a few third-party models share a hidden backdoor. The textbook fix is to learn per-model weights from how often models agree with one another, with no labels. This is called unsupervised reliability estimation. It looks incompatible with homomorphic encryption, meaning encryption that lets a server compute on data it cannot read. The estimators need divisions, eigenvectors and iterative loops, and each of these is very expensive on encrypted numbers. We propose a way around this. The server computes one small encrypted summary: a K-by-K matrix of how often each pair of its K models agree, averaged over a batch of the client's queries. The client, who already holds the decryption key, decrypts only this matrix. It solves the reliability problem in plaintext in microseconds and sends back encrypted weights. The server then forms a weighted encrypted vote. The expensive nonlinear work never touches ciphertext, and the only thing revealed is an aggregate agreement rate.

This matters for the robustness–accuracy trade-off, the pattern where defenses against attacks cost accuracy on ordinary inputs. Static defenses pay that cost on every input. Pruning a suspected backdoor pays roughly 1.5 points of clean accuracy and needs labeled clean data. A fixed mix of standard and robust models trades clean accuracy for robustness through one global dial. Weights re-estimated on each client batch can instead down-weight a model only when that client's data shows it disagreeing with the independent majority. This should keep clean accuracy close to the best member while suppressing members that are compromised or badly shifted.

Core Claim

Reliability estimation for an ensemble needs only low-order agreement statistics, and those can be computed under encryption at very low depth. The rank-one-plus-sparse covariance method of Crowdsourcing Regression: A Spectral Approach works from a covariance matrix of expert predictions. The collusion-resistant method of Crowdsourcing with Arbitrary Adversaries works from pairwise agreement probabilities, which it analyzes across worker triplets. Each entry of such a matrix is a batch average of elementwise products. One encrypted multiplication plus additions and rotations computes it.

We therefore split the work. The encrypted part covers bounded per-model scores, pairwise products, batch sums, the weighted combination and the final argmax. The plaintext part is the K-by-K solve on the key holder's side.

We claim this split has three properties. It matches the plaintext estimators' accuracy up to polynomial-approximation error. It costs a small fraction of the encrypted argmax that equal-weight encrypted ensembling already pays. Under distribution shift and shared-trigger backdoors, it beats both equal weighting and weights fixed in advance on public data, without the clean-accuracy loss of pruning.

The contrast with the closest work is specific. SecPE: Secure Prompt Ensembling for Private and Robust Large Language Models builds encrypted prompt ensembles with a fast encrypted argmax but treats every member as equally reliable. Lancelot also decrypts an intermediate quantity to avoid deep encrypted sorting. It does so for federated learning, relies on a separate trusted key center, and uses distance-based filtering rules (Krum, Median) with no model of latent reliability. We use the client as the only key holder. The decrypted object is a consensus statistic from which identifiable reliability parameters follow.

Research Program

Bounded per-model scores. Each model's logits pass through a low-degree odd polynomial that approximates a squashing function on a calibrated logit range. The result is a bounded score vector in $[-1,1]^C$ for $C$ classes. Boundedness is not cosmetic. Mixing classifiers to alleviate the accuracy-robustness trade-off shows that mixing unbounded logits causes gradient masking, where the defense looks strong only because attack gradients are uninformative, and that bounded probabilities avoid this. Exact softmax is too deep for encryption, as SecureNets documents for high-degree approximations. A degree-3 to degree-5 squashing polynomial is our compromise, and whether it keeps the anti-masking property is tested directly.

Encrypted agreement matrix. Following CryptoNets-style packing (CryptoNets), batch items occupy ciphertext slots. For each pair of models $(k,l)$, the server multiplies their score ciphertexts elementwise and sums over slots. With $B$ items, the agreement entry is

$$A_{kl} = \frac{1}{BC}\sum_{b=1}^{B}\sum_{c=1}^{C} s_k(x_b)_c \, s_l(x_b)_c,$$

where $s_k(x_b)_c$ is model $k$'s bounded score for class $c$ on item $b$. Summing over slots needs about $\log_2 B$ rotations per pair. Falcon reports rotations cost about 10x a ciphertext–plaintext multiplication. For $K=8$ models that is 36 pairs times about 12 rotations per batch of 4,096 queries, amortized to well under one rotation per query. We will measure this against the per-query cost of inference and of the encrypted argmax.

Plaintext reliability solve. The client decrypts $A$ and fits two estimators. The first is the rank-one-plus-sparse decomposition of Tenzer et al. The second is a multi-class extension of the triplet estimator of Kleindessner et al. The triplet estimator is needed because members backdoored with the same trigger behave like colluding workers. They agree with each other, which pairwise-agreement and covariance methods mistake for competence. The file reports that triplet-based identification survives up to 23 colluders out of 50 workers, where KOS and spectral EM break at 5–6.

The triplet estimator is proven only for binary labels. Our extension uses per-class one-versus-rest agreement and is an open part of the work. We will report where it fails, including the known breakdown when compromised members form a majority.

Encrypted weighted vote. The client encrypts the weights and returns them. The server multiplies each member's bounded score by its encrypted weight, adding one multiplicative level. It sums the results and runs SecPE's QuickMax argmax. The server learns nothing new.

The client learns only the K-by-K agreement rates of the server's models on its own batch. We quantify how much that reveals about the models, and we test an optional noised release of $A$ for providers who want a formal privacy bound.

Baselines

The naive reference point is encrypted equal-weight averaging of the same bounded scores followed by the same argmax. This is exactly SecPE's aggregation applied to a model pool. It runs on identical ciphertext parameters, pools and batches, so any gap is due to weighting alone. SecPE reports only a 0.4% clean drop on ImageNet with 247 prompts and a 2.5% runtime overhead over single private inference. That overhead is the budget our added agreement computation must stay close to. Beating this baseline means higher clean accuracy under shifted client data, and lower attack success rate when backdoored members are present, at comparable latency.

The strongest robustness–accuracy competitor is probability mixing of a standard and an adversarially trained model with a global mixing weight tuned on labeled validation data, as in Bai et al. On CIFAR-10 that paper reports clean accuracy "approaching 95%" with 30–40% accuracy under PGD, a standard gradient-based adversarial attack. We run it in plaintext with the same two models included in our pool and give it a labeled tuning set. This deliberately favors it, since our method uses no labels. Beating it means matching its clean–robust operating point without labels, and exceeding it when the pool also contains backdoored or shifted members that a two-model mix cannot handle.

The strongest backdoor competitor is Adversarial Neuron Pruning applied to each backdoored member using 500 labeled clean images. That paper reports attack success rate falling from nearly 100% to under 1% in 5 of 6 scenarios, with an average clean-accuracy drop of 1.47%. We run it with its published settings on the same backdoored members. Beating it on the trade-off means reaching comparable attack success rates at smaller clean-accuracy loss, without labeled data or access to the member's weights.

Two ablations isolate the key ingredient. The first estimates weights once on public unlabeled data rather than on the client's batch, which tests whether per-batch estimation is what matters. The second replaces the triplet estimator with the rank-one spectral estimator, which tests whether collusion resistance matters under shared triggers.

A plaintext run of the identical estimator bounds the approximation cost from encryption. A labeled oracle gives the best achievable fixed weights.

Why not just…?

Why not just use equal-weight encrypted averaging, since it is cheapest? Equal weighting is optimal only when members are equally good and err independently. The file's evidence says neither holds in practice. U-PCR reaches 62% versus 58% for majority voting on CIFAR-10C, and GLAD reaches 78.12% versus 71.88% on Duchenne Smiles (Whose Vote Should Count More). Under collusion, consensus methods collapse at a handful of coordinated members. Our experiments measure the gap directly. If equal weighting is within noise of our method on shifted and backdoored pools, the extra encrypted work is not worth it and we will say so.

Why not just estimate the weights once on public data and apply them as plaintext constants? This is the real threat, because fixed weights cost nothing extra under encryption. It fails only if reliability depends on the client's private distribution. That happens when a member degrades under a corruption present only in client data, or when a backdoor trigger appears only in client queries. The public-data ablation settles it. We sweep the gap between public and client distributions using CIFAR-10C severities and MedMNIST domains. If fixed weights match per-batch weights across that sweep, the core claim is false.

Why not just let the client decrypt every member's output and aggregate locally? Computationally this works. However, it gives the client K separate per-query outputs, which is exactly what a provider hosting proprietary or licensed models wants to avoid, since it enables model extraction. It also multiplies the returned ciphertext volume by K, where the file already notes very large ciphertext expansion. We report both the communication ratio and a model-extraction proxy, comparing surrogate-model fidelity trained from per-member outputs versus from our single weighted vote. The proposal is aimed at providers for whom per-member release is unacceptable.

Why not just prune or retrain the suspect models? Pruning needs labeled clean data and weight access, and it pays clean accuracy on every query. That is the 1.47% average in ANP, and fine-pruning is worse. It also cannot respond to shift. We compare against it head on, as described above.

Proposed Experiments

The main testbed is a CIFAR-10 pool of eight models. It contains standard ResNet-18 and VGG-19 models, one adversarially trained model, weaker compact models, and two or three members backdoored with the same BadNets or Blend trigger, following ANP's setting. Client batches come from clean CIFAR-10, CIFAR-10C at each severity, and mixtures containing triggered inputs at varying rates.

A second pool on MedMNIST 2D tasks tests natural domain shift. The file reports reference averages of 0.927 AUC for AutoML on 2D tasks and 0.863 for ResNet-50 on the 3D tasks. As a third, small sanity check, the Kleindessner-style synthetic collusion benchmark verifies that our multi-class triplet extension reproduces the binary resistance results.

The metrics are clean accuracy, PGD robust accuracy, attack success rate, and encrypted latency split into inference, agreement computation and argmax. We also report communication volume and the extraction proxy.

Four checks decide the outcome. First, encrypted per-batch weights should come within about one point of the plaintext estimator's accuracy, showing polynomial error is tolerable. Second, the agreement computation should add latency small relative to SecPE's 891-second argmax at comparable batch size. Third, per-batch weights should beat public-data fixed weights as shift grows, while matching them when there is no shift. Fourth, with shared-trigger members below half the pool, the triplet estimator should drive attack success toward ANP's level with a clean-accuracy loss well under ANP's 1.47%, while the rank-one estimator should visibly fail.

We will also run an adaptive PGD attack through the squashing polynomial. If bounded polynomial scores still show gradient masking, the robustness numbers are not trustworthy and the design must change.