EncFormerRESEARCH / 2026
IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING 2026
PRIVATE INFERENCE / REIMAGINED

Intelligence
without exposure.

Transformer inference over encrypted data, made faster by designing the packing, computation and cryptographic boundaries together.

ENCFORMER / ENCODER LAYERGPU CKKS + MPC

One encrypted layer.
Four secure boundaries.

QKV → Score⇄Π_MBMaxValue → Output⇄Π_MBLNFFN₁⇄Π_GELUFFN₂⇄Π_MBLN₂

Follow the kernels, secret shares, and conversion boundaries through a complete encoder layer.

Explore the execution trace ↓
9.8×
lower end-to-end latency
vs. BOLT · average across tested settings
30.4×
less online MPC communication
vs. BOLT · average across tested models
0
FHE remap stages
under SCP's kernel interfaces
SCROLL TO EXPLORE ↓
INTERACTIVE EXECUTION TRACE

Inside an EncFormer layer.

Follow encrypted GPU computation, secure nonlinear protocols, and the bridges between them. A schematic BERT encoder flow; this browser does not run cryptographic inference.

● GPU / FHE● Two-party MPC● Secure conversion● ClientClient preparation
CLIENT INPUT

Input sequence

EncFormer repeats encrypted GPU kernels and secure MPC protocols across its Transformer layers.

01 / THE PROBLEM

Privacy shouldn't
bring everything to a halt.

When a service processes private text, it usually sees it. Encryption can protect the input—but naïve encrypted Transformer computation is expensive. EncFormer changes how the cryptographic pieces fit together.

01

Privacy by design

The client encrypts its input. The server evaluates the model without seeing plaintext activations; only prescribed outputs are revealed.

02

Fast linear algebra

GPU-accelerated FHE handles projections and attention kernels while layouts are chosen to compose without expensive remapping.

03

Smarter boundaries

Two-party MPC evaluates nonlinear blocks. Complex-slot conversion and a cost model reduce or justify the work crossing FHE–MPC boundaries.

02 / SYSTEM ARCHITECTURE

One system.
Two cryptographic worlds.

Click each stage to see where computation happens, what representation moves across the boundary, and why the layout matters.

INTERACTIVE PIPELINE / SIMPLIFIED
GPU / FHE 2-PARTY / MPC CLIENT
STAGE 01 / CLIENT

Private input, private key

The client holds the input and secret key, encrypting its representation before transferring ciphertexts to the server. The server holds the model and evaluation keys, not the decryption key.

REPRESENTATIONPlaintext → CKKS ciphertextSECURITY / EXECUTIONClient-held secret key

A representative encoder path, not an exact scheduling diagram. The actual model has additional normalization, residual and feed-forward stages, and bidirectional secure conversion protocols. Paper §I–V ↗

03 / ALGORITHM PLAYGROUND

The clever part is
how things connect.

Three hands-on demonstrations of the paper's key system ideas. These are educational visualizations, not executions of the cryptographic code.

LAB / 001

Stage Compatible Patterns (SCP)

Explore the three canonical layouts that let neighboring FHE kernels speak the same packing language.

NO FHE REMAP STAGES
ENCRYPTED SLOT LAYOUTTOY TENSOR · 4 × 4
HEAD 0 HEAD 1 HEAD 2 HEAD 3
LAYOUT 01 / PROJECTION

Segment-column

Each segment stores one token-column slice, keeping projected features organized for subsequent attention operations.

SCP aligns producer and consumer layouts directly: no FHE-side repacking between adjacent kernels.

RULE 01 FHE → FHE: compatibleRULE 02 MPC → FHE: minimalRULE 03 FHE → MPC: minimal§III / SEE PAPER ↗
LAB / 002

More work per ciphertext

A CKKS ciphertext has complex slots. EncFormer uses both real and imaginary channels at FHE–MPC boundaries to carry two real vectors.

