Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Modelling Moral Traits with Music Listening
Preferences and Demographics
Vjosa Preniqi1 , Kyriaki Kalimeri2 , and Charalampos Saitis1
1

Centre for Digital Music, Queen Mary University of London, London UK
2
ISI Foundation, Turin, Italyv.preniqi@qmul.ac.uk

Abstract. Music has always been an integral part of our everyday lives throughwhich we express feelings, emotions, and concepts. Here, we explore the association between music genres, demographics and moral values employing datafrom an ad-hoc online survey and the Music Learning Histories Dataset. To further
characterise the music preferences of the participants the generalist/specialist(GS) score employed. We exploit both classification and regression approaches
to assess the predictive power of music preferences for the prediction of demographic attributes as well as the moral values of the participants. Our findings pointout that moral values are hard to predict (.62 AU ROCavg ) solely by the music
listening behaviours, while if basic sociodemographic information is provided
the prediction score rises to 4% on average (.66 AU ROCavg ), with the Purity
foundation to be the one that is steadily the one with the highest accuracy scores.
Similar results are obtained from the regression analysis. Finally, we provide
with insights on the most predictive music behaviours associated with each moral
value that can inform a wide range of applications from rehabilitation practices tocommunication campaign design.

1

Introduction

Music played a fundamental role in the evolution of societies being tightly related tocommunication, bonding, and cultural identity development [14]. Influencing a wide
range of cognitive functions such as reasoning, problem-solving, creativity, and mental
flexibility [17], musical taste is also known to be strongly related to personality [7] andpolitical orientation [6]. Musical sophistication is also shown to be related to personality
traits regardless of demographics or musicianship level [10].
More recently, scientists aside from the traditional self-reported surveys [6], employed digital data and in particular online music streaming [2] and social media [20]data to assess music preferences. Employing data from the myPersonality Facebook
project, Nave et al. [20], found that both people’s reactions to unfamiliar music samples
and “likes” for music artists predicted personality traits. Krismayer et al. [13] studied theLast.fm platform showing that the music listening behaviours can predict demographics,
including age, gender, and nationality. More recently, Anderson et al. [2] presented
evidence about the connection between personalities and music listening preferences
studying Spotify music streaming data.

67

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Building on comparable interactionist theories, we set to explore the less attended
relation between moral values and music preferences. We operationalise morality according to the Moral Foundations Theory (MFT) [9], which defines five moral traits,
namely Care/Harm, Fairness/Cheating, Loyalty/Betrayal, Authority/Subversion, andPurity/Degradation. These can further collapse into two superior moral foundations: of
Individualising, compounded by fairness and care, that asserts that the basic constructsof society are the individuals and hence focuses on their protection and fair treatment,
and of Binding, that summarises purity, authority and loyalty, and is based on the respectof leadership and traditions.
Moral values are considered to be higher psychological constructs than the morecommonly investigated personality traits yet they have attracted less attention frommusic scientists. In recent literature there are indications that negative emotions enforcedby types of music can worsen moral judgement [3] although that study did not rely on a
psychometrically validated theory like the MFT. Kalimeri et al. [12] demonstrated thepredictability of moral foundations from a variety of digital data including smartphone
usage and web browsing. Their results showed that moral traits and human values areindeed complex, and thus harder to predict compared to demographics, nevertheless, they
provide a realistic dimension of the possibilities of modelling moral traits for delivering
better targeted and more effective interventions.
Here, we train classification and regression models which infer on self-reported
survey data regarding the music preferences. We thoroughly assess the rapresentativityof our data, not only in terms of sociodemographic attributes but also from music behavioural patterns comparing against the open access dataset of music learning histories
dataset (MLHD). Our results show that moral values are indeed predictable from music
preference information and in line with the findings of the related literature. Further, we
discuss the most predictive music behaviours, contributing to an in-depth understandingof the moral profiles. Such insights are fundamental to the broader picture since moral
values are a key element in the decision making process on several societal issues [11,?]. Modelling moral values from music represents a great opportunity for improving
recommendation systems; designing online streaming applications with user well-being
in focus [18]; increasing engagement to communication campaigns for social good
applications.

