A cloud provider that serves one model to hundreds of institutions, such as hospitals with different scanners or banks with different document formats, usually gives each institution its own small add-on module, an adapter, attached to a shared network. Suppose the institutions also want privacy. Under fully homomorphic encryption (FHE), arithmetic that runs directly on encrypted data, each institution's input stays hidden. The adapter, and even which institution is asking, may also need to stay hidden. Current encrypted fine-tuning systems handle one adapter for one user. If you simply give each of $K$ institutions its own encrypted adapter, you pay for the slowest kind of encrypted arithmetic, multiplying one encrypted matrix by another, in every layer. If the server instead keeps all $K$ adapters in the clear and hides which one is in use, it must evaluate all $K$ for every query.
We propose a third structure. The server keeps one shared, public set of low-rank directions for every layer. Each institution's adapter is reduced to a short encrypted vector of mixing weights over those directions, which the client sends with its query. The server's only per-domain work is multiplying a public matrix by an encrypted vector, which is the cheap kind of encrypted arithmetic, plus one element-wise multiply by the encrypted weights. Server compute and storage then stay constant as the number of domains grows. The domain's identity and its adapter are never revealed, and nothing in the adapter path requires multiplying two encrypted matrices.
Core Claim
Write the update to a layer's weights for domain $k$ as
$$ \Delta W_k = U \,\mathrm{diag}(c_k)\, V, $$
where $V \in \mathbb{R}^{R \times d_{in}}$ and $U \in \mathbb{R}^{d_{out} \times R}$ are shared plaintext matrices held by the server, and $c_k \in \mathbb{R}^{R}$ is domain $k$'s private vector, encrypted under the client's key. On an encrypted activation $x$, the server computes $U(\,\mathrm{Enc}(c_k) \odot (V\,\mathrm{Enc}(x))\,)$. This takes two plaintext-by-ciphertext matrix products and one slot-wise ciphertext-by-ciphertext multiply. It adds one multiplicative level relative to the backbone path, and it uses no activation function, so it adds no polynomial approximation.
The claim is about trade-offs. On multi-domain suites, this shared-basis, private-scaling adapter should match per-domain encrypted LoRA in accuracy while being faster and cheaper to transmit. Per-domain encrypted LoRA (Encryption-Friendly LLM Architecture) uses rank-$r$ matrices $A, B$, encrypted and multiplied ciphertext-by-ciphertext. The proposed adapter avoids that operation, needs no domain label at the server, and sends $R$ numbers per layer instead of $r(d_{in}+d_{out})$.
Relation to Prior Work
The method inverts an existing multi-domain decomposition. Domain-Adaptive Filter Decomposition (A Dictionary Approach to Domain-Invariant Learning in Deep Networks) writes a filter as domain-specific spatial atoms times shared coefficients, and gets the per-domain cost down to 702 parameters on VGG-16. It assumes the domain label is known at test time and that all weights are plaintext. We swap the roles: the large dictionary is shared and public, and the tiny per-domain part is private. That swap is what moves the expensive matrix arithmetic onto the cheap plaintext-by-ciphertext path. Residual adapters (Learning multiple visual domains with residual adapters) motivate the problem. They show that small linear per-domain modules on a frozen backbone score 2643 on Visual Decathlon, but their storage still grows linearly with the number of domains. Because those adapters are linear 1×1 convolutions, we expect a linear adapter here not to lose essential capacity. The low-rank multi-view formulation for cross-border search (Multi-Domain Deep Learning from a Multi-View Perspective for Cross-Border E-commerce Search) supports the premise that domain variation can live in a shared low-rank space.
On the encryption side, three systems constrain and supply the design. Encryption-Friendly LLM Architecture does encrypted LoRA fine-tuning over a plaintext BERT backbone with Gaussian-kernel attention. It reports plaintext-by-ciphertext products to be about 4.58× faster than ciphertext-by-ciphertext ones, and it is single-task. We reuse its backbone and attention design, and we target the ciphertext-by-ciphertext products it still pays for in the adapter. PrivTuner combines LoRA with CKKS-scheme encryption, the standard scheme for approximate real-number arithmetic, on BERT-Tiny. It reports roughly 163 s per encrypted pass, which shows how little latency budget a K-way adapter can afford. SHE-LoRA shows that partially encrypting LoRA fails unless sensitive columns are clustered, because encryption spreads through matrix products. Our design sidesteps that spread: only an $R$-vector is encrypted, and it meets the activations through an element-wise product rather than a matrix product. SHE-LoRA targets federated aggregation toward one consensus model, not serving $K$ distinct specializations. For vision we use activation-free polynomial backbones from PolyNeXt, which reports 83.9% ImageNet top-1. That paper also warns that cascading Hadamard products destabilize training, which is one reason we keep the adapter to a single element-wise product.
Research Program
The work proceeds in three stages.
Stage 1: plaintext expressiveness. This stage establishes whether the representation can carry the domain shift before any encryption is involved. We learn $U, V$ jointly with per-domain $c_k$ on a set of source domains, then freeze $U, V$ and fit only $c$ for held-out domains. We sweep the basis width $R$ and measure accuracy against per-domain LoRA at matched latency and at matched per-domain parameter count.
Stage 2: encrypted inference in CKKS. We implement the adapter and work out slot packing so that $\mathrm{Enc}(c_k)$ lines up with the packed layout of $V x$ without extra rotations. We expect rotations, rather than multiplications, to dominate the overhead, and we will measure them separately. Latency, multiplicative levels consumed, bootstrapping count, and client-to-server bytes are reported per layer and end to end.
Stage 3: encrypted adaptation to a new domain. Here only $c$ is trained under encryption, following the encrypted-optimizer recipe of Encryption-Friendly LLM Architecture. The gradient with respect to $c$ is the element-wise product of $Vx$ and $U^\top$ times the upstream gradient. It is therefore also free of ciphertext-by-ciphertext matrix products, which makes encrypted onboarding of a new domain far cheaper than encrypted LoRA training.
The threat model is honest-but-curious: the server follows the protocol but tries to learn what it can. The server owns $U$, $V$ and the backbone. Clients own their inputs, their $c_k$, and their identity. We do not protect the server's weights from the client beyond what the protocol already hides. We state openly that the method only matters when domain identity or the adapter is sensitive.
Baselines
The naive reference is the shared backbone with no domain adaptation, run encrypted. It sets the accuracy floor and the latency floor. Any adapter must recover a meaningful share of the gap to per-domain plaintext fine-tuning, and its latency cost is measured against this floor.
The strongest existing method is per-domain encrypted LoRA as in Encryption-Friendly LLM Architecture. The client sends its own encrypted $A, B$ with the query. This already hides domain identity and keeps server compute constant in $K$, so it is the true competitor. Its reported result on their 2-layer BERT-style encoder is an average GLUE score of 0.6621 for encrypted LoRA with Gaussian-kernel attention, against 0.7068 for plaintext full fine-tuning. We run it on the identical backbone, CKKS parameters, and hardware. Ranks $r \in \{1,2,4,8\}$ get the same hyperparameter search budget as our sweep over $R$. Beating it means matching its accuracy within one point at lower end-to-end latency and fewer transmitted bytes, or achieving higher accuracy at equal latency.
The oblivious-selection baseline keeps all $K$ adapters in plaintext at the server, evaluates every one on the encrypted input, and combines them with an encrypted one-hot selector. It is the obvious way to hide which domain is asking, and it represents the linear-in-$K$ cost wall. We plot its latency against ours as $K$ grows.
For plaintext accuracy on vision, the reference is residual adapters, with a reported Visual Decathlon score of 2643 (Learning multiple visual domains with residual adapters). We retrain them on our polynomial backbone so the comparison isolates the adapter rather than the backbone.
Two ablations isolate the key ingredient. The first replaces the learned shared basis with a random frozen $U, V$. If random bases match learned ones, the contribution is only the encrypted-scaling trick and not the shared dictionary. The second gives LoRA the same per-domain parameter count as $c$, so that parameter budget is not confused with structure.
Why not just…?
Why not just let the client tell the server its domain and run that plaintext adapter? This is cheapest, and if neither domain identity nor the adapter is sensitive, it is the right answer and our method is unnecessary. In the motivating settings, a hospital's protocol or a client's fine-tuned adapter is the private asset. A label sent in the clear, plus a server-held adapter, reveals both. Our experiments report the latency of this option as a lower bound, so readers see exactly what the privacy costs.
Why not just send an encrypted rank-1 LoRA? This is the real threat. Rank-1 LoRA is small and also hides the domain. The difference is that its two products are ciphertext-by-ciphertext, each roughly 4.58× slower than the plaintext-by-ciphertext kind according to Encryption-Friendly LLM Architecture, and rank 1 may underfit. The matched-latency and matched-parameter comparison in the baselines settles it directly. If rank-1 encrypted LoRA matches our accuracy-latency curve, we will report that the shared basis buys nothing.
Why not just use a hardware enclave? A Systematic Comparison of Encrypted Machine Learning Solutions for Image Classification reports 0.14 s with an SGX-based system versus about 549 s with HE-Transformer on Malaria images, a decisive speed gap. The same paper notes that protected memory is limited, and enclaves require trusting the hardware vendor. We do not claim to beat enclaves on speed. We target deployments that require cryptographic guarantees, and the question we address is how much of FHE's cost the multi-domain structure adds.
Why not just split the network and run the adapters on the client? The adapter sits inside every layer, so splitting would require many round trips. Sending intermediate activations in plaintext invites inversion attacks of the kind SHE-LoRA defends against. Our design keeps the protocol non-interactive within a forward pass.
Proposed Experiments
Vision. We use Visual Decathlon (10 domains), with a PolyNeXt-style polynomial backbone at reduced width so that encrypted inference stays tractable. Plaintext accuracy is reported as the Decathlon score, and encrypted latency is measured on a CIFAR-scale configuration. To scale $K$ beyond 10, we treat the ImageNet-C corruption types and severities as micro-domains. We fit the basis on a subset and fit only $c$ on held-out corruptions, so we can trace accuracy and server cost as $K$ grows to dozens.
Language. We use the GLUE tasks CoLA, MRPC, RTE, STSB, SST-2 and QNLI as domains on the 2-layer Gaussian-kernel BERT encoder of Encryption-Friendly LLM Architecture. Metrics are average GLUE score, encrypted inference latency, levels and bootstraps consumed, and bytes sent. No reported result was found on Lacuna for encrypted multi-domain serving with $K>1$, so all $K$-scaling numbers will be new.
Decisive checks. The first decisive check is whether, at $R$ small enough that the adapter adds under 10% to encrypted latency, the shared-basis adapter reaches within one GLUE point and within 50 Decathlon points of per-domain LoRA. The second is whether held-out domains fit with $c$ alone, over a frozen basis, retain most of that accuracy; if they do not, the basis is overfit to its source domains and the approach fails as $K$ grows. The third is whether server latency stays flat in $K$ while oblivious selection grows linearly. If the first check fails at every $R$ that remains cheaper than encrypted LoRA, the proposal is refuted.
References
- Encryption-Friendly LLM Architecture
- A Dictionary Approach to Domain-Invariant Learning in Deep Networks
- Learning multiple visual domains with residual adapters
- Multi-Domain Deep Learning from a Multi-View Perspective for Cross-Border E-commerce Search
- PrivTuner with Homomorphic Encryption and LoRA: A P3EFT Scheme for Privacy-Preserving Parameter-Efficient Fine-Tuning of AI Foundation Models
- SHE-LoRA: Selective Homomorphic Encryption for Federated Tuning with Heterogeneous LoRA
- Activation-Free Backbones for Image Recognition: Polynomial Alternatives within MetaFormer-Style Vision Models
- A Systematic Comparison of Encrypted Machine Learning Solutions for Image Classification