EVEN VECTOR COUNTS½ciphertext payload
REAL-ONLY CONVERSION8 CT
One real vector per ciphertext
→
VERSUS
COMPLEX CONVERSION4 CT
Two real vectors in Re(z) and Im(z)
THEORETICAL CIPHERTEXT COUNT REDUCTION50%

Count reduction, not an end-to-end speedup prediction. The paper separately measures conversion latency and modulus trimming.

REAL + IMAGINARY 2n scalars / n complex slotsPROTOCOL Secure semi-honest 2PC§V / SEE PAPER ↗
LAB / 003

Nonlinear protocol inspector

The expensive nonlinear functions move to two-party MPC, with protocol-specific optimizations.

7interactive MPC rounds
per layer (protocol total)
ALGORITHM 01 / MPC MBMAX
Y = (X + c)5 / Rd

A fifth-power softmax surrogate with a public shift and offline-distilled normalization constant. The short secure multiplication chain takes three rounds.

c and Rd are public, distilled constants; their values are model-specific. The visual is symbolic.
SECURE COMPUTATION EzPC / SCIROUND COUNT 3 + 0 + 4§IV / SEE PAPER ↗
LAB / 004

Boundary decision engine

When is converting more data actually faster? Experiment with the paper's cost model under different network conditions.

INTERACTIVE WHAT-IF MODEL
NETWORK PROFILE
NETWORK1 Gbps bandwidth · 0.3 ms RTT
PREDICTED DELTA LATENCY VS. MINIMAL BASELINE
−178 ms
CANDIDATE FAVORED
Extra boundary cost64 ms
Compute + MPC savings240 ms
ΔT = added conversion cost − compute / MPC savings

These sliders use illustrative cost inputs, not recorded experimental measurements. The network presets match the paper; the decision criterion follows its Equations 4–6.

MINIMAL BASELINE 4 conversion pairs / encoder layerDECISION Choose a candidate only if ΔT < 0§V / SEE PAPER ↗
04 / REPORTED RESULTS

The numbers.
No synthetic benchmarks.

Explore the results reported in the paper. Every value below comes from the published manuscript's evaluation tables, with model sizes and network profiles preserved.

END-TO-END LATENCY1.3–9.8×

average speedup over compared hybrid systems

ONLINE MPC COMMUNICATION1.4–30.4×

average reduction over compared hybrid systems

FHE-ONLY COMPARISON / LAN1.9–3.5×

faster on BERT-base under a matched backend

EXPERIMENT EXPLORER / TABLE VIII

End-to-end comparison

Lower is better ENCFORMER
Prior-system figures are taken from their published papers; network latency figures include measured compute plus modelled network overlays. Online MPC communication excludes boundary-conversion payload, as in Table VIII. Source ↗
ACCURACY / TABLE IX

Utility under encryption

Compare the public model, the distilled surrogate teacher and the encrypted execution on selected GLUE tasks.

MRPC is accuracy, not F1. Differences partly reflect surrogate nonlinearities and distillation; not all the reduction comes from encrypted execution.

CONVERSION / TABLE VII

Complex packing in practice

20.97 MBreal-only conversion pair
↓ complex + modulus trimming
6.41 MBoptimized conversion pair
05 / EXPLORE FURTHER

From the demo
to the details.

Read the peer-reviewed paper, inspect the official implementation, and reproduce experiments using the public artifact.

BACK TO TOP ↑
CITE THIS WORK

Built on reproducible research.

If EncFormer is useful to your work, cite the published IEEE TDSC article.

@article{zhu2026encformer,
  title={EncFormer: Secure and Efficient Transformer Inference over Encrypted Data},
  author={Zhu, Yufan and Jin, Chao and Aung, Khin Mi Mi and Xiao, Xiaokui},
  journal={IEEE Transactions on Dependable and Secure Computing},
  year={2026},
  doi={10.1109/TDSC.2026.3714715}
}