Sunday, March 29, 2015

Scale Tonics and Strange Circles

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.

Figure I-2. The pattern of weights from the input units of the scale tonic perceptron to one of its output units are presented at the top.  The bottom illustrates the two circles of major seconds.

An earlier interlude noted that interpretations of musical networks often reveal strange circles.  However, in many respects the interpretation of the weights of the scale tonic perceptron (a pattern like the upper part of Figure I-2) seems very conventional.  It was argued (using Figures 3-5 and 3-6) the weights in the upper part of Figure I-2 contains the pattern of musical intervals that defines a major scale as well as the pattern of musical intervals that defines a harmonic minor scale.

In this interlude, we discover that from another perspective the weights of the scale tonic perceptron also lead to strange circles.  An analysis of these weights reveals the presence of the two circles of major seconds that are presented in the bottom half of Figure I-2.

The tonal hierarchy (Krumhansl, 1990) discussed in Chapter 1 was a theory about the relationships between pitch-classes.  Krumhansl explored the structure of the tonal hierarchy using a statistical technique called multidimensional scaling or MDS (Kruskal & Wish, 1978).  MDS takes a matrix of similarity relationships between objects and creates a map.  In this map, each object is represented by a point at particular coordinates of the space.  The distance between a pair of points in the space indicates the similarity between two objects.  The closer the two points are, the higher is the similarity.  MDS attempts to build a map involving all of the objects, placing them at locations that provide the best fit to the raw similarity measures between them.

The scale tonic perceptron has twelve different output units, each representing a pitch-class.  Each of these units has its own pattern of weights between it and the twelve input units used to present scales to the network.  It stands to reason that if two different output units represent scale tonics that are related in some way, then they should have a similar pattern of connection weights.

One can use connection weights to compute a measure of similarity between two output units in this network.  Each output unit is a point in a twelve-dimensional space; its coordinates are given by its twelve connection weights.  The similarity between two output units is determined by measuring the distance between the two points in this twelve-dimensional space.  This can be done by computing the Euclidean distance between the coordinates of the two points.

A twelve-dimensional space is too large to understand; it would be better if a smaller space could be used to render the similarity relationships between the output units more easily understandable.  This is the purpose of MDS.

We provided the matrix of connection weights from the network to the statistical programming language R.  R converted this matrix into a matrix of distances between pairs of output units by computing Euclidean distances between twelve-dimensional coordinates.  R was then used to perform MDS on this distance data.  The best fitting solution to this data requires a six- or seven-dimensional space.  However, the first three dimensions of the MDS solution – which capture more structure in the distances than do later dimensions – reveal some very interesting structure.
Figure I-3.  The plot of the two-dimensional MDS analysis of the scale tonic perceptron weights.

 Figure I-3 presents the plot of the two-dimensional MDS of the scale tonic perceptron’s weights.  One obvious property of this graph is that the output unit pitch-classes are clearly organized into two different groups, one to the left of the dashed line in the middle of the plot and the other to its right.  An examination of these two groups indicates a striking musical property: all of the pitch-classes in one side of the plot belong to one of the circles of major seconds in Figure I-2, while those on the other side of the plot belong to the other circle of major seconds.

A better fit to data requires performing a higher dimensional MDS analysis.  Figure I-4 presents the three-dimensional analysis.  Note that the first two dimensions of this solution (provided by the x and y axes) pull the pitch-classes apart in terms of membership in the two circles of major seconds.  The position of the pitch-classes in the third dimension arranges them into patterns that are very suggestive of the two circles in Figure I-2, though the correspondence between the two figures is not perfect.

Figure I-4.  The plot of the three-dimensional MDS analysis of the scale tonic perceptron weights.

In summary, the pattern of connection weights that emerges in the scale tonic perceptron contains some interesting musical relationships that cannot be understood simply by inspecting a table of connection weights.  There is systematic structure that suggests that output units that represent tonics that belong to the same circle of major seconds are more similar to one another than to an output unit that represents a tonic that belongs to the other circle.  Furthermore, the closer two tonics are to one another in the same circle of major seconds, the more similar they are to one another.  In short, multivariate analyses of the scale tonic perceptron reveals that it uses strange circles to organize musical inputs.


No comments:

Post a Comment