Professional Documents
Culture Documents
269
ISMIR 2008 – Session 2d – Social and Music Networks
algorithms based on user listening habits (e.g. Last.fm 4 ). successfully applied to music similarity and genre classifi-
The Myspace artist network is unique in that the edges - cation tasks [18, 16, 3, 10]. A common approach for com-
the “friend” connections - are specified by the artists them- puting timbre-based similarity between two songs or col-
selves. This makes the Myspace artist network a true social lections of songs creates Gaussian mixtures models (GMM)
network. It has been shown that significantly different net- describing the MFCCs and comparing the GMMs using a
work topologies result from different approaches to artist statistical distance measure. Often the earth mover’s dis-
network construction [4]. Since the Myspace artist network tance (EMD), a technique first used in computer vision, is
is of unique construction - owing its structure to the deci- the distance measure used for this purpose [21]. The EMD
sions and interactions of millions of individuals - we are algorithm finds the minimum work required to transform
motivated to analyze its topology and explore how this net- one distribution into another. We use a set of inter-artist
work structure relates to music. EMD values as a means of enhancing our community detec-
It should be noted that networks of music listeners and bi- tion methods as described in Section 3.2.3.
partite networks of listeners and artists have also been stud-
ied [2, 13]. While such studies are highly interesting in the 3 METHODOLOGY
context of music recommendation, and while the Myspace
network could potentially provide interesting data on net- We will review our methodology beginning with a descrip-
works of listeners, we restrict our current investigation to tion of our network sampling method in Section 3.1. We
the Myspace artist network. then describe the various community detection approaches
Previous analysis of the Myspace social network (includ- applied to the network in Section 3.2 and how we incorpo-
ing artists and non-artists) suggests that it conforms in many rate audio-based measures. Finally, we describe our metric
respects to the topologies commonly reported in social net- for evaluating the relevance of the Myspace artist network
works - having a power-law degree distribution and a small structure with respect to musical genre in Section 3.3.
average distance between nodes [1]. Previous analysis of
the Myspace artist network sample used in this work shows
a multi-scaling degree distribution, a small average distance 3.1 Sampling Myspace
between nodes, and strong assortative mixing with respect The Myspace social network presents a variety of challenges.
to genre [11]. For one, the massive size prohibits analyzing the graph in its
entirety, even when considering only the artist pages. There-
2.3 Community Detection fore we sample a small yet sufficiently large portion of the
network as described in section 3.1.2. Also, the Myspace so-
Recently, there has been a significant amount of interest in cial network is filled with noisy data - plagued by spammers
algorithms for detecting community structures in networks. and orphaned accounts. We limit the scope of our sampling
These algorithms are meant to find dense subgraphs (com- in a way that minimizes this noise.
munities) in a larger sparse graph. More formally, the goal is
to find a partition P = {C1 , . . . , Cc } of the nodes in graph 3.1.1 Artist Pages
G such that the proportion of edges inside Ck is high com-
pared to the proportion of edges between Ck and other par- It is important to note we are only concerned with a subset
titions. of the Myspace social network - the Myspace artist network.
Because our network sample is moderately large, we re- Myspace artist pages are different from standard Myspace
strict our analysis to use more scalable community detec- pages in that they include a distinct audio player application.
tion algorithms. We make use of the greedy modularity op- We use the presence or absence of this player to determine
timization algorithm [6] and the walktrap algorithm [20]. whether or not a given page is an artist page.
These algorithms are described in detail in Section 3.2. A Myspace page will always include a top friends list.
This is a hyperlinked list of other Myspace accounts ex-
plicitly specified by the user. The top friends list is lim-
2.4 Signal-based Music Analysis
ited in length with a maximum length of 40 friends (the
A variety of methods have been developed for signal-based default length is 16 friends). In constructing our sampled
music analysis, characterizing a music signal by its timbre, artist network, we use the top friends list to create a set of
harmony, rhythm, or structure. One of the most widely used directed edges between artists. Only top friends who also
methods is the application of Mel-frequency cepstral coeffi- have artist pages are added to the sampled network; stan-
cients (MFCC) to the modeling of timbre [15]. In combina- dard Myspace pages are ignored. We also ignore the re-
tion with various statistical techniques, MFCCs have been mainder of the friends list (i.e. friends that are not specified
by the user as top friends), assuming these relationships are
4 http://last.fm not as relevant. This reduces the amount of noise in the
270
ISMIR 2008 – Session 2d – Social and Music Networks
sampled network but also artificially limits the outdegree of 3.2.1 Greedy Modularity Optimization
each node. This approach is based on the assumption that
Modularity is a network property that measures the appro-
artists specified as top friends have some meaningful musi-
priateness of a network division with respect to network
cal connection for the user – whether through collaboration,
structure. Modularity can be defined in several different
stylistic similarity, friendship, or artistic influence.
ways [7]. In general, modularity Q is defined as the number
Each Myspace artist page includes between zero and three
of edges within communities minus the expected number of
genre tags. The artist selects from a list of 119 genres spec-
such edges. Let Aij be an element of the network’s adja-
ified by Myspace. We include this information in our data
cency matrix and suppose the nodes are divided into com-
set.
munities such that node i belongs to community Ci . We
The audio files associated with each artist page in the
define modularity Q as the fraction of edges within commu-
sampled network are also collected for feature extraction as
nities minus the expected value of the same quantity for a
described in Section 3.2.3.
random network. Then Q can be calculated as follows:
0 1
3.1.2 Snowball Sampling 1 di d j
Q= Aij − δ C i Cj (2)
2m ij 2m
For the Myspace artist network, snowball sampling is the
most appropriate method [1]. Alternative methods such as where the δCi Cj function is 1 if Ci = Cj and 0 otherwise, m
random edge sampling and random node sampling would is the number of edges in the graph, and di is the degree of
result in many small disconnected components and not pro- node i - that is, the number of edges incident on node i. The
vide any insight to the structure of the entire network [14]. sum of the term 2m
di dj
over all node pairs in a community
In snowball sampling, a first seed node (artist page) is in- represents the expected fraction of edges within that com-
cluded in the sample. Then the seed node’s neighbors (top munity in an equivalent random network where node degree
friends) are included in the sample. Then the neighbors’ values are preserved.
neighbors. This breadth-first sampling is continued until a If we consider Q to be a benefit function we wish to max-
particular sampling ratio is achieved. We randomly select imize, we can then use an agglomerative approach to detect
one seed node 5 and perform 6 levels of sampling - such communities - starting with a community for each node such
that in an undirected view of the network, no artist can have that the number of partitions |P| = n and building com-
a geodesic distance greater than 6 with respect to the seed munities by amalgamation. The algorithm is greedy, find-
artist - to collect 15,478 nodes. If the size of the Myspace ing the changes in Q that would result from the merge of
artist network is around 7 million, then this is close to the each pair of communities, choosing the merge that results
0.25% sampling ratio suggested in [12]. in the largest increase of Q, and then performing the corre-
sponding community merge. It can be proven that if no com-
3.1.3 Conversion to Undirected Graph munity merge will increase Q the algorithm can be stopped
because no further modularity optimization is possible [6].
With the sampling method described above, the edges in our Using efficient data structures based on sparse matrices, this
Myspace artist network are directional. If j is a top friend algorithm can be performed in time O(m log n).
of i, this does not mean i is a top friend of j ((i, j) = (j, i)).
However, many community detection algorithms operate on
undirected graphs where (i, j) = (j, i). For this reason we 3.2.2 Random Walk: Walktrap
convert our directed graph to an undirected graph. Where a The walktrap algorithm uses random walks on G to iden-
single directed edge exists it becomes undirected and where tify communities. Because communities are more densely
a reflexive pair of directed edges exist a single undirected connected, a random walk will tend to be ‘trapped’ inside a
edge replaces both edges. This process reduces the edge community - hence the name “walktrap”.
count from 120, 487 to 91, 326. At each time step in the random walk, the walker is at a
node and moves to another node chosen randomly and uni-
3.2 Community Detection formly from its neighbors. The sequence of visited nodes
is a Markov chain where the states are the nodes of G. At
We apply two community detection algorithms to our net- each step the transition probability from node i to node j is
work sample - the greedy optimization of modularity [6] A
Pij = diji which is an element of the transition matrix P
and the walktrap algorithm [20]. Both of these algorithms for the random walk. We can also write P = D−1 A where
are reasonably efficient and both algorithms can be easily D is the diagonal matrix of the degrees (∀i, Dii = di and
adapted to incorporate audio-based similarity measures. Dij = 0 where i = j).
5our randomly selected artist is French rapper Karna Zoo http:// The random walk process is driven by powers of P : the
www.myspace.com/karnazoo probability of going from i to j in a random walk of length
271
ISMIR 2008 – Session 2d – Social and Music Networks
t is (P t )ij which we will denote simply as Pijt . All of the For the audio analysis, MFCCs are extracted resulting
transition probabilities related to node i are contained in the in 100ms non-overlapping frames. For each artist node a
ith row of P t denoted as Pi• t
. We then define an inter-node GMM is built from the concatenation of MFCC frames for
distance measure: all songs found on each artist’s Myspace page (generally be-
tween 1 and 4 songs although some artists have more). For
n
(Pik t − P t )2
each non-zero value in the adjacency matrix Aij a dissim-
rij =
1 1
= D− 2 Pi• − D− 2 Pj•
jk t t
(3) ilarity value is calculated using the earth mover’s distance
dk
k=1
λij between the GMMs corresponding to nodes i and j.
where . is the Euclidean norm of n . This distance can These dissimilarity values must be converted to similarity
also be generalized as a distance between communities: rCi Cj values to be successfully applied to the community detection
or as a distance between a community and a node: rCi j . algorithms. This is achieved by taking the reciprocal of each
We then use this distance measure in our algorithm. Again, dissimilarity.
the algorithm uses an agglomerative approach, beginning −1
λij if nodes i and j are connected,
with one partition for each node (|P| = n). We first com- Aij = (7)
pute the distances for all adjacent communities (or nodes in 0 otherwise.
the first step). At each step k, two communities are chosen
based on the minimization of the mean σk of the squared 3.3 Genre Entropy
distances between each node and its community. Now that we have several methods for detecting commu-
1 2 nity structures in our network, we need a means of evaluat-
σk = riCi (4) ing the relevance of these structures in the context of music.
n
Ci ∈Pk i∈Ci Traditionally, music and music artists are classified in terms
Direct calculation of this quantity is known to be NP-hard, of genre. If the structure of the Myspace artist network is
so instead we calculate the variations Δσk . Because the al- relevant to music, we would expect the communities identi-
gorithm uses a Euclidean distance, we can efficiently calcu- fied within the network to be correlated with musical genres.
late these variations as That is, communities should contain nodes with a more ho-
mogenous set of genre associations than the network as a
1 |C1 ||C2 | 2 whole.
Δσ(C1 , C2 ) = r (5)
n |C1 | + |C2 | C1 C2 As mentioned in Section 3.1, we have collected genre
tags that are associated with each artist. In order to measure
The community merge that results in the lowest Δσ is per-
the diversity of each community with respect to genre we
formed. We then update our transition probability matrix
use a variant of Shannon entropy we call genre entropy S.
t
|C1 |PCt 1 • + |C2 |PCt 2 • This approach is similar to that of Lambiotte [13]. For a
P(C 1 ∪C2 )•
= (6) given community Ck we calculate genre entropy as:
|C1 | + |C2 |
and repeat the process updating the values of r and Δσ then SC k = − Pγ|Ck log Pγ|Ck (8)
performing the next merge. After n−1 steps, we get one par- γ∈Ck
tition that includes all the nodes of the network Pn = {N }.
The algorithm creates a sequence of partitions (Pk )1≤k≤n . where Pγ|Ck is the probability of finding genre tag γ in com-
Finally, we use modularity to select the best partition of the munity Ck . As the diversity of genre tags in a community
network, calculating QPk for each partition and selecting Ck increases, the genre entropy SCk increases. As the genre
the partition that maximizes modularity. tags become more homogenous, the value of SCk decreases.
Because the value of t is generally low (we use t = 4), If community Ck is described entirely by one genre tag then
this community detection algorithm is quite scalable. For SCk = 0. We can calculate an overall genre entropy SG
most real-world networks, where the graph is sparse, this by including the entire network sample. In this way, we
algorithm runs in time O(n2 log n) [20]. can evaluate each community identified by comparing SCk
to SG . If the community structures in the network are re-
lated to musical genre, we would expect the communities
3.2.3 Audio-based Community Detection
to contain more homogenous mixtures of genre tags. That
Both algorithms described above are based on the adjacency is, in general, we would expect SCk ≤ SG . However, as
matrix A of the graph. This allows us to easily extend these community size decreases so will the genre entropy because
algorithms to include audio-based similarity measures. We fewer tags are available. To account for this, we create a ran-
simply insert an inter-node similarity value for each non- dom partitioning of the graph that results in the same num-
zero entry in A. We calculate these similarity values using ber of communities and calculate the corresponding genre
audio-based analysis. entropies Srand to provide a baseline.
272
ISMIR 2008 – Session 2d – Social and Music Networks
273
ISMIR 2008 – Session 2d – Social and Music Networks
data (i.e. for music recommendation). [7] L. F. Costa, F. A. Rodrigues, G. Travieso, and P. R. Vil-
las Boas. Characterization of complex networks: A sur-
6 CONCLUSIONS vey of measurements. Advances In Physics, 56:167,
2007.
We have presented an analysis of the community structures
[8] B. Fields, K. Jacobson, M. Casey, and M. Sandler. Do
found in a sample of the Myspace artist network and shown
you sound like your friends? exploring artist similarity
that these community structures are related to musical genre.
via artist social network relationships and audio signal
We have applied two efficient algorithms to the task of par-
processing. In Proc. of ICMC, August 2008.
titioning the Myspace artist network sample into communi-
ties and we have shown how to include audio-based similar- [9] P. Gleiser and L. Danon. Community structure in jazz.
ity measures in the community detection process. We have Advances in Complex Systems, 6:565, 2003.
evaluated our results in terms of genre entropy - a measure
of genre tag distributions - and shown the community struc- [10] K. Jacobson. A multifaceted approach to music similar-
tures in the Myspace artist network are related to musical ity. In Proc. of ISMIR, 2006.
genre.
[11] K. Jacobson and M. Sandler. Musically meaningful or
In future work we plan to examine community detection
just noise, an analysis of on-line artist networks. In Proc.
methods that operate locally, without knowledge of the en-
of CMMR, pages 306–314, 2008.
tire network. We also plan to address directed artist graph
analysis, bipartite networks of artists and listeners, different [12] H. Kwak, S. Han, Y. Ahn, S. Moon, and H. Jeong. Im-
audio analysis methods, and the application of these meth- pact of snowball sampling ratios on network characteris-
ods to music recommendation. tics estimation: A case study of cyworld. Technical Re-
port CS/TR-2006-262, KAIST, November 2006.
7 ACKNOWLEDGEMENTS
[13] R. Lambiotte and M. Ausloos. On the genre-fication of
Thanks to Zhijia Huang, Chris Sutton, Matthew Davies, Amelie music: a percolation approach (long version). The Euro-
Anglade and Yves Raimond for their input. This work is pean Physical Journal B, 50:183, 2006.
supported as a part of the OMRAS2 project, EPSRC num- [14] S. H. Lee, P. J. Kim, and H. Jeong. Statistical properties
bers EP/E02274X/1 and EP/E017614/1. of sampled networks. Physical Review E, 73:102–109,
January 2006.
8 REFERENCES
[15] B. Logan. Mel frequency cepstral coefficients for music
[1] Y. Ahn, S. Han, H. Kwak, S. Moon, and H. Jeong. Anal- modeling. In Proc. of ISMIR, 2000.
ysis of topological characteristics of huge online social
[16] B. Logan and A. Salomon. A music similarity function
networking services. In WWW ’07: Proceedings of the
based on signal analysis. Multimedia and Expo ICME,
16th international conference on World Wide Web, pages
pages 745–748, 2001.
835–844, New York, NY, USA, 2007. ACM.
[2] A. Anglade, M. Tiemann, and F. Vignoli. Virtual com- [17] M. E. J. Newman. The structure and function of complex
munities for creating shared music channels. In Proc. of networks. SIAM Review, 45:167, 2003.
ISMIR, pages 95–100, 2007. [18] E. Pampalk. Computational Models of Music Similar-
[3] A. Berenzweig, B. Logan, D. P. W. Ellis, and B. P. W. ity and their Application in Music Information Retrival.
Whitman. A large-scale evaluation of acoustic and sub- PhD thesis, Technischen Universität Wien, May 2006.
jective music-similarity measures. Computer Music J., [19] J. Park, O. Celma, M. Koppenberger, P. Cano, and J. M.
28(2):63–76, 2004. Buldu. The social network of contemporary popular mu-
[4] P. Cano, O. Celma, M. Koppenberger, and J. M. sicians. arXiv:physics/0609229, 2006.
Buldu. The topology of music recommendation net-
[20] P. Pons and M. Latapy. Computing communities in
works. arXiv.org:physics/0512266, 2005.
large networks using random walks (long version).
[5] O. Celma and P. Lamere. Music recommendation. IS- arXiv:physics/0512106v1, 2005.
MIR Tutorial, 2007.
[21] Y. Rubner, C. Tomasi, and L. J. Guibas. The earth
[6] A. Clauset, M. E. J. Newman, and C. Moore. Finding mover’s distance as a metric for image retrieval. Interna-
community structure in very large networks. Phys. Rev. tional Journal of Computer Vision, 40(2):99–121, 2000.
E, 70(6):066111, Dec 2004.
274