# Enhancing Diffusion-Based Music Generation Performance with LoRA
## 4 Experiments
### Evaluation Metrics  
To rigorously assess the quality and fidelity of the generated music, we adopted a multifaceted evaluation strategy. Since musical quality cannot be fully captured by a single scalar value, we employed a combination of objective and subjective metrics to reflect different dimensions of performance. Specifically, we used three complementary metrics: CLAP to measure alignment between the generated audio and text prompts, KAD to assess statistical realism compared with real-world music distributions, and MOS to evaluate perceptual quality based on human listener judgments. Together, these metrics provide a comprehensive view of how well the generated music reflects both semantic intent and listener experience. The first metric, the CLAP score, quantifies how well the generated audio semantically aligns with the input text. This work uses the CLAP model to extract high-dimensional embeddings for audio and text and computes the cosine similarity between these vectors. The resulting similarity score was linearly transformed from the range \([-1,1]\) to \([0,1]\), where higher scores indicate better semantic alignment between the audio and its corresponding text prompt. The second metric, the KAD score, evaluates the statistical similarity between the distributions of the generated and real audio samples. Unlike the Frechet audio distance [27], KAD does not assume Gaussianity in the embedding space and remains robust even when the sample size is small. This score is based on the maximum mean discrepancy [28] framework using a kernel-based approach. The KAD score considers three types of similarities: between generated samples, between real samples, and between generated and real samples. The closer two vectors are, the closer their kernel value is to zero; conversely, the more dissimilar they are, the larger this value becomes. In this metric, a KAD score \begin{table}
\begin{tabular}{c c} \hline \hline
**Item** & **Value** \\ \hline Base model & cvssp/audioldm-s-full-v2 \\ LoRA target layer & query, value \\ LoRA rank & \(1,2,4,8\) \\ LoRA alpha & rank, rank \(\times\) 2 \\ Sampling rate & 16 kHz \\ Input music length & 4 s \\ Output music length & 4 s \\ LoRA initialization & Gaussian \\ Optimizer & AdamW \\ Learning rate & \(1\times 10^{-5}\) \\ Batch size & 2 \\ Epochs & 1000 \\ Checkpoint epochs & 200, 400, 600, 800, 1000 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: LoRA and training configuration used for training. \begin{table}
\begin{tabular}{c c} \hline \hline
**Component** & **Specification** \\ \hline CPU & AMD EPYC 7352 (24-core) \\ GPU & NVIDIA RTX 3080 Ti (12 GB VRAM) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Hardware configuration used for training. closer to zero indicates better performance, reflecting a high degree of similarity between the generated and real audio distributions. In this metric, a value of zero indicates the best score, signifying perfect alignment between distributions, whereas the upper bound is not explicitly defined. The third metric, MOS, is a subjective evaluation method that reflects listeners' perceived quality of the generated audio. It captures dimensions such as naturalness, audio fidelity, and prompt alignment that are often underrepresented in objective metrics [26; 29]. To conduct this evaluation (see Table 4), we recruited a total of 45 verified participants. The survey was administered via Google Form, and participants were required to log in with a Google account to ensure one response per person. Duplicate or anonymous entries were excluded to maintain data integrity. The evaluation was conducted in a blind setup, where the raters were not informed of the model identity behind each sample, minimizing cognitive bias and anchoring effects. Participants consisted of undergraduate and graduate students with general listening experience but no formal training in music or audio engineering, ensuring that the evaluation reflects perceptual judgments of typical users.