Showing posts with label artificial neural networks. Show all posts
Showing posts with label artificial neural networks. Show all posts

Sunday, December 31, 2017

Sabbatical Report: Last Day of 2017


With today marking the end of 2017, I thought I would provide an end-of-year update on my current sabbatical. I provided an update at the end of its first month on August 1, and have not provided much information since then. I have been too busy writing sabbatical projects to take the time to add to this blog!

The primary task for my sabbatical is working on a new book. This book explores the probabilistic behavior of simple artificial neural networks with a combination of citations to classic literature in information theory, probability theory, and cybernetics, with the reports of many formal proofs about network behavior, with detailed presentations of many new computer simulation results, and (eventually) with the report of the results of some new experiments on human probability matching.

The book is taking shape. Today – the last day of 2017 – marked the final tweaking of Chapters 4 and 5. So, the current status of the book is very solid drafts of its first five chapters, amounting to 145 pages that hold 73421 words. The next chapter requires me to scrape off the programming rust and write some new neural network code, which hopefully will not take too long. Once the new code is in place I will proceed with a new chapter on including positive feedback in a learning algorithm, which will then lead into a chapter in which I present the results of an experiment with human subjects that I conducted in September. I’ve been at the University of Alberta for 30 years, and this study marked the first time that I used the subject pool on my own!

The development of the book so far has involved collecting data from hundreds of different networks, not to mention reading a lot of new material. Since beginning this project I have consumed 33 books, and have to read several more to write a sensible version of Chapter 6.

The book project is the primary focus of my sabbatical. However, I have been very busy with another project as well. I have had the good luck to collaborate with my colleague Cor Baerveldt and his graduate students on the analysis of archival material related to the Center of Advanced Study in Theoretical Psychology, which existed at the University of Alberta from 1965 until 1990. We have been very busy with this project; we have two articles currently under review at different journals, and I have built a poster that goes with an abstract that I have submitted to Cheiron. With luck I will be able to present some new historical material when Cheiron holds its 50th annual meeting in June at Akron, Ohio, the home of a huge archive of psychological material.

In short, the sabbatical project is going well, and I am hoping that 2018 is a happy and productive new year – not just for me, but for anyone who has taken the time to read this post.

Happy New Year!

Friday, October 09, 2015

A 'Strange Circles' Ukulele Exercise

In my lab we train artificial neural networks to solve musical problems, and then examine the structures of these networks to see how they work.  Usually we do this to make discoveries about music theory and musical cognition.  However, sometimes we stumble onto something more practical – like new ideas for exploring chord progressions along the fretboard of a ukulele.

In an earlier project we trained a network to learn the Coltrane changes, which is an important progression of jazz chords.  Inside this network we discovered an interesting map, presented below, that leads from the root note of one chord to the root note of the next.

 The map above has one intriguing property: its outer and inner rings of notes are examples of what we call strange circles.  Each of these rings is a circle of major seconds; neighboring pitch classes on the ring are a major second, or two semitones, apart.  For instance, A is a major second away from both B and G (the outer ring), while D is a major second away from both C and E (the inner ring).

One day the map above happened to be drawn on the chalkboard when I was in the lab with my ukulele in hand.  I was noodling some minor chords, and was pleased by the sound of moving from D minor to A minor.  As I played these two chords, I looked at the map on the board, and noticed how it lined up these two notes.  Intrigued, I played other combinations of chords – for instance C minor and G minor – whose root notes were in similar relationships in the map.  They too were pleasing.  I then realized that a slight modified map would produce a new picture that I could use to guide me through a progression of twelve different chords.  I drew the map, played its succession of chords, and I really liked the sound of the entire progression.

I created this new map by rotating the inner ring of notes to a different position, so that D was aligned with A, C was aligned with G, and so on.  The new map that I created is given below:

The arrows on the map indicate how I use it to move from chord to chord.  Let’s say I start with a D chord.  The black arrow indicates that next an A chord will be played.  The grey arrow shows that I next move counterclockwise to the second pair of chord roots, beginning with the inner ring (playing a C chord) and then moving to the outer ring (playing a G chord).  I continue this pattern moving around the map, eventually returning to where I started, at the ‘D’ location of the inner ring.

One example of following this pattern is provided in the score below.  This particular example plays major seventh chords at each map position, which has (to my ear at least) a pleasing, jazzy sound.  The score uses ‘closed form chords’, which involve pressing a finger down on each ukulele string.  So playing this score is an exercise in moving a closed form shape up and down the length of the fretboard.  The Cmaj7 chord is formed at the very top of the fretboard, while the Bmaj7 is formed with the index finger barred across the 11th fret near the fretboard’s bottom.  So, by following the new map one can perform a progression of chords that 1) uses each of the 12 possible roots in Western music, and 2) does so by covering the majority of the fretboard’s geometry.


The score above offers just a hint of the potential for using the map.  Simple variations of the score involve replacing the major seventh chords with some other closed forms, such as the minor seventh (or major sixth), the dominant seventh, or the major.  Of course, one could then use different chord types at different points in the score.

Another approach to varying the sound of the progression would be to follow a different route on the map – for instance going from the inner ring to the outer ring for the first pair of chords, but then going from the outer ring to the inner ring for the following pair of chords.

Another interesting approach would be to follow the same paths that are illustrated above, but to rotate the inner ring to a different position inside the outer one.  For example, one clockwise twist of the inner ring would line up the D with the B, the C with the A, and so on.  Changing the position of the inner ring would change the musical distance between successive chords, and as a result change the musicality of the progression.

Monday, May 25, 2015

