We all know instinctively that music has tangible effects on our bodies and minds. Upbeat songs motivate us to exercise or take on a challenge; softer, less rhythmic music might relax us or get us ready for bed. Researchers have done studies that measure these effects on the body through skin and brain monitoring. A better understanding of the ways music affects us can have great potential for well-being, general health, and even the treatment of specific disorders. As technologies progress, researchers are gaining more knowledge about using machine learning for music therapy possibilities.
AI-Driven Music Generation for Mental Well-Being
One UK research team aimed to measure the effects of different musical pieces on listeners, using a spectrum scale of calm/positive to anxious/negative. They gathered initial data based on listeners’ reports and skin conductivity, which has been shown to be a strong metric for emotional response. They then fed this data into a supervised machine learning algorithm that further predicted other music with strong affective capabilities. Testing the new music led to a feedback loop that showed the ML system to be an efficient way of identifying songs with desired effects. The team used a Hidden Markov Model (HMM) to analyze specific data from MIDI files in the music—such as melody, pitch, dynamics, and timing—and correlate each one with the scores on the positivity scale. It could then predict whether other songs with similar properties would produce the same kinds of results.
The Mozart Effect
Back in the early 1990s, researchers found that listening to Mozart’s “Sonata for Two Pianos in D Major” (K448) boosted the IQ and spatial reasoning skills of college students compared to those that did other relaxation techniques or nothing at all. This became known as “the Mozart effect,” and it sparked curiosity among scientists. (It was even tested on rats—it turned out Mozart was quite a bit more helpful to maze-going rodents than minimalist composer Philip Glass was!)
The same Mozart sonata was also found to reduce the neural activity that led epileptic patients to have seizures. But other studies had trouble replicating the effect, and the findings were controversial. A new study this year used more precise measurement tools to track brain activity and utilized machine learning to break the music into segments and analyze the properties that led to positive response. It showed that the sonata did indeed help significantly more than any other music tested—the Mozart effect appears to be the real thing.
Interestingly, one of the musical qualities that helps for this purpose is a disruption of expectation. This bit of surprise causes what the study’s lead author Robert Quon calls “positive emotional responses” (whereas the UK study linked “positive” to lower variability in skin conductivity, or less disruption—an indication that different musical qualities can be useful for different desired outcomes).
Researchers are hoping to further use machine learning to identify specific beneficial properties within musical pieces, and then search for those properties in large music databases like Spotify. One day, there may be a playlist proven to reduce epileptic seizures.
What Types of Algorithms are Applied in Machine Learning for Music Therapy?
Studies like those mentioned above used particular machine learning algorithms chosen for their projects. Another one, published this year, set out to compare different ML systems to determine which was the most accurate at predicting emotional impact. The authors looked at various machine learning models: decision tree, random forest, support vector machine (SVM), artificial neural network (ANN), and a hybrid method using both SVM and ANN. They found their hybrid SVM/ANN model to be the most accurate at predicting emotional responses to songs. Their combination method first used SVM to extract important musical features, then fed this data into the ANN model which classified it in order to predict its effectiveness in music therapy.
Other classification algorithms that researchers have used for similar purposes include Gaussian mixture models, k-nearest neighbor, and C4.5. Surely, there’s a lot more to be learned about how these various models can play a part in music research.
A Bright Future in Bright Melodies
The ability to pinpoint music’s physiological and mental effects has powerful potential. Music has been documented to reduce stress, bring improvements in cardiovascular health, and even reduce dementia in elderly populations. And those are only a few of the health benefits associated with it. But not all music is created equal, and different pieces have different effects. Machine learning can greatly assist and speed up the process of analyzing which musical properties cause measurable improvements for particular applications. It brings us that much closer to a healthy and effective therapy method with no side effects—except possibly some dancing feet.
Interested in other cool things machine learning can do? Check out our articles on how it helps with Insider Risk Management, natural language processing, and can learn to beat a video game on its own.