---
title: 'Fed-QK-LSTM: Quantum Kernel LSTM for HAR'
url: https://www.emergentmind.com/topics/federated-quantum-kernel-based-long-short-term-memory-fed-qk-lstm
type: topic
---

# Fed-QK-LSTM: Quantum Kernel LSTM for HAR

Searching arXiv for the specified paper and closely related federated quantum LSTM work.
Federated Quantum Kernel-Based Long Short-term Memory (Fed-QK-LSTM) is a federated learning framework introduced for human activity recognition (HAR) that integrates quantum kernel methods with Long Short-term Memory and combines them with a client-server training regime based on Federated Averaging [2508.06078]. In the reported formulation, each client hosts a DeepConv-QK-LSTM model in which convolutional layers perform local temporal feature extraction and a shallow quantum-kernel-enhanced LSTM models longer-range dependencies in multivariate time-series data. The framework is presented as a privacy-preserving and communication-efficient approach for HAR in privacy-sensitive and edge-computing environments, with the additional claim that quantum kernelization enables complex non-linear modeling with fewer trainable parameters than a purely classical counterpart [2508.06078].

## 1. Definition and problem setting

Fed-QK-LSTM was proposed in the paper "Federated Quantum Kernel-Based Long Short-term Memory for Human Activity Recognition" [2508.06078]. The stated objective is to enhance HAR in privacy-sensitive environments while leveraging quantum computing in distributed learning systems. The framework targets multivariate time-series sensor data and is evaluated on the RealWorld HAR dataset, described as having a sampling rate of 50 Hz and data collected from wrist and ankle accelerometers and gyroscopes, with a typical setup of 15 subjects, 6 activities, and time windows of 2 s length [2508.06078].

The framework combines three elements. First, convolutional layers are used for efficient local pattern capture. Second, an LSTM layer is modified so that its gate computations are driven by quantum kernel expansions rather than the standard affine maps. Third, local client training is coordinated by a federated protocol in which model parameters are aggregated centrally by FedAvg [2508.06078].

This architecture places Fed-QK-LSTM at the intersection of federated learning, hybrid quantum-classical sequence modeling, and sensor-based HAR. A plausible implication is that the framework is designed to reconcile three constraints simultaneously: non-IID or distributed data ownership, temporal dependence in sensor streams, and limited quantum resources.

## 2. Client-side DeepConv-QK-LSTM architecture

On each client, the local model is a DeepConv-QK-LSTM consisting of a stack of \(L\) one-dimensional convolutional layers followed by a shallow QK-LSTM layer [2508.06078]. The input is a multivariate time series
\[
X=[x_1,\dots,x_T]\in\mathbb R^{T\times d}.
\]