Coda: Our New Music

As described in this previous post, the  text below is a draft of one of several "interludes" to be included in a book that I am working on concerned with music and artificial neural networks.  This particular post is the Coda for the book; the interlude that comes at the end of the main text.
 

Figure C-1. Four key notes for the song “How Dry I Am” used by Bernstein to illustrate the infinite variety of music.
 
The tonality of Western music arises from its exclusive use of twelve pitch-classes.  In spite of being constrained by this sparse set of basic musical elements, composer Leonard Bernstein argues that Western music is infinite in its variety (Bernstein, 1966).  He observes that if one considers the twelve pitch-classes in a single range, and computes their possible melodic combinations, the result is 1,302,061,344.  If one extends this approach to consider both melodic and harmonic combinations of these elements the result is 127 googols, where a googol is a digit followed by 100 zeroes.  “The realm of music is an infinity into which the composer’s mind goes wandering” (Bernstein, 1966, p. 34).

Bernstein (1966) explores this theme with a particular example, the four note melody that starts the song “How Dry I Am”.  These four notes are provided in Figure C-1.  He notes the importance of this pattern, and the variations of musical effects that it can produce, by noting its presence in a huge range of compositions that begins with a French folk song and ends with the final movement of Shostakovich’s Fifth Symphony.  Bernstein ends his discussion by proposing a variation of Figure C-1 that depicts “a motto of man’s infinite variety” (Bernstein, 1966, pp. 46-47).

Early in this book we saw another example of variety from small numbers of elements.  The musical signal composed by John Williams for Steven Spielberg’s 1977 movie Close Encounters of the Third Kind (Figure O-1) was selected from a sample of 350 five-note compositions created by Williams.  Had Williams composed all possible five-note melodies the movie’s signal would have been selected from among about 134,000 possibilities.  The calculation of possibilities is conservative because it fails to take into account rhythmic variations; not all of the notes in Williams’ signal have the same duration.

The infinite possibilities of Western tonal music are reflected in music’s constant evolution.  American composer Aaron Copland wrote Our New Music (Copland, 1941) to explain the circumstances that had led to modern classical music.  His goal was to alleviate his readers’ bewilderment with modern music.  “Being unaware of the separate steps that brought about these revolutionary changes, they are naturally at a loss to understand the end result” (Copland, 1941, p. v).  He traced modern music’s development as a move away from a century of Germanic musical influences.  This move begins with explorations of folk music in the late 19th century, proceeds through explorations of new views of harmony, rhythm, and tonality.  Copland argues that it ends by coming full circle, in Stravinsky’s compositions of the late 1920s and early 1930s, and returning to melodic forms from the 18th century.

The infinite possibilities of Western tonal music make it nearly impossible to predict its future too.  In the early 1940s one could analyze existing modern music and describe a neoclassicism that had roots in the 18th century (Copland, 1941).  However, Copland’s analysis of modern American music does not even hint of the radical developments that would flourish there beginning in the 1960s with, for example, the invention of mimimalism (Glass, 1987; Griffiths, 1994, 1995; Hartog, 1957; Nyman, 1999; Pleasants, 1955; Potter, 2000; Reich, 1974, 2002).

Western tonal music has infinite variety and unpredictability.  However, it is neither accidental nor unsystematic.  When a composer’s mind goes wandering into the infinite musical realm, it does not randomly move from one musical entity to another.  Its search through this realm is guided by new ideas concerning musical structure – new notions of melody, harmony, rhythm and the like – in short, new music theory.  Rather than being “dusty abstract rules of form and harmonic structure” (Bernstein, 1966, p. 24), music theory itself seems both vast and dynamic.  When violent upheaval is heard in classical music, its root cause must be changing conceptions of music’s structure.

Does musical theory itself exhibit infinite variety?  I have no idea.  However, historical examinations reveal enormous changes in basic ideas, such as whether different inversions of a chord are the same chord, or what is the root note of a major or minor triad (Damschroder, 2008; Rehding, 2003; Riemann, 1895).  We saw in Chapter 1 that the psychophysical study of music that began in the late 19th century faced the tension between the physics of sound and individual differences in aesthetics that permitted just intonation to be replaced by equal temperament (Hui, 2013).

As well, evolving notions of consonance have permitted new musical intervals to become accepted in music.  The dissonance of the flattened seventh note led Helmholtz to reject its use in his advice to composers (Helmholtz & Ellis, 1863/1954); now it is definitive to the blues and plays a central role in Gershwin’s classic Rhapsody In Blue (Adams, 2008).  Later, seasoned jazz musicians who were completely comfortable with the flattened seventh were jarred and puzzled by the flattened fifth interval when it was introduced to jazz via bebop (Kelley, 2009).

Clearly there is no single, unified theory of music.  A multitude of music theories have existed; many different theories can exist at the same time; new theories can be invented or discovered.  One approach to composing innovative music involves taking a new musical theory an examining the compositions that it can pick out of the infinite realm of music.  Where might one find a new musical theory to exploit in this fashion?

There are many, many possible answers to this question.  One reading of the current book suggests one: train an artificial neural network to map some musical inputs to some other musical outputs.  The kind of training that we have seen in preceding chapters informs networks about their progress, but does not inform them how to construct the mapping.  As a result, these networks can discover new musical regularities or ideas for performing the mapping.  We have seen many instances of this in the current book, even when networks are trained on basic, traditional musical tasks.

Crucially, for a network to deliver a new musical theory its internal structure must be explored.  Artificial neural networks can only inform the study of music if we first reject the romanticism that characterizes much of connectionist cognitive science.

 
References