1 Introduction
Dance motion plays an important role in digital media such as games, films, and virtual environments, where synchronized choreography enhances immersion and storytelling. Recent advances in generative models have enabled automatic music-to-dance motion generation [1, 2, 3, 4]. However, most existing approaches remain constrained to short sequences due to computational and memory limitations, making it difficult to generate a continuous dance motion. Extending these models to long durations is challenging, as dance performances require consistent motion quality, smooth transitions, and stable movement over time. Some methods attempt to address this by stitching short motion segments [5, 2, 4], but this often introduces temporal discontinuities and misalignment with the music. Other approaches rely on attention-based architectures whose computational and memory costs increase rapidly with se-quence length, limiting their scalability [6, 4, 2]. As a result, gen-erating long and coherent dance motion while maintaining stable performance remains a challenging problem.
To address this, we propose ChoreoMamba (CM), a diffusion-based music-to-dance motion generation method built on the bidi-rectional Mamba architecture [7]. Unlike attention-based models, bidirectional Mamba captures long-range temporal dependencies with linear complexity, making it better suited for extended motion sequences. As the denoising backbone, it lowers the computational cost of each denoising step relative to transformer-based diffusion models while using bidirectional temporal context to improve mo-tion continuity and music-motion alignment. Our method supports sequences of varying lengths and generates temporally coherent dance motions while preserving motion quality and style control. The key contributions of our work are as follows.
2 Related Work
Deep learning–based dance motion generation methods, particu-larly transformer-based architectures, model relationships between music and motion to generate dance sequences [1, 2, 3, 8]. By cap-turing temporal dependencies between audio features and motion, these models improve motion quality and music–motion align-ment. However, transformer architectures scale poorly to long se-quences due to the quadratic computational complexity of the at-tention mechanism, limiting their efficiency and scalability. Dif-fusion models have recently been adopted for motion generation due to their ability to improve motion diversity, quality, and con-trollability [3, 9, 2, 4]. To produce long motion sequences, some approaches stitch short motion segments [10, 11], while others use multi-stage diffusion models that progressively refine motion through coarse-to-fine generation [5]. Although these approaches extend motion duration, stitching may introduce discontinuities be-tween segments, and multi-stage methods may lead to synchroniza-tion inconsistencies when aligning motion with the full music du-ration. Recent single-stage diffusion models such as EDGE [2] and LDA [4] generate motion sequences within a single model, show-ing reasonable temporal consistency and synchronization with mu-sic. However, these models rely on transformer or conformer-based denoisers, which remain computationally expensive for long sequences. To address this limitation, we integrate a state-space model (SSM) in the denoiser network, enabling efficient long-sequence generation while maintaining motion quality and tem-poral synchronization.
SSMs, originally developed for control systems, have recently been applied to deep learning for sequence modeling [12, 13, 14, 15]. Architectures such as Structured State Space for Sequences (S4) and its successor Mamba provide an efficient alternative to trans-formers for long-sequence modeling by using state dynamics in-stead of attention mechanisms, improving scalability for long-range dependencies [12]. In this work, we use Mamba as the de-noiser architecture in the diffusion process. Mamba is a hardware-aware selective SSM that dynamically adjusts its parameters based on input sequences, improving context modeling [16]. Mamba has been successfully applied to motion generation conditioned on text [17, 18, 19], speech [16, 20, 21], and motion style [22]. More recently, Park et al. [23] introduced a Mamba-based diffusion framework for music-conditioned dance generation, employing a two-stage architecture and a Gaussian-based beat representation to enhance rhythmic alignment. Similar to their work, we leverage Mamba to improve temporal modeling in dance synthesis. How-ever, while Park et al. [23] employ a two-stage framework with sep-arate modules for motion modeling and music-motion interaction, ChoreoMamba integrates bidirectional Mamba blocks directly into a single-stage diffusion denoiser for efficient long sequence dance generation. By incorporating both past and future context during denoising [7], our approach efficiently captures long-range tem-poral dependencies while maintaining motion quality and music synchronization.
3 State Space Sequence Models
State space sequence models (SSSMs) [14, 13, 12] are a class of deep learning sequence models inspired by classical continuous state space models. Classical models map an input signal x(t) ∈ ℝ to an output signal y(t) ∈ ℝ, similar to sequence-to-sequence models that predict the next output based on the entire input se-quence. Instead, SSSMs represent the entire input as a latent state h(t) ∈ ℝN×1, which is updated in a constant time. Typically, SSSMs are formulated using the following ordinary differential equation:
where h′(t) represents the updated state or first-order derivative of the latent state h(t). Since y(t) is a function of h(t), h′(t) in-directly affects y(t) by shaping the trajectory of h(t) [12]. Here, A ∈ ℝN×N represents a diagonal state matrix, B ∈ ℝN×1 and C ∈ ℝ1×N are the projection matrices of the input and output, respectively, and N denotes the hidden state size [12, 24].
For practical applications where signals are typically discrete, SSSMs are often discretized using the zero-order hold (ZOH) method, which approximates the continuous process over discrete time intervals. The discretized form is expressed as follows [14]:
where ∆ is a time scale parameter and A and B are respectively discretized versions of A̅ and B̅ of the continuous representa-tion. SSSMs are designed to leverage this discretization for effi-cient training and long-sequence generation by using recurrent and convolutional representations [12, 17]. While the recurrent form processes sequences step by step, the convolutional representation allows parallel computation, making these models effective in bal-ancing training speed and inference performance.
Mamba [12] is a variant of these models that introduces a con-textually aware input selection mechanism by making A, B, C, and ∆ dependent on the input x(t) [18]. Additionally, Mamba in-corporates a hardware-aware state expansion mechanism, lever-aging memory hierarchies (from slower High Bandwidth Mem-ory to faster SRAM) to improve both speed and memory effi-ciency [12]. Mamba’s selection mechanism uses a forward unidi-rectional scan, while bidirectional Mamba architectures enhance this by introducing a backward feature extraction or scanning pro-cess [7, 25]. This bidirectional process enables spatial awareness similar to self-attention mechanisms, allowing for effective model-ing of the global context of the input [7, 25].
4 ChoreoMamba
The objective of our method is to generate dance motion from music and a style label using a diffusion model, as illustrated in Fig. 1. We first preprocess the input and output data (Sec. 4.1) and adopt the Denoising Diffusion Probabilistic Model (DDPM) as the base diffusion process (Sec. 4.2). We then employ bidirec-tional Mamba as the main sequence modeling component of the denoiser (Sec. 4.3). The denoiser network consists of two compo-nents: the Residual Mamba Block (RMB) and the Mamba Refiner Block (MRB) (Sec. 4.4), both based on the bidirectional Mamba architecture [7]. The RMB models short- and long-term dependen-cies and improves motion diversity, while the MRB refines and smooths motion transitions. Finally, the model is fine-tuned to sup-port long-sequence generation.
The input audio is represented as music features x. We initially extracted 29 features capturing timbre, pitch, dynamics, and beats, and applied Principal Component Analysis (PCA) to reduce di-mensionality, resulting in x ∈ ℝF × 6, where F is the number of frames. The style vector s ∈ ℝF × d is represented as a one-hot encoded dance style label, where d is the number of styles. The conditioning input is formed by concatenating music and style fea-tures, c = x ⊕ s ∈ ℝF × (6+d). The output dance motion y is rep-resented using a 19-joint Motorica skeleton [4] (see Fig. 2) with parent-relative rotations in exponential map representation, along with hip vertical position, root translation, and root rotational ve-locity, resulting in y ∈ ℝF × 61 [26, 4]. Root translation is com-puted by projecting the hip joint onto the xz-plane to capture hori-zontal movement independent of the hip’s vertical displacement.
Our diffusion model is based on DDPM [27] and LDA [4], consist-ing of a forward diffusion process and a reverse denoising process. In the forward process, Gaussian noise is gradually added to the dance motion y through a Markov process, producing a sequence that approaches Gaussian noise:
where αt ϵ (0,1) follows a decreasing noise schedule [27,2]. In the reverse process, the denoiser network ϵθpredicts the noise at each timestep conditioned on c, and the model iteratively removes the noise to recover the original motion, approximating p (y0|c).
The model is trained using the standard noise prediction objective:
where ϵ ~ N (0, 1) [27]. Aligned with Alexanderson et al. [4], we find that this objective is sufficient and does not require ad-ditional loss terms. This is due to the use of high-quality motion capture data, which provides clean and physically consistent mo-tion sequences with minimal artifacts such as jitter or foot sliding, allowing the diffusion objective to learn stable motion dynamics without auxiliary constraints.
Bidirectional Mamba serves as the core sequence modeling com-ponent, capturing both past and future temporal context while maintaining linear computational complexity with respect to se-quence length [12, 15]. Fig. 3 shows the details of our bidirectional Mamba layer. Inspired by previous work [7, 25], CM employs a bidirectional Mamba architecture that processes the input signal in both forward and backward directions. The input signal is initially projected into two distinct latent states, z1 and z2, through feed-forward networks. The latent state z1 passes through both forward and backward 1D convolutional layers, followed by their corre-sponding forward and backward SSMs. In parallel, latent state z2 is processed through a SiLU activation layer and then multiplied sep-arately with the outputs of the forward and backward SSMs. The resulting products are combined by addition and projected back to the output signal using a feedforward network.
As shown in Fig. 1, the denoiser takes two inputs: the conditioning signal c and the noisy motion yt. Both inputs are embedded us-ing 1D convolutional layers, while the diffusion timestep t is em-bedded using a feedforward network. The network consists of two main components: RMB and MRB, both built around bidirectional Mamba layers.
The RMB begins with a Feature-wise Linear Modulation (FiLM) layer [28], which incorporates the diffusion timestep em-bedding into the denoiser. The timestep embedding is transformed by an MLP and used to condition the intermediate features, allow-ing the timestep embedding to adjust the scale and bias of each fea-ture channel. This makes the RMB aware of the current noise level before temporal modeling with the bidirectional Mamba layer. The FiLM-conditioned features are then summed with the conditioning signal and noisy motion embeddings, passed through layer normal-ization, and processed by a bidirectional Mamba layer with skip connections to stabilize training and improve information propa-gation. Stacking L RMB layers allows the network to model both short- and long-term temporal dependencies, while FiLM modula-tion improves motion diversity. The output from the RMB is passed to the MRB, which performs fine-grained refinement of the resid-ual features. The refiner consists of layer normalization and a bidi-rectional Mamba layer with skip connections, without FiLM mod-ulation, as its primary role is feature refinement rather than con-ditioning. A final normalization layer, ReLU activation, and a 1D convolution layer map the refined features back to the pose space, producing the denoised output ŷ.
To further support long-sequence generation, we adopt a two-stage training strategy in which the model is first pretrained on short sequences and then fine-tuned on longer sequences, allow-ing it to learn basic motion patterns before adapting to extended motions. The model can also generate sequences longer than those seen during training due to the long-range modeling capability of the Mamba architecture [12, 15, 7].
5 Experiments
We use two datasets: Motorica [4] and FineDance [3]. Motor-ica contains full-length music paired with long motion sequences across eight dance styles; we excluded the Casual style due to miss-ing music. The final Motorica dataset contains 17,557 seconds of paired music-motion data with an average sequence length of 177 seconds, and all sequences were resampled to 30 FPS in BVH format. FineDance contains both short and full-length dance se-quences across 16 genres in SMPL format, which we converted to BVH and filtered to remove noisy samples, resulting in 12,382 seconds of paired music-motion data at 24 FPS.
Our denoiser architecture consists of a 16-layer residual bidirec-tional Mamba network with a hidden dimension of 256 and an SSM dimension of 16. We used a linear noise schedule with 150 diffu-sion steps and trained the model using the AdamW optimizer [29] with a learning rate of 0.001 and a batch size of 8 on an NVIDIA RTX A6000 GPU. Training was performed in two stages: the model was first trained for 10 epochs on short sequences (20 sec-onds for FineDance and 60 seconds for Motorica), and then fine-tuned for 5 epochs on long sequences (60 seconds for FineDance and 150 seconds for Motorica), resulting in a total of 15 epochs.
We compare our model with baseline methods capable of gen-erating sequences longer than 10 seconds using a single diffu-sion model. EDGE [2] generates long sequences by stitching short segments using a transformer architecture, while LDA [4] is a conformer-based model that enables long-sequence genera-tion through a distance-based attention bias. Due to memory con-straints, EDGE generates sequences up to 90 seconds and LDA up to 120 seconds. For fair comparison, all models were trained on both datasets using the same motion representation and evaluated across varying sequence lengths.
To evaluate model performance, we use Diversity (DIV), Beat Alignment Score (BAS), Jitter error, inference time, and number of parameters. Diversity measures variation in the generated mo-tion compared to ground truth and is reported as DIVk in kine-matic feature space and DIVg in geometric space [30, 1]. The Beat Alignment Score measures synchronization between motion and music by computing the average distance between motion beats and music beats [1, 31]. We evaluate motion smoothness using Jitter Error instead of Fre´chet Inception Distance (FID). While FID measures the distribution difference between generated and ground-truth motions [1], it can be unreliable for long sequences due to limited data samples and feature distribution bias [2]. Jitter error measures motion smoothness by computing the average jerk across all joints [32]. We also report Inference Time and Number of Parameters to evaluate model efficiency, where inference time measures generation speed and the number of parameters reflects memory and computational requirements.
6 Results and Discussion
This section presents the experimental results of our model. We first report quantitative results and compare our model with base-line methods using the evaluation metrics described in Sec. 5.4 (Sec. 6.1), followed by qualitative examples of generated dance motions (Sec. 6.2). We then analyze the contribution of key archi-tectural components through ablation studies (Sec. 6.3). Finally, we assess the perceptual quality of the generated motions through a user study (Sec. 6.4).
The quantitative evaluation of our method (CM) compared to other methods across different datasets and sequence lengths is shown in Table 1. The results show that CM consistently outperformed baseline models across both the FineDance and Motorica datasets, demonstrating its adaptability to varying sequence lengths while maintaining efficiency. Specifically, CM achieved high DIVg and DIVk scores, indicating that it generates more diverse motions compared to the baselines.
A key observation is the dataset-dependent relationship between BAS and Jitter. On FineDance, CM achieved slightly lower BAS than LDA but produced the lowest Jitter error, while baseline mod-els showed consistently high Jitter values. To interpret this trend, we measured ground-truth Jitter and found that FineDance exhibits substantially higher motion jitter than Motorica (see GT Jitter row in Table 1), which introduces spurious beat candidates and artifi-cially inflates BAS. In contrast, on Motorica, where ground-truth Jitter is low, CM achieved both the highest BAS and the lowest Jitter across all evaluated sequence lengths. This highlights an im-portant nuance: a high BAS does not necessarily indicate accurate rhythmic alignment if the motion is excessively jittery, and there-fore evaluating both metrics together provides a more reliable as-sessment of motion quality.
For practical deployment, inference time and model complex-ity are essential metrics as they directly affect a model’s usability in real-world applications. With only 10.8M parameters as shown in Table 1, CM required a significantly lower inference time than LDA and EDGE, particularly for long sequences. This reduced complexity and computational load underscore the efficiency of the Mamba architecture in generating high-quality motion, as they scale linearly with input length, making CM an effective choice for resource-constrained settings.
The qualitative results of our method, shown in the supplementary video, demonstrate its capability to generate long-sequence dance motions that align with both input music and specified style la-bels. To further assess the robustness of the model, we tested it on diverse in-the-wild music that were not part of the dataset and compared its performance against baselines. In Fig. 4, the results of baseline models show motion freezes due to being trained on short sequences, leading to abrupt pauses and disjointed movements dur-ing tempo changes. This limitation highlights our model’s advan-tage in handling long-sequence and diverse inputs.
In this ablation study, we evaluated the impact of key components and configurations of our model architecture on diversity (DIVg and DIVk), BAS, and Jitter error metrics. All experiments were performed on models trained on the Motorica dataset, providing insight into the effects of each architectural modification.
FiLM Layer Ablation.Table 2 presents the results of the FiLM layer ablation evaluated on 10-second sequences. The FiLM layer modulates timestep features during training, potentially improving the diversity and stability of the generated motions. Unlike sim-ple bias addition, FiLM enables adaptive feature conditioning by scaling relevant music features, leading to improved diversity and reduced jitter. The results show that incorporating FiLM increases both DIVg and DIVk and lowers Jitter error, leading to smoother and more stable motions. However, FiLM slightly reduced BAS, likely due to its modulation across diffusion steps. By applying feature-wise affine transformations at each step, FiLM adjusts rep-resentations before passing them to Mamba, introducing subtle shifts in motion timing relative to the music beats. Although the FiLM layer slightly decreased the BAS, this reduction was small and did not significantly impact overall performance, consider-ing the stability and diversity benefit it introduced. Table 3 further presents the results on 60-second sequences. The model with FiLM achieved the best overall configuration, showing improvements in DIVk, BAS, and Jitter error, which is generally consistent with the short-sequence evaluation. For a clear comparison of visual quality improvements with the use of FiLM, please refer to the supplemen-tary video.
| Method | DIVg ↑ | DIVk ↑ | BAS ↑ | Jitter ↓ |
|---|---|---|---|---|
| Ground Truth | 7.498 | 13.277 | 0.172 | 123.83 |
| w/o FiLM | 5.868 | 3.233 | 0.168 | 211.03 |
| w/ FiLM | 6.143 | 3.348 | 0.164 | 204.68 |
| Method | DIVg ↑ | DIVk ↑ | BAS ↑ | Jitter ↓ |
|---|---|---|---|---|
| Ground Truth | 7.498 | 13.277 | 0.172 | 123.83 |
| w/o FiLM | 3.645 | 2.385 | 0.168 | 446.17 |
| w/ FiLM | 2.006 | 4.062 | 0.169 | 420.01 |
Mamba Refiner Block Ablation.Table 4 presents the results of the Mamba Refiner Block (MRB) ablation evaluated on 10-second sequences. MRB is designed to enhance motion quality during the final stage of generation by refining the motion features learned by the preceding residual Mamba blocks. The model with MRB achieved a higher BAS and reduced Jitter error, highlight-ing its role in providing rhythmically aligned and stable motion. A slight trade-off was observed in diversity, as the MRB model marginally reduced DIVg. However, the gain in motion quality ap-pears to outweigh this minor diversity loss as shown in the supple-mentary video. We also tested an (L-1)-sized RMB with MRB and found that it resulted in lower jitter and improved DIVg, suggest-ing that removing the final residual block does not degrade motion stability. These findings highlight MRB’s role in refining motion features learned earlier in the model. Table 5 further reports the results on 60-second sequences. The model with MRB achieved the best DIVk, and BAS, showing that the benefit of MRB is also observed in long sequence generation. Although the Jitter error is slightly higher than the model without MRB, the overall results suggest that MRB improves motion diversity and beat alignment while maintaining comparable stability.
| Method | DIVg ↑ | DIVk ↑ | BAS ↑ | Jitter ↓ |
|---|---|---|---|---|
| Ground Truth | 7.498 | 13.277 | 0.172 | 123.83 |
| w/o MRB | 6.143 | 3.348 | 0.164 | 327.51 |
| w/ MRB | 6.131 | 3.495 | 0.169 | 253.24 |
| (L-1) w/ MRB | 6.351 | 3.367 | 0.161 | 174.54 |
| Method | DIVg ↑ | DIVk ↑ | BAS ↑ | Jitter ↓ |
|---|---|---|---|---|
| Ground Truth | 7.498 | 13.277 | 0.172 | 123.83 |
| w/o MRB | 3.320 | 3.295 | 0.164 | 324.19 |
| w/ MRB | 6.280 | 4.746 | 0.169 | 337.55 |
| (L-1) w/ MRB | 3.125 | 3.620 | 0.169 | 328.14 |
While structurally similar to the RMB, the MRB serves a distinct purpose within the network. Throughout the sequence, each resid-ual block contributes to the overall motion by stabilizing gradi-ent flow and capturing broad contextual features. However, as each RMB layer sequentially adds its output back to the input across the L layers, errors may accumulate. The MRB, positioned near the output layer, performs a final bidirectional scan across the accu-mulated outputs to refine and selectively emphasize the most crit-ical information from these layered states. This final stage helps address any inconsistencies left by the residual blocks, providing a degree of refinement that the residual blocks alone are not opti-mized to achieve.
Number of Residual Mamba BlocksTable 6 shows the effect of varying the number of RMBs in the architecture. Optimal per-formance is achieved with 16 layers, where the highest diversity and BAS scores were observed, indicating that this configuration strikes the best balance across all metrics. In particular, Jitter error is minimized with 12 layers, but this comes at the cost of slightly reduced diversity. Conversely, increasing the number of layers to 20 resulted in a decline in both diversity and BAS scores, suggest-ing that exceeding 16 layers may introduce redundancy or exces-sive smoothing, which can hinder the model’s expressiveness and performance.
| Method | DIVg ↑ | DIVk ↑ | BAS ↑ | Jitter ↓ |
|---|---|---|---|---|
| 8 Layers | 6.131 | 3.495 | 0.164 | 253.24 |
| 12 Layers | 6.343 | 3.514 | 0.164 | 221.26 |
| 16 Layers | 6.355 | 3.973 | 0.166 | 245.68 |
| 20 Layers | 6.097 | 3.192 | 0.16 | 241.07 |
Sequence Length for PretrainingTable 7 presents the impact of pretraining sequence lengths by comparing models pretrained on 60-second sequences with those pretrained on 10-second se-quences. Both models were subsequently fine-tuned and evalu-ated on 150-second sequences for this ablation study. Models pretrained on 60-second sequences consistently outperformed those pretrained on 10-second sequences across all metrics. These find-ings highlight the advantages of using long pretraining sequences to enhance diversity, alignment, and naturalness in generation.
| Method | DIVg ↑ | DIVk ↑ | BAS ↑ | Jitter ↓ |
|---|---|---|---|---|
| FT (10s) | 3.876 | 2.423 | 0.176 | 175.35 |
| FT (60s) | 4.169 | 3.066 | 0.179 | 170.19 |
We conducted a user study to assess Beat-Music Alignment (BMA), Style-Motion Alignment (SMA), naturalness, and over-all dance quality, using a Mean Opinion Score for each metric. The study included 25 participants, composed of 48% dancers and 52% non-dancers. Each participant evaluated 12 dance motions, with four motions per method. The participants rated each dance motion’s quality on a 5-point Likert scale. The results, summa-rized in Table 8, show that the participants preferred CM across all metrics. This suggests that CM is effective at synchronizing dance motions with the music while also capturing stylistic nuances and maintaining a natural motion quality.
| Method | BMA ↑ | SMA ↑ | Naturalness ↑ | Overall ↑ |
|---|---|---|---|---|
| LDA | 3.85 | 3.7 | 3.68 | 3.743 |
| EDGE | 3.47 | 3.48 | 3.3 | 3.42 |
| CM | 3.96 | 3.72 | 3.99 | 3.89 |
7 Limitations
Our current model is limited to generating sequences up to 180 sec-onds due to the maximum sample lengths available in the dataset.
Although the model can train and generate longer sequences with-out memory constraints, the lack of sufficient long-duration train-ing data restricts its ability to learn temporal patterns over extended durations. Consequently, performance on longer sequences is con-strained by the available training data. Future work could address this limitation by expanding datasets to include more sequences longer than 180 seconds or by developing data augmentation tech-niques that extend sequence duration while preserving alignment between music and motion.
8 Conclusion and Future Work
We introduced a bidirectional Mamba diffusion model for efficient long-sequence dance generation conditioned on music and style. Our model was evaluated across multiple sequence lengths us-ing diversity, alignment, naturalness, and efficiency metrics, and outperformed previous state-of-the-art methods while generalizing well to in-the-wild inputs and multiple dance styles. Future work includes refining loss functions to better balance motion stability and rhythmic consistency, and extending the model to full-length music and choreographic analysis.