Deep learning-based surface electromyography (sEMG) gesture recognition is frequently bottlenecked by data scarcity and limited subject diversity. While synthetic data generation via Generative Adversarial Networks (GANs) and diffusion models has emerged as a promising augmentation strategy, these approaches often face challenges regarding training stability or inference efficiency. To bridge this gap, we propose EMGFlow, a conditional sEMG generation framework. To the best of our knowledge, this is the first study to investigate the application of Flow Matching (FM) and continuous-time generative modeling in the sEMG domain. To validate EMGFlow across three benchmark sEMG datasets, we employ a unified evaluation protocol integrating feature-based fidelity, distributional geometry, and downstream utility. Extensive evaluations show that EMGFlow outperforms conventional augmentation and GAN baselines, and provides stronger standalone utility than the diffusion baselines considered here under the train-on-synthetic test-on-real (TSTR) protocol. Furthermore, by optimizing generation dynamics through advanced numerical solvers and targeted time sampling, EMGFlow achieves improved quality-efficiency trade-offs. Taken together, these results suggest that Flow Matching is a promising and efficient paradigm for addressing data bottlenecks in myoelectric control systems. Our code is available at: https://github.com/Open-EXG/EMGFlow.
Figures & tables
Figure 1: Overview of the proposed EMGFlow pipeline. The framework consists of four stages: (a) sEMG data acquisition and sliding-window preprocessing; (b) conditional flow-matching training with time sampling and AdaGN-based condition injection; (c) synthetic EMG generation via classifier-free guidance and ODE solvers; and (d) comprehensive evaluation through fidelity metrics, train-on-synthetic test-on-real (TSTR), and augmentation experiments.
Dataset
Subjects
Channels
Sampling (Hz)
Trials
Train
Test
Gestures
Ninapro DB2
40
12
2000
6
1, 3, 4, 6
2, 5
49
Ninapro DB4
10
12
2000
6
1, 3, 4, 6
2, 5
52
Ninapro DB7
20
12
2000
6
1, 3, 4, 6
2, 5
40
Table 1: Characteristics and setup of three public sEMG datasets.
Methods
EMGHandNet
WaveFormer
Acc
Macro-F1
Macro-Rec
Acc
Macro-F1
Macro-Rec
Baseline
73.05 ± 4.48
73.08 ± 4.36
73.38 ± 4.37
76.36 ± 3.81
76.39 ± 3.67
76.62 ± 3.63
Replicate
74.84 ± 4.13
74.95 ± 3.97
75.21 ± 3.98
77.08 ± 3.84
77.14 ± 3.60
77.37 ± 3.60
Jitter&Scale
73.37 ± 4.43
73.46 ± 4.11
73.64 ± 4.15
74.24 ± 4.78
74.32 ± 4.31
74.66 ± 4.34
Upsample
74.60 ± 3.81
74.63 ± 3.55
74.94 ± 3.55
78.55 ± 3.68
78.64 ± 3.44
78.96 ± 3.44
Freq-Mask
74.42 ± 5.06
74.51 ± 4.74
74.70 ± 4.75
76.17 ± 3.85
76.22 ± 3.54
76.53 ± 3.48
Table 2: Performance comparison of conventional and generative augmentation methods on Ninapro DB7 using EMGHandNet and Waveformer. Results are reported as mean ± std (%). Best results are highlighted in bold ; second-best are underlined . Overall, learned generative augmentation is consistently stronger than most hand-crafted perturbation baselines, and EMGFlow achieves the best or tied-best performance in most metrics, indicating a favorable accuracy–efficiency trade-off relative to DDIM, DDPM, and WGAN-GP.
Methods
EMGHandNet
Waveformer
Acc
Macro-F1
Macro-Rec
Acc
Macro-F1
Macro-Rec
Baseline
64.74 ± 5.38
65.39 ± 5.41
65.65 ± 5.60
68.72 ± 5.76
69.17 ± 5.64
69.54 ± 5.75
Replicate
66.38 ± 5.48
67.05 ± 5.42
67.36 ± 5.62
68.50 ± 6.41
69.02 ± 6.28
69.40 ± 6.40
Jitter&Scale
65.35 ± 4.88
65.94 ± 4.74
66.26 ± 4.88
65.43 ± 5.72
66.08 ± 5.49
66.35 ± 5.62
Upsample
65.17 ± 5.18
65.79 ± 5.19
66.15 ± 5.31
69.02 ± 5.87
69.47 ± 5.78
69.86 ± 5.90
Freq-Mask
66.89 ± 4.84
67.39 ± 4.62
67.82 ± 4.90
67.52 ± 5.49
67.98 ± 5.48
68.26 ± 5.54
Table 3: Performance comparison of conventional and generative augmentation methods on Ninapro DB4 using EMGHandNet and Waveformer. Results are reported as mean ± std (%). Best results are highlighted in bold ; second-best are underlined . Similar to DB7, learned generative augmentation generally outperforms most conventional perturbation baselines, while EMGFlow provides the strongest overall performance among practical generators and remains competitive even against full-step DDPM.
Methods
EMGHandNet
Waveformer
Acc
Macro-F1
Macro-Rec
Acc
Macro-F1
Macro-Rec
Baseline
70.28 ± 5.92
70.97 ± 5.49
71.26 ± 5.36
72.47 ± 6.20
73.11 ± 5.80
73.50 ± 5.70
Replicate
71.12 ± 5.90
71.91 ± 5.38
72.21 ± 5.26
73.35 ± 6.30
73.99 ± 5.90
74.33 ± 5.80
Jitter&Scale
70.63 ± 6.33
71.52 ± 5.86
71.73 ± 5.81
69.82 ± 6.90
70.63 ± 6.40
70.95 ± 6.30
Upsample
70.45 ± 6.14
71.18 ± 5.58
71.50 ± 5.48
73.59 ± 6.50
74.27 ± 6.00
74.68 ± 5.90
Freq-Mask
70.82 ± 5.98
71.56 ± 5.51
71.89 ± 5.41
71.63 ± 6.40
72.30 ± 5.90
72.70 ± 5.90
Table 4: Performance comparison of conventional and generative augmentation methods on Ninapro DB2 using EMGHandNet and Waveformer. Results are reported as mean ± std (%). Best results are highlighted in bold ; second-best are underlined . EMGFlow remains among the strongest methods across both backbones, although full-step DDPM is slightly better on selected EMGHandNet metrics, suggesting that its small accuracy advantage comes at a substantially higher sampling cost.
Dataset
Backbone
Method
Accuracy ↑
Macro-F1 ↑
Macro-Recall ↑
DB2
EMGHandNet
Baseline (real)
70.28±5.92
70.97±5.49
71.26±5.36
WGAN-GP
39.48±5.51
40.25±5.54
41.12±5.21
DDPM
65.20±5.54
65.87±5.12
66.95±4.98
DDIM
62.16±6.43
63.27±6.16
63.92±5.94
EMGFlow
64.51±5.52
65.50±5.16
66.19±5.04
Waveformer
Baseline (real)
72.50±6.20
73.10±5.80
73.50±5.70
Table 5: Train-on-synthetic test-on-real (TSTR) results of DDIM, DDPM, and EMGFlow across datasets and classifier backbones. In this protocol, the downstream classifier is trained only on synthetic data and then evaluated on held-out real test data, making it a stricter measure of standalone synthetic-data utility than standard augmentation. Results are reported as mean ± std (%). EMGFlow consistently outperforms the accelerated DDIM baseline in all settings and is stronger than full 1000-step DDPM in five of the six dataset-backbone combinations.
Figure 2: Single-column comparison of feature-based fidelity metrics across datasets. Each panel reports one metric, and the asterisk marks the best learned generator within each dataset. EMGFlow achieves the strongest overall fidelity, while the real-data baseline remains clearly better than all learned generators.
Figure 3: Summary of guidance effects on DB7 using EMGHandNet. (a) Feature-based fidelity metrics. (b) TSTR utility. (c) Augmentation utility. (d) PRDC metrics. (e) Neighborhood-based realism diagnostics, with the train-test gap shown on the right axis. (f) Prototype-concentration diagnostics. Stronger guidance improves class-discriminative and local-realism metrics, but reduces coverage and downstream utility.
Figure 4: t-SNE visualizations of real (blue) and generated (red) samples for one subject from (a) DB4, (b) DB7, and (c) DB2, where different shades denote different gesture classes. Across all three datasets, the generated points largely overlap the real class clusters, suggesting that EMGFlow captures the coarse class-conditional geometry in feature space. At the same time, several clusters still show mild shifts and density differences, which is consistent with the remaining realism gap indicated by the quantitative fidelity metrics.
Figure 5: Examples of real (left) and generated (right) multi-channel sEMG windows from (a) DB7 and (b) DB4. The generated signals reproduce the overall amplitude range, inter-channel variation, and transient burst structure of the corresponding real samples, while remaining visually distinct. These waveform-level examples qualitatively support the feature-space and downstream results, although slight differences in local smoothness and channel-specific details are still visible.
NFE
FID ↓
CAS ↑
IS ↑
DDIM
Heun
DDIM
Heun
DDIM
Heun
10
6.836
2.066
0.578
0.773
11.70
16.60
20
3.359
2.006
0.686
0.764
14.27
16.26
30
2.647
1.999
0.721
0.762
15.06
16.24
40
2.407
1.998
0.733
0.758
15.42
16.14
50
2.274
2.018
0.740
0.760
15.53
16.18
Table 6: Comparison between DDIM and Heun under matched numbers of function evaluations (NFE) on DB7. Under the same sampling budget, Heun consistently achieves lower FID, higher CAS, and higher IS than DDIM across the entire 10–50 NFE range. Notably, FM with Heun at 10 NFE already surpasses DDIM at 50 NFE on both FID and CAS, highlighting the efficiency advantage of Flow Matching with higher-order ODE solvers.
Method
NFE
FLOPs / Sample
Speed(sample/s)
DDPM
1000
4255.4M
44.5
DDIM
50
208.57M
902.4
EMGFlow (Heun)
40
166.85M
1117.4
EMGFlow (Heun)
20
83.43M
2225.6
Table 7: Computational benchmark on Ninapro DB7. Since the diffusion baseline and EMGFlow use the same backbone, the comparison mainly highlights inference-side efficiency under different samplers and NFE budgets. EMGFlow with Heun achieves substantially lower FLOPs and higher throughput than DDPM and remains faster than DDIM, while retaining strong sample quality in the main experiments.
Figure 6: FID trajectories of the diffusion baseline and EMGFlow during training on DB4 and DB7. EMGFlow reduces FID more rapidly in the early stage and reaches a stable low-FID regime with fewer training steps on both datasets. This trend suggests that Flow Matching is not only efficient at inference time, but also easier to optimize under the present training setup.
Figure 7: Comparison of Euler, Heun, and RK4 within EMGFlow under matched numbers of function evaluations (NFE) on DB7. When the sampling budget becomes moderately large, Heun and RK4 consistently achieve lower FID and higher CAS than Euler, showing that higher-order integration better exploits the learned continuous vector field. Euler is only comparatively less poor in the extremely low-NFE regime, where the number of effective integration steps is too small for multi-stage solvers to realize their accuracy advantage.
Figure 8: Effect of time sampling strategy on DB2. The five panels report FID, IS, CAS, augmentation accuracy, and TSTR accuracy, respectively. Compared with uniform sampling, logit-normal time sampling improves all reported metrics, with the largest gain appearing under the more stringent TSTR setting. This result suggests that emphasizing the intermediate portion of the flow trajectory provides a more useful training bias than sampling time uniformly.
Method
Augmentation
TSTR
Acc
Macro-F1
Macro-Rec
Acc
Macro-F1
Macro-Rec
GN+AdaGN (default)
78.26 ± 3.95
78.49 ± 3.69
78.68 ± 3.71
68.91 ± 4.89
69.33 ± 4.59
69.95 ± 4.40
GN+add
77.36 ± 3.50
77.54 ± 3.39
77.69 ± 3.31
67.45 ± 4.32
67.80 ± 4.09
68.22 ± 3.98
GN+concat
77.15 ± 3.93
77.33 ± 3.88
77.60 ± 3.80
64.62 ± 5.11
64.93 ± 4.63
65.47 ± 4.59
Table 8: Effect of conditioning interface on downstream utility on DB7 using EMGHandNet. Results are reported as mean ± std (%). The default GN+AdaGN design achieves the best performance under both augmentation and TSTR, while simpler GN+add and GN+concat variants lead to consistent degradation, showing that the conditioning interface materially affects the usefulness of the generated data rather than serving as a minor implementation detail.
Method
FID ↓
IS ↑
CAS ↑
PR ↑
RE ↑
Density ↑
Coverage ↑
GN+AdaGN (default)
2.030
16.217 ± 0.327
0.762
0.791
0.913
0.547
0.670
GN+add
2.115
15.518 ± 0.316
0.736
0.762
0.931
0.505
0.646
GN+concat
2.697
13.480 ± 0.286
0.660
0.723
0.940
0.446
0.589
Table 9: Effect of conditioning interface on fidelity and distributional geometry on DB7 using EMGHandNet. The default GN+AdaGN design achieves the best overall balance of FID, IS, CAS, and PRDC-style geometry metrics, while simpler GN+add and GN+concat variants degrade class-discriminative fidelity and coverage. This result suggests that adaptive conditional normalization improves class-aware generation without collapsing support.