manual fitness test for music/sound evolution?

13 views
Skip to first unread message

David Epstein

unread,
Feb 17, 2022, 1:41:09 PM2/17/22
to deap-...@googlegroups.com
Hi folks,

What is the feasibility of using deap with a manual fitness test? I would generate many random 15-second music/sound files and then select which ones survived to the next generation by listening to them. I'm aware of and impressed by Samim's github for automated novelty selection within Ableton Live (a popular music software). I tried to install it, but the dependencies and possibly the script itself require updating or using older versions.

Anyway, I thought I'd take a different approach. I'd welcome opinions and advice. How would I determine the required size of the initial and subsequent generations? Are there evolutionary approaches that use ranking instead of pass/fail for fitness? Are there any approaches that permit selecting an aspect of the individual to survive (e.g. rhythm) and another aspect of the same individual not to survive (e.g. timbre)?

thank you,
-david

Derek Tishler

unread,
Feb 17, 2022, 3:08:08 PM2/17/22
to deap-users

A few ideas:



What is the feasibility of using deap with a manual fitness test?

- Main issue is: 15 Sec * N_Pop x N_Generations = A great deal of work to perform. 15 seconds over 100 pop size over 50 generations will create ~21 hours of labor to perform for a single deap run.

- Manual evaluation is possible: you would need to have the evaluation step produce some form of UI(example1, example2) or request that gives the user the ability to play, listen, and form a fitness via grading(you mention rhythm, timbre, etc) such as a 5 star system per metric or binary flags(checkbox) for things like if awful static is present. Then, throw that “grading” into a single or multi fitness value to optimize high-human-scores as you desire (maximize rhythm quality and reduce static, etc). Something like SOE(RhythmScore + VolumeScore + StaticScore) or MOE(RhythmScore, VolumeScore, StaticScore).

How would I determine the required size of the initial and subsequent generations?

- Id guess with trial and error as we normally have to do, however this makes the labor problem mentioned above immensely more problematic.

Are there evolutionary approaches that use ranking instead of pass/fail for fitness?

- The majority of the examples provided by DEAP use a discrete or continuous fitness 'ranking' or rather Selection on fitness to compare individuals and select favorable ones in an iterative process until N target items are left for the next generation. As mentioned above a human score can be created and SOE or MOE can be performed on those scores to reach a successful population over time.

Are there any approaches that permit selecting an aspect of the individual to survive (e.g. rhythm) and another aspect of the same individual not to survive (e.g. timbre)?

- The fitness of any individual is the secret sauce of an evolution. This would have to be explored with trial and error but you can minimize or maximize metrics as you desire. For example in Single Objective Evaluation(SOE), if a song is too loud you can have a volume metric that if clicked in the UI would then penalize the fitness value by some fixed amount to ensure that undesirable behavior is avoided when forming children.

Focusing on the issue of time and labor:

This is a common issue in real life or computational optimization (like lab work or very long running experiments) that can be tackled with an iterative approach that focuses on reducing the total number of steps vs searching with more brute force. One popular choice for programs or real-life work is Bayesian optimization with a system like Spearmint, where a 1-by-1 evaluation is performed and the model increases its ability to perform the desired inference across the solution space.

This ML model approach could be applied to grading a song or regressing a fitness score or even for generating the music itself. In the case of generating audio, we are talking a VERY high dimensional-per-sample/individual and that may require a great deal of evaluations which again becomes problematic if things are done by humans.

I can imagine a multi step approach that involves training a ML grading system with humans which can do the work to grade the songs automatically once enough data is ingested. This way the labor is performed to a critical point where a grading model is usable vs having a human check every individual with every evolution attempt. Then you can use an evolution or another regression ML model to perform music generation which can then be graded automatically at scale. You may have seen a similar approach in human-directed-reinforcement-learning approaches where a human starts the work but hands it off to a model or scales the efforts of humans with help of agents(models). 

Another relating field of interest may be GANs(generative adversarial networks) or newer tech like a Transformer which also tackles similar problems of generating and grading things such as images or sounds. These networks have shown a good affinity for problems like this as they can tackle large scale, high dimensional problems via deep neural nets.

I hope any of that can be of some use!
- Derek Tishler

Reply all
Reply to author
Forward
0 new messages