2

Data Collection and Feature Engineering

Here, we employ data from a third-party survey administered online for a general scopemarketing project. The survey consists of 2,003 participants (51% females) from 12
different regions in Canada. The participants filled in, among other items, information
about basic demographic attributes, including age, gender, education, and political views.
They also completed the validated Moral Foundations questionnaire [9], while statedtheir preferences on 13 music genres (on a 5-point Likert scale where 1 = strongly dislike
and 5 = strongly like). The considered music genres were: alternative pop/rock, christian,classical, country, folk, heavy metal, rap/hip-hop, jazz, latin, pop, punk, R&B, and rock.
These genres were set from the survey creators and were not further described to the
respondents. Even so, they are commonly used to define general musical tastes among68

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Table 1. Summary of the survey dataset (cleaned) with major demographic attributes utilised forthis research work.
Attributes

Demographics

Sample size
(N = 1062)

Age

18-24
25-34
35-44
45-54
55-64
65+

80 (7.5%)
154 (14.5%)
205 (19.3%)
205 (21.9%)
187 (17.6%)
203 (19.1%)

GenderMale
Female474 (44.6%)
588 (55.3%)

EducationLess than High School
High school graduate
Some College
Trade or professional school
College Graduate
Post Graduate work or degree

35 (3.2%)
195 (18.3%)
154 (14.5%)
115 (10.8%)349 (32.8%)
205 (19.3%))

Political Party

Conservative
Liberal
NDI (New Democratic Party)
Green Party
Party Quebecois
I don’t vote328 (30.8%)279 (26.2%)
184 (17.3%)
66 (6.2%)
56 (5.2%)
149 (14%)

non-musician respondents. To justify these genres and observe if there is any affiliation
between survey reported preferences and digital music listening patterns, we explored
digital data of 1062 Canadian listeners extracted from the Music Learning Histories
Dataset (MLHD) [22] with a similar age and gender distribution to our survey.
Moving on to our survey data, to make sure that participants were paying attention
to the survey questions, two “catch questions” were included, which we later used tofilter the data. After excluding these users we were left with 1,062 participants (55%females), a sample size substantially higher than previous survey-based studies [7, 6].
Table 1 summarises the demographic features of our dataset.
We then applied a factor analysis using principal axis factoring with promax rotation
to identify the major dimensions of participants’ music preferences. A 5-factor solution
was retained, which explained 67% of total data variance: {jazz, classical, latin}, {punk,
heavy metal, rap/hip-hop}, {pop, R&B}, {country, Christian, folk}, and {rock, alternative pop/rock} (genres ordered by decreasing factor loading). These factors are in linewith the ones obtained in related studies [7].
To quantify the respondents’ diversity in music preferences, we employed an adapted
version of the generalist-specialist (GS) score, inspired by the work of Anderson et al.
[1]. The projections of the 13 genres onto the five factors were considered as that genre’s
vector representation in the “preference space”. Intuitively, generalists versus specialists

69Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Table 2. Detailed list of the experiments we performed with the list of features employed as
predictors in each one of them.
ID

Features Employed as Predictors

EX1
EX2
EX3
EX4
EX5
EX6

13 Music Genres
5 factors
GS score
13 Music Genres, Age, Gender13 Music Genres, Age, Gender, Education
13 Music Genres, Age, Gender, Education, Political Views

will have genre vectors spread apart versus close together in the preference space. We−→
calculate the user centroid cti of genre vectors representing the loadings of genres on the→−
5 factors lj , weighted by the number of genre scores rated by each respondent wj . The
GS score is the cosine similarity between a genre vector and the preference-weighted
average of a users’ genre vectors:
→ −
−
→

 −
→
1
1
lj · cti
−
→
·
wj −
·
w j ljGS(ui ) = ,
cti = →−→wjwj lj ·  cti 

3Experiments and Results