For the convolutional stack, the reported layerwise computation is
\[
h_t^{(l,c)}
= \mathrm{ReLU}\Bigl(\sum_{i=0}^{K-1}\sum_{c'=1}^{C^{(l-1)} w_{i,c'}^{(l,c)}\,h_{t+i}^{(l-1,c')} + b^{(l,c)}\Bigr),
\]
with final representation \(\phi(x_t)\in\mathbb R^p\) [2508.06078]. A second equivalent formulation is also given:
\[
h_t^{(0,c)}=x_t,
\]
and, for \(l=1,\dots,L\), channels \(k=1,\dots,C^{(l)}\),
\[
h_t^{(l,k)} = \mathrm{ReLU}\Bigl(\sum_{i=0}^{K-1}\sum_{c=1}^{C^{(l-1)} w_{i,c}^{(l,k)}\,h_{t+i}^{(l-1,c)} + b^{(l,k)}\Bigr).
\]
The output is
\[
\phi(x_t)=[\,h_t^{(L,1)},\dots,h_t^{(L,C^{(L)})}]\in\mathbb R^p.
\]

The recurrent stage is explicitly shallow. At time step \(t\), the model forms
\[
v_t = \bigl[h_{t-1};\,\phi(x_t)\bigr]\in\mathbb R^{n+p}.
\]
Instead of classical gate-affine maps, each gate uses a kernel expansion:
\[
\begin{aligned}
f_t &= \sigma\Bigl(\sum_{j=1}^N \beta_j^{(f)}\,\kappa^{(f)}(v_t,v_j)\Bigr),\qquad
i_t = \sigma\Bigl(\sum_{j=1}^N \beta_j^{(i)}\,\kappa^{(i)}(v_t,v_j)\Bigr),\\
\hat C_t &= \tanh\Bigl(\sum_{j=1}^N \beta_j^{(C)}\,\kappa^{(C)}(v_t,v_j)\Bigr),\quad
o_t = \sigma\Bigl(\sum_{j=1}^N \beta_j^{(o)}\,\kappa^{(o)}(v_t,v_j)\Bigr),\\
C_t &= f_t\odot C_{t-1} + i_t\odot \hat C_t,\quad
h_t = o_t\odot \tanh(C_t).
\end{aligned}
\]
Each gate has its own trainable coefficients \(\{\beta_j^{(\cdot)}\}\) and quantum kernel \(\kappa^{(\cdot)}\) [2508.06078].

For comparison, the paper also reports the standard LSTM gate equations:
\[
\begin{aligned}
i_t &= \sigma\bigl(W_i x_t + U_i h_{t-1} + b_i\bigr),\quad
f_t = \sigma\bigl(W_f x_t + U_f h_{t-1} + b_f\bigr),\\
\hat c_t &= \tanh\bigl(W_c x_t + U_c h_{t-1} + b_c\bigr),\quad
c_t = f_t \odot c_{t-1} + i_t\odot \hat c_t,\\
o_t &= \sigma\bigl(W_o x_t + U_o h_{t-1} + b_o\bigr),\quad
h_t = o_t\odot \tanh(c_t).
\end{aligned}
\]
Fed-QK-LSTM replaces the linear maps \(W_\cdot,U_\cdot\) by kernel sums [2508.06078].

Architecturally, the reported significance is that the convolutional front end captures local temporal structure, allowing a shallow QK-LSTM to focus on long-range dependencies in HAR data. The paper further states that the quantum kernel method captures complex non-linear relationships in multivariate time-series data with fewer trainable parameters [2508.06078].

## 3. Quantum kernel formalism and its role in the recurrent cell

The quantum component is defined through a quantum feature map
\[
\phi : \mathbb R^{n+p}\to\mathcal H
\]
implemented by an embedding circuit \(U(x,w)\) using angle encoding with variational parameters \(w\) [2508.06078]. The explicit kernel is
\[
\kappa(x,x')
= \bigl|\langle\phi(x)\mid\phi(x')\rangle\bigr|^2
= \bigl|\langle 0|\,U^\dagger(x',w)\,U(x,w)\,|0\rangle\bigr|^2.
\]

The reported circuit-level procedure is:

1. Prepare \(|\psi(x)\rangle = U(x,w)\,|0\rangle\).
2. Prepare \(|\psi(x')\rangle\) similarly.
3. Evaluate the overlap via a SWAP test or direct adjoint approach:
   \[
   \langle\psi(x')|\psi(x)\rangle
   = \langle 0|\,U^\dagger(x',w)\,U(x,w)\,|0\rangle.
   \]
4. Square the magnitude to obtain \(\kappa(x,x')\) [2508.06078].

Once \(\kappa(v_t,v_j)\) is available for support vectors \(v_j\), the gate activations follow the kernelized formulas above. The variational parameters \(w\) inside \(U(\cdot,w)\) may be fixed or jointly trained by back-propagating gradients through kernel estimation via parameter-shift rules [2508.06078].

The experimental setup further specifies that the kernel circuits are built from Block-Product State (BPS) embeddings requiring only a few qubits and shallow depth to accommodate NISQ-era devices, with simulation performed via PennyLane + PyTorch [2508.06078]. In this form, Fed-QK-LSTM is not a fully quantum recurrent model in which all recurrent dynamics are encoded directly in quantum hardware; rather, the reported design is a hybrid model in which the quantum contribution appears through kernel evaluation inside otherwise classical recurrent updates. This distinction is important because it determines both the communication format and the hardware assumptions.

## 4. Federated optimization and communication protocol

The federated workflow is described at the block level for one communication round [2508.06078]. On the client side, for \(k=1,\dots,K\), the process is:

1. Receive global model parameters \(\theta^{(t)}\).
2. Locally train DeepConv-QK-LSTM on private data \(D_k\) for \(E\) epochs, updating \(\theta_k^{(t+1)}\).
3. Send \(\theta_k^{(t+1)}\) to the server.

On the server side, the process is:

1. Collect \(\{\theta_k^{(t+1)}\}_{k=1}^K\).
2. Aggregate by Federated Averaging:
   \[
   \theta^{(t+1)} = \sum_{k=1}^K \frac{n_k}{n}\,\theta_k^{(t+1)},\quad
   n=\sum_k n_k.
   \]
3. Broadcast updated \(\theta^{(t+1)}\) back to clients [2508.06078].

The local client objective is
\[
\min_{\theta_k} \;\mathcal L_k(\theta_k)
= \frac1{n_k}\sum_{(x,y)\in D_k} \ell\bigl(h_\theta(x),y\bigr),
\]
where \(\ell\) is cross-entropy for HAR classification and \(n_k=|D_k|\) [2508.06078]. After \(E\) epochs of SGD/Adam, the server performs FedAvg using the same aggregation equation.

The framework’s privacy claim is narrowly specified. Raw sensor data never leaves the client, and only real-valued model parameters and kernel coefficients \(\{\beta_j^{(\cdot)}\}\) are transmitted [2508.06078]. The paper further states that the kernel-based feature map allows highly expressive models with compact parameter vectors, reducing communication payload. This should not be conflated with a formal differential privacy guarantee, because no additive DP mechanism is specified in the Fed-QK-LSTM description.

A useful comparison is provided by the related paper "A Privacy-Preserving Federated Framework with Hybrid Quantum-Enhanced Learning for Financial Fraud Detection" [2507.22908]. That work uses a quantum-enhanced LSTM and augments federated training with "FedRansel," a randomized subset-sharing scheme in which only sampled parameters are exchanged, explicitly noting that no additive DP noise is used but that \((\epsilon,\delta)\) DP can be combined at the client side. This suggests that federated quantum sequence models can differ substantially in what they mean by privacy preservation: in Fed-QK-LSTM it is primarily data locality, whereas in the fraud-detection framework it also includes an explicit anti-poisoning and anti-inference aggregation mechanism [2507.22908].

## 5. Experimental configuration and reported performance

The reported client and communication settings are \(K\in\{2,4,8,16,32\}\) clients and local epochs \(E\in\{1,2,3,4\}\) [2508.06078]. The batch size is noted as not specified and typically 32 or 64. The model hyperparameters are:

- Convolution: 4 layers, each with 64 filters, kernel size \(K=11\)
- QK-LSTM: 2 layers, each 64 units
- Optimizer: Adam with learning rate \(10^{-4}\), weight decay \(10^{-4}\), dropout 0.5 [2508.06078]

The principal reported trends are that, as \(K\) grows, test accuracy, precision, and recall still improve but with diminishing returns, and that increasing \(E\) accelerates convergence at the expense of local computation [2508.06078].

The paper reports a direct ablation against a classical federated LSTM on the RealWorld HAR dataset for 3 clients and 4 local epochs [2508.06078]:

| Metric | Fed-LSTM | Fed-QK-LSTM |
|---|---:|---:|
| Accuracy | 0.90 | 0.95 |
| Precision | 0.95 | 0.97 |
| Recall | 0.94 | 0.97 |
| F1-score | 0.94 | 0.97 |
| Trainable Params | 202,696 | 137,996 |

The stated summary is that Fed-QK-LSTM attains higher accuracy \((+5\%)\) with 32% fewer parameters [2508.06078]. Within the paper’s framing, this result underwrites the claim that quantum kernelization can improve predictive performance while reducing the trainable parameter count.

The resource assumptions are also part of the experimental picture. Because the kernel circuits use BPS embeddings requiring only a few qubits and shallow depth, the model is positioned as viable for scarce quantum devices and near-term hardware constraints, while simulations are performed through PennyLane + PyTorch [2508.06078].

## 6. Interpretation, applicability, and relation to adjacent federated quantum LSTM models

Fed-QK-LSTM is presented as suitable for privacy-sensitive HAR in real-world applications, especially in edge-computing environments and on scarce quantum devices [2508.06078]. The stated rationale is twofold: the recurrent component is shallow, and the quantum kernels are shallow enough to fit resource-constrained edge devices equipped with small QPUs or quantum simulators. The federated design is also described as supporting asynchronous updates and heterogeneous client capabilities [2508.06078].

A recurring misconception in discussions of hybrid quantum sequence models is that all such systems implement quantum gates directly as replacements for recurrent state transitions. Fed-QK-LSTM does not follow that pattern. Its reported formulation uses quantum kernels inside gate computations, whereas the related fraud-detection framework in [2507.22908] replaces each of the four classical LSTM gates with a small variational quantum circuit and measures expectation values \(E[Z]\) to produce \(f_t\), \(i_t\), \(o_t\), and \(\hat g_t\). The two approaches therefore represent different design points within hybrid quantum-enhanced recurrent learning: kernelized recurrence in one case, direct VQC-gated recurrence in the other.

Another misconception is that federated privacy claims imply resistance to all inference or poisoning attacks. In the Fed-QK-LSTM description, the concrete privacy statement is limited to keeping raw sensor data on device and exchanging only real-valued parameters and kernel coefficients [2508.06078]. By contrast, the financial fraud framework explicitly introduces FedRansel to defend against poisoning and inference attacks, reporting that without FedRansel there is up to 6% degradation in Accuracy and 5% in AUC, while with FedRansel this is reduced to approximately 2% and 1% degradation [2507.22908]. This comparison suggests that privacy preservation, communication efficiency, and robustness should be treated as related but distinct properties.

In summary, the reported contribution of Fed-QK-LSTM is the combination of convolutional pruning of local time-series structure, quantum-kernel-powered LSTM gates, and federated averaging into a single HAR pipeline [2508.06078]. The framework’s significance lies not in claiming a general solution to federated quantum learning, but in specifying one concrete hybrid architecture that, on the RealWorld HAR benchmark, improves over a classical federated LSTM while remaining compatible with shallow, near-term quantum resources.

Source: https://www.emergentmind.com/topics/federated-quantum-kernel-based-long-short-term-memory-fed-qk-lstm