TLDR: A new reinforcement learning (RL) framework has been developed to combat ‘hallucinations’ in AI-generated music, where songs deviate from input lyrics. By creating a unique dataset based on phoneme error rates and employing preference optimization strategies like DPO, PPO, and GRPO, the framework significantly reduces lyrical misalignment while maintaining musical quality. This marks a crucial step towards more reliable and human-aligned AI music.
Artificial intelligence has made incredible strides in generating music, allowing algorithms to create everything from melodies to full songs. However, a significant challenge known as ‘hallucination’ often plagues these AI-driven creations. This means the generated music might not align with the input lyrics, leading to incoherent and nonsensical outputs.
Traditionally, supervised fine-tuning (SFT) methods have been used, but they struggle to effectively correct these errors. This is where a new approach comes in: a novel reinforcement learning (RL) framework that uses preference optimization to tackle music hallucination head-on.
The core idea is to teach the AI what good, aligned music sounds like, and what constitutes a ‘hallucination’. To do this, the researchers developed a robust ‘hallucination preference dataset’. This dataset was built by calculating the ‘phoneme error rate’ (PER) – essentially, how many sound units in the generated song don’t match the original lyrics – and then filtering the data based on specific rules to capture human preferences for alignment.
Within this RL framework, three distinct preference optimization strategies were implemented and evaluated: Direct Preference Optimization (DPO), Proximal Policy Optimization (PPO), and Group Relative Policy Optimization (GRPO). DPO works by directly enhancing the likelihood of generating preferred musical sequences while reducing the likelihood of undesired ones. PPO and GRPO, on the other hand, use a reward model that learns to assign scores based on how well the generated music aligns with the lyrics, then iteratively optimizes the song generation process to maximize these rewards.
The results are promising. DPO, especially when combined with a technique called Reject Sampling (RS+DPO), showed a significant reduction in PER, meaning fewer hallucinations. Specifically, RS+DPO reduced hallucinated samples by 16.5% and increased hallucination-free outputs by 38.47%, with a 9.60% gain in reward score. PPO and GRPO also yielded notable PER reductions. Crucially, these improvements in lyric alignment did not come at the cost of musical quality or aesthetics, which were preserved across all methods.
Also Read:
- Enhancing Text-to-Speech Naturalness with a Novel Fine-Tuning Method
- Addressing AI Hallucinations in Multimodal Models Through Causal Understanding
This work represents a significant step towards creating more reliable and high-fidelity AI-generated music. The framework’s design is also highly adaptable, meaning it could be applied to other music generation challenges in the future, such as enhancing musicality or controlling specific styles. For more technical details, you can refer to the full research paper: Towards Hallucination-Free Music: A Reinforcement Learning Preference Optimization Framework for Reliable Song Generation.