Exploratory Analysis. As a first step we assess the correlation between musical genres’preferences, demographics, political views and moral traits. We observed a positive
Spearman correlation of age with Christian music, classical, country and folk music
genres (ρs = {0.18, 0.21, 0.20, 0.25}), while heavy metal, hip-hop/rap and punkwere more preferred by younger ages, whereas older people expressed their dislike
towards these genres (ρs = {-0.22, −0.38, −0.38 }). Education was positively relatedwith classical music, jazz and latin music (ρs = {0.22, 0.13, 0.13}), indicating thatpeople with higher education preferred these genres. Loyalty, authority and purity werepositively correlated with Christian music (ρs = {0.18, 26, 38}) and country music(ρs = {0.17, 20, 21}). Looking at the political views of the respondents, conservatives
were positively correlated with Christian genre and country (ρs = {0.12, 0.12}) andnegatively correlated to hip-hop/rap and punk (ρs = {-0.17, −0.15}).
Further, we assessed whether the obtained self-reported responses of the questionnaire are in line with digital music listening data. From the MLHD dataset [22] we
extracted artists’ genres using MusicBrainz identifiers. From the survey data we discerned that the top 10 most preferred genres were: rock, pop, alternative pop-rock,classical, r&b, country, jazz, folk, latin, and hip-hop/rap. Similar trends were encountered in the music listening histories of Canadian users in MLHD where the 10 mostfrequently listened genres were: rock, alternative rock, pop-rock, pop, electronic, folk,
punk, jazz, heavy metal, and hip-hop.
Moral Values Classification. Our main research question is whether we can predict
peoples’ moral values from their music preferences. To answer this question, we postulate

70Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Table 3. Moral traits classification with XGBoost, average weighted AUROC and standard deviation over 5-fold cross-validation (baseline is .50).

CareFairness
Authority
PurityLoyalty
Individ.
Binding

EX1

EX2

EX3

.57 (3.7).56 (2.9).63 (0.8).69 (2.8).61 (2.4).55 (3.5).67 (2.4).54 (2.1).52 (1.1).60 (1.1).65 (3.0).56 (1.9).51 (0.8).63 (2.2).52 (1.5).48 (2.7).49 (1.7).57 (2.3).48 (3.1).50 (1.6).52 (1.9)

Table 4. Moral traits classification with XGBoost for different predictors (see Table 2 where
they are defined). Models evaluated based on AUROC and standard deviation over 5-fold crossvalidation (baseline is 50).

Care
Fairness
Authority
PurityLoyalty
Individ.
Binding

EX1

EX4

EX5

EX6

.57 (3.7).56 (2.9).63 (0.8).69 (2.8).61 (2.4).55 (3.5).67 (2.4).62 (3.2).58 (2.5).64 (1.6).71 (3.0).67 (3.5).59 (2.4).71 (3.2).62 (3.0).57 (2.3).65 (2.0).71 (1.4).66 (2.2).59 (3.3).70 (2.2).63 (2.3).62 (4.3).66 (1.6).71 (1.6).66 (2.9).61 (1.8).72 (2.9)

the task as a supervised classification one, developing a series of experiments to assess
the predictive power of different variables (see Table 2). We assign the class label “high”
to individuals with moral scores higher than the population median for the specificfoundation, and “low”, otherwise. We perform 5-fold cross-validation on shuffled data
(to avoid dependencies in successive data points), with 70% of training and 30% testing
data. We opt for the gradient boosting algorithm XGBoost (XGB) as it performed better
than Random Forest (RF) and Support Vector Machine (SVM) in this task.
To take into account the effect of unbalanced class labels in the performance metric, we evaluate our models with the area under the receiver operating characteristic(AUROC) metric which is a performance measure for binary classifiers that employs
a discrimination threshold to differentiate between a high and a low class [12]. The
best model is then chosen as the one that maximized the weighted area under receiver
operating characteristic (AUROC) statistic.
Initially, we compared the predictive power of the genre information against thefeatures engineered by us (EX1, EX2, and EX3). We trained one model per moral
foundation, and we present the cross validated results in Table 3. We notice that the
information obtained directly about the music preferences (EX1) outperforms the features
we developed. When comparing the scenarios, we observe that the 5 factors, and the GSscore accounting only for part of the variance in the data, did not manage to outperformthe explicit information on music preferences. A question that emerges naturally, is

