Organizations: School of Cyber Science and Engineering, Huazhong University of Science and Technology, Wuhan, China · Center for Mathematical Science, Huazhong University of Science and Technology, Wuhan, China · School of Mathematics and Statistics, Huazhong University of Science and Technology, Wuhan, China · Steklov-Wuhan Institute for Mathematical Exploration, Huazhong University of Science and Technology, China · Department of Mathematics and Department of Physics, Great Bay University, Dongguan, China · Guangdong Provincial Key Laboratory of Mathematical and Neural Dynamical Systems, Dongguan, China
With the rapid advancement of AI technology, we have seen more and more concerns on data privacy, leading to some cutting-edge research on machine learning with encrypted computation. Fully Homomorphic Encryption (FHE) is a crucial technology for privacy-preserving computation, while it struggles with continuous non-polynomial functions, as it operates on discrete integers and supports only addition and multiplication. Spiking Neural Networks (SNNs), which use discrete spike signals, naturally complement FHE's characteristics. In this paper, we introduce FHE-DiCSNN, a framework built on the TFHE scheme, utilizing the discrete nature of SNNs for secure and efficient computations. By leveraging bootstrapping techniques, we successfully implement Leaky Integrate-and-Fire (LIF) neuron models on ciphertexts, allowing SNNs of arbitrary depth. Our framework is adaptable to other spiking neuron models, offering a novel approach to homomorphic evaluation of SNNs. Additionally, we integrate convolutional methods inspired by CNNs to enhance accuracy and reduce the simulation time associated with random encoding. Parallel computation techniques further accelerate bootstrapping operations. Experimental results on the MNIST and FashionMNIST datasets validate the effectiveness of FHE-DiCSNN, with a loss of less than 3% compared to plaintext, respectively, and computation times of under 1 second per prediction. We also apply the model into real medical image classification problems and analyze the parameter optimization and selection.
Figures & tables
Figure 1: Schematic visualisation of the CSNN network. For the network, we use a convolutional layer with kernal_size = 3, stridge = 1,padding=1, and an average pooling layer with kernal_size = 2, stridge = 2, padding=0.
τ=2.0
τ=3.0
τ=4.0
τ=∞ (IF)
θ=20
97.48
97.60
97.10
97.06
θ=30
97.66
97.50
97.60
97.23
θ=40
97.60
97.87
98.00
97.32
θ=50
97.69
97.90
97.30
97.15
θ=60
97.72
97.70
98.00
97.25
θ=100
97.68
97.55
96.90
96.38
Table 1: Different θ and τ parameters on the MNIST dataset (%)
τ=2.0
τ=3.0
τ=4.0
τ=∞ (IF)
θ=20
86.38
85.24
86.47
82.38
θ=30
86.65
86.37
86.97
83.20
θ=40
87.20
86.85
85.82
83.38
θ=50
87.04
86.64
79.52
83.27
θ=60
87.29
81.69
77.21
82.67
θ=100
83.11
74.72
74.45
81.76
Table 2: Different θ and τ parameters on the FashionMNIST dataset (%)
τ=2.0
τ=3.0
τ=4.0
θ=20
81.46
87.95
83.75
θ=30
80.42
87.87
86.50
θ=40
80.78
87.19
86.04
θ=50
80.01
87.41
85.97
θ=60
81.79
87.53
85.66
θ=100
81.62
84.75
83.60
Table 3: Different θ and τ parameters on the Tumor dataset (%)
Poisson-encoded SNN [ 18 ]
CSNN
bootstrapping
(784×2+2×160+2×10)×T1
(7840×2+2×160+2×10)×T2
Spiking Activation Layer
5×T1
6×T2
Table 4: T1 and T2 represent the simulation time required for Poisson-encoded SNN and CSNN, respectively, to achieve their respective peak accuracy performances. Typically, T1 falls within the range of [20-100], while T2 falls within the range of [2-4].
Multi-threading
Without multi-threading
DiSNN [ 18 ]
2.62s
8.32s
Ours
0.34s
8.29s
Table 5: Comparison of the run times of the two models
Vth+maxt(∣I[t]∣)
Spiking Layer1
Spiking Layer2
Spiking Layer3
τ=2
29.60
70.00
24.90
τ=3
36.00
86.00
32.10
τ=4
85.2
175.00
51.70
τ=∞ (IF)
29.80
31.10
20.60
Table 6: Spiking Activation Layer Results for Different Thresholds τ
τ=2
τ=3
τ=4
τ=∞ (IF)
max∑j∣ωj∣
17.42
18.87
10.24
11.89
Table 7: Based on the noise estimation mentioned above, the quantity max∑j∣ωj∣ can be employed to estimate the growth of noise in DiCSNNs for various θ .
Fully Homomorphic Encryption (FHE) enables privacy-preserving machine learning but incurs extreme computational and memory overhead. These costs come not only from expensive low-level primitives, including Number Theoretic Transform (NTT), rotation, and key-switching, but also from inefficient ciphertext packing at the application level. Existing packing strategies typically preserve either neighboring data elements or feature grouping, but not both, leading to wasted ciphertext slots, excessive rotations, and inflated ciphertext counts. We propose FEnc2, a unified and principled fragment-based encoding framework for CKKS-based private convolutional neural network inference. FEnc2 optimizes slot utilization, rotation complexity, and ciphertext density through two components: 1)Conv-aware Encoding, which analytically selects an optimal fragment size to decouple spatial dependencies and jointly minimize inner-outer rotations across layers, and 2)Arch-aware Ct Compression, which restores ciphertext density after feature- or channel-reduction layers. Together, these transformations reshape encrypted workload structure and reduce homomorphic operations by one to two orders of magnitude. With full memory capacity utilized, i.e., at maximum batch size, FEnc2 achieves end-to-end latency speedups over the state-of-the-art Orion of up to 228.83x on GPU and 226.06x on CPU for LeNet on MNIST, and up to 4.55x on GPU and 9.43x on CPU for MobileNet on ImageNet. FEnc2 is hardware-agnostic yet architecturally transformative: by optimizing encrypted tensor layout before execution, it reduces ciphertext count and workload pressure on hardware, complementing primitive-level optimizations such as NTT and keyswitch accelerators. These results show that application-level data layout is a first-order architectural design dimension for encrypted inference and an important enabler for next-generation FHE systems.
Ran Ran, Zhaoting Gong, Nuo Xu +3
North Carolina State University · University of Minnesota · University of California, Santa Cruz +1
Fully homomorphic encryption (FHE) has recently attracted significant attention as both a cryptographic primitive and a systems challenge. Given the latest advances in accelerated computing, FHE presents a promising opportunity for progress, with applications ranging from machine learning to information security. We target the most computationally intensive operation in deep neural networks from a hardware perspective, matrix multiplication (matmul), and adapt it for execution on AMD GPUs. We propose a new optimized method that improves the runtime and complexity of ciphertext matmul by using FIDESlib, a recent open-source FHE library designed specifically for GPUs. By exploiting sparsity in both operands, our sparse matmul implementation outperforms its CPU counterpart by up to 3.0× and reduces the time complexity from cubic to semi-linear, demonstrating an improvement over existing FHE matmul implementations.
Lara D'Agata, Carlos Agulló-Domingo, Óscar Vera-López +7
University of Glasgow, UK · University of Murcia, Spain · AMD +1
Privacy-preserving machine learning (PPML) has become increasingly important in applications where sensitive data must remain confidential. Homomorphic Encryption (HE) enables computation directly on encrypted data, allowing neural network inference without revealing raw inputs. While prior works have largely focused on inference over a single encrypted image, batch processing of encrypted inputs lags behind, despite being critical for high-throughput inference scenarios and training-oriented workloads. In this work, we address this gap by developing optimized algorithms for batched HE-friendly neural networks. We also introduced a pipeline architecture designed to maximize resource efficiency for different batch size execution. We implemented these algorithms and evaluated our work using HE-friendly ResNet-20 and ResNet-34 models on encrypted CIFAR-10 and CIFAR-100 datasets, respectively. For ResNet-20, our approach achieves an amortized inference time of 8.86 seconds per image when processing a batch of 512 encrypted images, with a peak memory usage of 98.96 GB. These results represent a 1.78x runtime improvement and a 3.74x reduction in memory usage compared to the state-of-the-art design. For the deeper ResNet-34 model, we achieve an amortized inference time of 28.14 on a batch of 256 encrypted images using 246.78GB of RAM
Nges Brian Njungle, Eric Jahns, Michel A. Kinsy
STAM Center, Ira A. Fulton Schools of Engineering · Arizona State University, Tempe, AZ 85281, USA