71

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Fig. 1. Feature contributions (via SHAP values). The higher the SHAP value, the more thefeature contributes to the moral prediction.
.

whether including knowledge regarding the participants’ basic demographic features(i.e. age, political views, education level) will improve the prediction of their moral
values. Table 4 summarises the results when age, gender, education and political views
are incorporated in the design. As expected, the more information we have about theparticipants the more precise our predictions become, however, the improvement isminimum. This shows us the importance of music behaviours alone in explaining thevariability of our moral values.
Further, we employed SHAP (SHapley Additive exPlanations), a game theory approach developed to explain the contribution of each feature to the final output of any
machine learning model [15]. SHAP values provide both global and local interpretability,
meaning that we can assess both how much each predictor and each observation, respectively, contribute to the performance of the classifier. SHAP’s output helps to understandthe general behaviour of our model by assessing the impact of each input feature in the
final decision, thus enhancing the usefulness of our framework (Figure 1).
Moral Values Regression. Data binning is a common way to aggregate information andfacilitate the classification tasks. However, there are known issues to dichotomisationof variables which often lead to misleading results [16]. Here, to ensure that the most
predictive features as emerged from the classification process are indeed descriptive of
the respective moral trait, we conducted a regression analysis. At this point, the aim is tounderstand whether we can estimate the original moral scores (predicting the quantity)
based on our explanatory variables in disposition (i.e., music genres ad demographics).
To do so, we trained an XGBoost Regressor for each moral foundation. We maintained the same experimental designs and settings as in the classification task. For

72

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Table 5. Mean Absolute Error (MAE) and standard deviation over 5-fold cross-validation for
XGBoost regression on music preference features (see Table 2).
EX1

EX2

EX3

Care
Fairness
Authority
PurityLoyalty

3.86 (13.2)
3.27 (11.1)
4.19 (23.3)
4.86 (19.7)
4.46 (12.1)

3.72 (10.9)
3.28 (9.6)
4.20 (16.7)
4.99 (25.0)
4.33 (19.4)

3.89 (7.0)
3.55 (8.7)
4.47 (13.9)
5.35 (21.0)
4.64 (11.6)

Individ.
Binding

3.23 (9.5)
3.86 (15.1)

3.17 (8.5)
3.79 (6.3)

3.35 (9.9)
4.22 (18.5)

Table 6. Mean Absolute Error (MAE) and standard deviation over 5-fold cross-validation for
XGBoost regression on music preference and demographic features (see Table 2).
EX1

EX4

EX5

EX6

Care
Fairness
Authority
PurityLoyalty

3.86 (13.2)
3.27 (11.1)
4.19 (23.3)
4.86 (19.7)
4.46 (12.1)

3.72 (6.2)
3.25 (8.2)
4.14 (15.9)
4.86 (20.4)
4.19 (22.8)

3.71 (9.3)
3.19 (10.5)
4.10 (9.3)
4.74 (18.9)
4.20 (18.7)

3.60 (8.0)
3.12 (13.4)
4.09 (11.0)
4.71 (15.8)
4.21 (18.7)

Individ.
Binding

3.23 (9.5)
3.86 (15.1)

3.17 (14.4)
3.80 (11.0)

3.17 (8.0)
3.76 (13.1)

3.0 (8.9)
3.74 (5.4)

evaluation, we used Mean Absolute Error (MAE). These options allow for a directcomparison of the most predictive features with the ones emerged from the classification
task (Table 5). We noticed that as in the classification task, when adding information to
the models the MAE decreases indicating that the model fits the data better. Also in thiscase the gain of adding more information is relatively small with respect to the music
genres alone.
We visualised the most predictive features using again the Shap values (see Figure 2).
Interestingly, the christian music genre appears again as the most important predictor forboth the Binding and Individualising traits. The feature importance for the output of the
XGboost regressor, is in line with the feature significance obtained with the classification
approach. The same holds for all the moral foundations which are not depicted here for
spacing issues.

4

Discussions and Conclusions

Henry Wadsworth Longfellow wrote, “Music is the universal language of mankind.”Contemporary research has found converging evidence that people listen to music thatreflects their psychological traits and needs and help express emotions, cultures, values
and personalities. In this paper, we analysed the less explored links between musicalpreferences, demographics (age, gender, political views, and education level) and Moral73

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

Fig. 2. Features with the most impact on the XGBoost regression model output.

Foundations (MFT [9]). We applied both classification and regression models for moral
traits prediction. From classification results, it was inferred that MFT Binding was best
predicted with AUROC score 72%, whereas MFT individualising showed weaker resultswith AUROC score 61%. While, for the regression task the lowest MAE was 3.0 for
the Individualising and 3.74 for Social Binding. In both approaches, the most impactful
features on inferring morality were christian music and age.
Moral foundations are strongly tied to political views; despite that, the musical features are more predictive than political leanings. Social binding is related to conservative
political views [8] - and in fact is predicted by christian, and country music. We noticethat people naturally express their moral values through the music they listen to. We
instinctively categorize objects, symbols, but also people, creating a notion of social
identity. According to the social identity theory members of a group will seek to findnegative aspects to other groups thus enhancing their self-image [21]. Such reasoningreflects on a broad range of attitudes related to stereotype formations [19] but also as
we notice here to musical preferences. For instance, people higher in social binding
foundations tend to listen to country music which often expresses notions of patriotism.
Christian music is also a predictor of this superior foundation, which again fosters thenotion of belonging to a group. Across all experiments, Christian music emerged as themost predictive genre. On the other hand, genres such as punk, and hip hop are known
to challenge the traditional values and the status quo, hence are preferred by people whostrongly value these aspects. Our findings suggest that musical preferences are quite
informative of deeper psychological attributes; still there is space for improvement. For
instance, we noticed that the care, fairness, and loyalty foundations are harder to predict.
To this end we aim to explore musical content analysis, for instance, incorporating74

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

linguistic cues, and the moral valence scores as proposed by Araque et al. [4, 5] on lyrics
to further improve the performance.
In future work we aim to delve deeper into the relation between music and morality,and between music and other universal human values, by using passively collected digitaltraits of music listening behaviours outside a laboratory setting and over a period of time[2], while using self-reported surveys as a solid groundtruth. We will further investigate
the association between music listening preferences other psychological aspects suchas human values and emotions. Developing data-informed models will help unlock thepotential of personalised, uniquely tailored digital music experiences and communication
strategies [12, 1]. Predicting the moral values from listening behaviours can provide
noninvasive insights on the values or other psychological aspects of populations at alarge scale.

5

Acknowledgements

This work was supported by the QMUL Centre for Doctoral Training in Data-informed
Audience-centric Media Engineering (2021–2025) as part of a PhD studentship awarded
to VP. KK acknowledges support from the “Lagrange Project” of the ISI Foundation,funded by the CRT Foundation. We would like to thank Dr. Robert Raleigh for providing
the survey data, and the two anonymous reviewers for their thoughtful comments.

References
1. Anderson, A., Maystre, L., Anderson, I., Mehrotra, R., Lalmas, M.: Algorithmic effects on
the diversity of consumption on spotify. In: Proc. Web Conf. 2020. pp. 2155–2165 (2020)
2. Anderson, I., Gil, S., Gibson, C., Wolf, S., Shapiro, W., Semerci, O., Greenberg, D.M.: “justthe way you are”: Linking music listening on spotify and personality. Soc. Psychol. Personal.
Sci. 12(4), 561–572 (2021)
3. Ansani, A., D’Errico, F., Poggi, I.: ‘you will be judged by the music i hear’: A study on theinfluence of music on moral judgement. In: Web Intel. vol. 17, pp. 53–62 (2019)
4. Araque, O., Gatti, L., Kalimeri, K.: Moralstrength: Exploiting a moral lexicon and embedding
similarity for moral foundations prediction. Knowl. Based Syst. 191, 105184 (2020)
5. Araque, O., Gatti, L., Kalimeri, K.: The language of liberty: A preliminary study. In: Companion Proc. Web Conf. 2021. pp. 623–626 (2021)
6. Devenport, S.P., North, A.C.: Predicting musical taste: Relationships with personality aspects
and political orientation. Psychol. Music 47(6), 834–847 (2019)
7. Gardikiotis, A., Baltzis, A.: ‘rock music for myself and justice to the world!’: Musical identity,
values, and music preferences. Psychol. Music 40(2), 143–163 (2012)
8. Graham, J., Haidt, J., Nosek, B.A.: Liberals and conservatives rely on different sets of moral
foundations. J. Personal. Soc. Psychol. 96(5), 1029–1044 (2009)
9. Graham, J., Nosek, B., Haidt, J., Iyer, R., Koleva, S., Ditto, P.H.: Mapping the moral domain.
J. Personal. Soc. Psychol. 101(2), 366–385 (2011)
10. Greenberg, D.M., Müllensiefen, D., Lamb, M.E., Rentfrow, P.J.: Personality predicts musicalsophistication. J. Res. Pers. 58, 154–158 (2015)11. Haidt, J., Joseph, C.: Intuitive ethics: How innately prepared intuitions generate culturally
variable virtues. Daedalus 133(4), 55–66 (2004)75

Proc. of the 15th International Symposium on CMMR, Online, Nov. 15-19, 2021

12. Kalimeri, K., Beiró, M.G., Delfino, M., Raleigh, R., Cattuto, C.: Predicting demographics,
moral foundations, and human values from digital behaviours. Comput. Hum. Behav. 92,
428–445 (2019)
13. Krismayer, T., Schedl, M., Knees, P., Rabiser, R.: Predicting user demographics from music
listening information. Multimed. Tools. Appl. 78(3), 2897–2920 (2019)
14. Loersch, C., Arbuckle, N.L.: Unraveling the mystery of music: Music as an evolved groupprocess. J. Personal. Soc. Psychol. 105(5), 777–798 (2013)
15. Lundberg, S.M., Lee, S.I.: A unified approach to interpreting model predictions. In: Proc. 31st
Int. Conf. Neural. Inf. Process. Syst. pp. 4768–4777 (2017)
16. MacCallum, R.C., Zhang, S., Preacher, K.J., Rucker, D.D.: On the practice of dichotomizationof quantitative variables. Psychol. Methods 7(1), 19–40 (2002)
17. MacDonald, R., Kreutz, G., Mitchell, L.: Music, health, and wellbeing. Oxford University
Press (2013)
18. Mejova, Y., Kalimeri, K.: Effect of values and technology use on exercise: implications
for personalized behavior change interventions. In: Proc. ACM Conf. User Model. Adapt.
Personaliz. (UMAP) 2019. pp. 36–45 (2019)19. Miller, S.L., Maner, J.K., Becker, D.V.: Self-protective biases in group categorization: Threatcues shape the psychological boundary between “us” and “them”. J. Personal. Soc. Psychol.
99(1), 62–77 (2010)
20. Nave, G., Minxha, J., Greenberg, D.M., Kosinski, M., Stillwell, D., Rentfrow, J.: Musicalpreferences predict personality: evidence from active listening and facebook likes. Psychol.
Sci. 29(7), 1145–1158 (2018)
21. Tajfel, H., Turner, J.C., Austin, W.G., Worchel, S.: An integrative theory of intergroup conflict.
Org. Id.: A reader 56(65), 33–47 (1979)
22. Vigliensoni, G., Fujinaga, I.: The music listening histories dataset. In: Proc. Int. Soc. Music
Inf. Retr. Conf. (ISMIR). pp. 96–102 (2017)76