"All of Me": Mining Users' Attributes from their Public Spotify Playlists

In the age of digital music streaming, playlists on platforms like Spotify have become an integral part of individuals' musical experiences. People create and publicly share their own playlists to express their musical tastes, promote the discovery of their favorite artists, and foster social connections. These publicly accessible playlists transcend the boundaries of mere musical preferences: they serve as sources of rich insights into users' attributes and identities. For example, the musical preferences of elderly individuals may lean more towards Frank Sinatra, while Billie Eilish remains a favored choice among teenagers. These playlists thus become windows into the diverse and evolving facets of one's musical identity. In this work, we investigate the relationship between Spotify users' attributes and their public playlists. In particular, we focus on identifying recurring musical characteristics associated with users' individual attributes, such as demographics, habits, or personality traits. To this end, we conducted an online survey involving 739 Spotify users, yielding a dataset of 10,286 publicly shared playlists encompassing over 200,000 unique songs and 55,000 artists. Through extensive statistical analyses, we first assess a deep connection between a user's Spotify playlists and their real-life attributes. For instance, we found individuals high in openness often create playlists featuring a diverse array of artists, while female users prefer Pop and K-pop music genres. Building upon these observed associations, we create accurate predictive models for users' attributes, presenting a novel DeepSet application that outperforms baselines in most of these users' attributes.


INTRODUCTION
Music is an art form that has been an integral part of human life from childhood to old age.It is a cultural universal, as it has been found in all human societies, both past and present.Music develops its art through artists, which are part of an art movement called genre (e.g., pop, rock).Furthermore, music is often a form of expression of cultural movements of specific epochs.An extraordinary example is the Woodstock festival (USA, 1969), the pinnacle of hippie culture, whose slogan was "3 Days of Peace & Rock Music".Our culture is therefore deeply influenced by music: the different genres mirror the identities of their listeners.For instance, listening to a specific genre, artist, album, or song might reflect our age.According to RollingStone -a popular music magazine since 1967there are albums that sold millions of copies in the 70s and 80s, but were completely ignored by later generations [28].Examples are "Brothers in Arms" by Dire Straits and "Breakfast in America" by Supertramp.Thus, people listening to those albums might indicate they lived in the 70s and 80s.In fact, there is scientific evidence of correlations between musical tastes and personal traits [24,29].
The diffusion of music streaming services has revolutionized the way we consume and interact with music.With its user-friendly interface and vast music library, Spotify has become incredibly popular, reaching almost 500 Million users in 2022 [33].Spotify also allows users to follow friends and influencers, see what others are listening to in real-time, and more importantly, create and share their playlists, to express their musical tastes, promote the discovery of their favorite artists, and foster social connections.These features make Spotify resembling a social network dedicated to music.
The evidence of connections between user attributes and music tastes, combined with the proliferation of music streaming platforms, has led researchers to investigate whether personal attributes can be inferred from online music data [20].Predicting user attributes from music data leads to broad-reaching implications.Music streaming platforms can deliver highly personalized content recommendations, while advertisers can tailor their messaging to specific audience segments.Furthermore, it contributes to developing more effective recommendation systems, facilitates cultural analysis, and empowers content curators to craft playlists that resonate with distinct demographics and moods.On the contrary, the inference feasibility might pose privacy threats to platforms' users.
Contributions.In this work, we investigate the relationship between Spotify users' attributes and their public playlists.While Spotify playlists are integral to our daily lives, serving as companions and connectors, no previous research has explored this aspect.Furthermore, unlike earlier studies, we adopt a comprehensive approach, scrutinizing a wide range of 16 attributes, including Demographic, Habits, and Personality traits.Our dataset encompasses more than 10,000 playlists shared by 739 users, spanning over 200,000 songs and 55,000 artists.Our rigorous statistical analyses reveal a discernible link between users' playlists and their personal attributes.In particular, we answer three research questions, focused on i) attributes and playlist relationships, ii) features separating attribute classes, and iii) playlists and users similarity.We proceed to develop multiple Machine Learning (ML) models for predicting user attributes, setting the groundwork for future investigations across numerous novel attributes (e.g., Relationship Status, Alcohol, and Smoking habits).In this direction, we propose to leverage a novel powerful approach able to use as input a set (of playlists) of the user: the DeepSet [39] that shows promising performance on the considered tasks.
We summarize our contributions as follows: • We assess relationships between Spotify users' public playlists and 16 private attributes, including novel traits (e.g., Alcohol, Economic status).• We demonstrated with an extensive testbed consisting of 560 models across 7 types of architecture that it is possible to infer with appreciable precision users's attributes from their public playlist.• We propose a novel adoption of DeepSet models on input subsets, outperforming or achieving comparable performance to the baseline classifiers in the majority of cases.
Transparency.The repository containing exhaustive details on our study, as well as the source code we developed for our analyses is available at: https://github.com/pierz95/SpotifyAttributes.

RELATED WORKS 2.1 Music and Personal Attributes
Studies in psychology have delved into the connections between musical choices and personality traits.Rentfrow and Gosling [30] demonstrated that individuals with certain personality traits tend to gravitate toward specific music genres.They found that those high in openness often prefer jazz, classical, and indie music, while extroverts are more inclined to enjoy pop and rock genres.Several other studies have tried to explain such intricate connections [5,11,29].Research also highlights the influence of demographic factors on music tastes.A study by North and Hargreaves [24] examined age-related differences in music preferences and found that younger individuals often favor contemporary, high-energy genres like hiphop and electronic music, while older generations may lean towards classical and jazz.The connection between cultural background and musical preferences has also been explored [31], revealing individuals from different cultural backgrounds displaying varying inclinations toward traditional and contemporary music.

Personal Attributes and Music Platforms
A few previous works analyzed the correlations between users' attributes and music data on music streaming service platforms.Liu et al. [20] determined the gender and age of Last.fm users based on listening history, analyzing the listening timestamps, the song and artist metadata of the song, and song signal features.In 2017, Krismayer et al. [19] investigated the prediction of personal information of Last.fm users, such as age, gender, and nationality.More recently, a team at Spotify investigated the intriguing interplay between individuals' personality traits and their music listening habits [2], utilizing listening history, demographic data, and App Usage information (not publicly accessible) as model inputs.Their research unveiled patterns connecting music genres, artists, and personality traits, shedding light on how musical choices might offer insights into personality.Building upon these foundations, our work focuses specifically on playlist data and distinguishes itself by i) concentrating on playlist information, an aspect that has remained relatively unexplored in existing literature, ii) conducting a comprehensive analysis encompassing 16 diverse attributes spanning demographics, habits, and personality categories, introducing several novel elements (e.g., relationship status, occupation, smoking habits), and iii) centering exclusively on publicly accessible data through the official Spotify API.

Personal Attributes and Public Data
A research area in cybersecurity attempts to infer users' private attributes by leveraging their public data.This phenomenon, known as Attribute Inference Attack (AIA), encompasses a diverse range of public data sources, including photos [13,22], public ratings [37,40], posted emojis [26], and even video game data [36].While the majority of research in this field has exploited data from Social Networks [9,10,14,17] due to easy access to user information, we clarify that our paper's intent is far from the pursuit of AIA.Instead, our objective is to build upon the prior exploration of the intricate connections between user preferences and human behavior.However, as emphasized in previous works [19,20], uncovering such connections can affect user privacy.Hence, our paper aims to raise awareness about this subtle yet noteworthy threat that can potentially jeopardize the privacy of millions of Spotify users.

DATASET 3.1 Data Collection Procedure
To create our dataset, we performed a two-step procedure.Initially, we launched an online survey to identify willing participants and gather their Spotify IDs and personal attributes.Subsequently, utilizing these Spotify IDs and the Spotify API, we systematically retrieved their publicly available playlists along with detailed information about the songs and artists within these playlists.The Survey.We recruited participants for our research via an online survey.Initially, participants were requested to furnish their distinctive Spotify IDs, a handle for accessing their Spotify data, particularly their playlists.Subsequently, we sought additional selfprovided information from participants to serve as attributes for our analyses.In total, we gathered 16 attributes: • demographics: gender, age, country, relationship, if they live alone, economic status, and occupation; • habits: sport, smoking, and alcohol habits, and if they are Premium Spotify subscribers; • personality: we utilized the 10 short personality questions [27] to retrieve OCEAN personality traits [38].Table 1 reports a short description of the attributes.The survey was conducted in English and had an approximate completion time of 4 minutes.To ensure data quality, we incorporated attentioncheck questions and cross-referenced information with the Spotify API, enabling us to identify and filter out inconsistent or unreliable responses.The survey was active from May to September 2022, and distributed primarily through social networking platforms, notably Reddit, Facebook, and Telegram.Our survey was strategically shared within popular Spotify and music-oriented groups, including /r/Spotify/, r/Music, and Facebook Spotify Music.By participating in the survey, users explicitly permitted us to utilize their data for this study.We also offered various points of contact, enabling users to request the removal of their data from our dataset.As an additional safeguard, we meticulously anonymized their data, eliminating any Personally Identifiable Information (PII) they might have shared with us.For privacy considerations, we have decided not to publicly release our dataset, not even in anonymized form, as the risk of re-identification remains a concern. 1urvey results and validation.We received a total of 1081 responses from individuals across 76 different countries, spanning an age range of 13 to 55 years. 2 Subsequently, we excluded respondents who did not pass the attention test or had no publicly accessible playlists on Spotify, resulting in 739 users constituting our final dataset.Table 1 reports the distributions of our targets at user and playlist levels.Similar to previous works [4,6,36], we grouped age in bins of interest (e.g., underage), and the results of personality traits, which range from 0 to 100, into three categories, differentiating low, middle, or high scores (boundaries = [33.3, 66.6, 100]).Our distributions align to global Spotify statistics [33].For instance, 58% of users are Male (our is 68%), and the majority of users (62%) are in the age range 18-35 (we also have the majority in the range 18-30).The majority of our participants are European (40%) and North American (33%), similar to the global distribution (34% and 24%, respectively) [1].Despite being far smaller than the overall amount of Spotify users, such a number still allows us to draw statistically significant results.Indeed, we are above the minimum sample size of 384 required by setting a confidence level of 95%, a margin of error of 5%, a population proportion of 50%, and a population size of 500 million [18].
Remark.It is crucial to emphasize that our primary objective is to establish the existence of a connection between users' playlists and personal attributes.However, this relationship may exhibit variations in a broader and more representative context.Nonetheless, all our analyses are rigorously validated through statistical tests, ensuring the robustness and reliability of our findings.
Retrieving data from Spotify.Leveraging the official Spotify API 3 , we systematically gathered the public playlists of our participants by means of their Spotify ID.Each API call yields a JSON file per playlist, containing details about the playlist owner (e.g., Spotify ID and nickname) and the playlist's constituent tracks (comprising track names, artists, and the dates when tracks were added to the playlist).In the following sections, we discuss in deep our data.

Features
To create our playlist dataset, we harnessed multiple Spotify APIs to collect information about the playlist, their constituent songs, and the artists who composed them.Then, we consolidated this information to craft a unified representation consisting of 111 features for each playlist, serving as the foundation for our experiments.In the following sections, we provide a succinct overview of the diverse feature categories, which encompass Songs, Artists, Genres, and Miscellaneous (Misc) attributes.For a comprehensive list of these features, please refer to our repository.

Songs Features.
For each song in a playlist, we accessed the tracks and audio-features APIs to retrieve songs' information.Specifically, we collected the popularity, whether it contains explicit content, the release year, duration, and several audio features calculated by Spotify algorithms, namely, danceability, energy, loudness, speechiness, acousticness, instrumentalness, liveness, valence, and tempo.For each playlist, we aggregated the songs's information in a single entry by calculating the mean, standard deviation, minimum, and maximum of each value, except for the feature explicit, where we calculated the occurrence percentage.For an exhaustive explanation of the song features, we recommend referring to the official Spotify API documentation.

Artists
Features.Within each song, there is often a collaboration among one or more artists.To comprehensively capture the characteristics of these contributing artists, we employed the artists API.This API enabled us to extract essential information, including an artist's popularity and the number of followers.When aggregating the artists' information for each playlist, we computed various metrics such as the total count of artists (both overall and unique), the proportion of artists with lower popularity (popularity < 20, both overall and unique), the percentage of songs created by a single artist, the prevalence of artists making multiple appearances, the artist diversity (measured through the Simpson Index [15]), and insights into artists' popularity and follower counts on Spotify.Analogous to our approach for song features, we aggregated the numerical attributes associated with the contributors to all tracks by computing mean, standard deviation, min, and max values.

Genres Features.
Calling the artists API, we gained access to the genres attributed to each artist.We associated each song with the genres corresponding to the artists involved in its creation.In our data aggregation process, we calculated the proportion of songs within the playlist that fell under specific genres, encompassing 30 popular genres (e.g., rock, pop, indie, metal).Additionally, we incorporated a feature for local genres, denoting those linked to geographical locations, and a category for other genres.

Misc Features.
For each playlist, we systematically compiled the total number of songs, the count of followers, the diversity in terms of the albums from which the songs originated, and a record of the years when the songs were added to the playlist.

Final Dataset
The final playlist dataset comprehends 10,286 public playlists made by 739 users.On average, each user has 13.9 playlists (STD = 35.2),and each playlist has 38.9 songs (STD = 34.3).Each playlist is linked with the attributes of the user who created it (e.g., age, gender), and comprehends the aggregated information of all its songs and relative artists, for a total of 111 features.In total, we extracted information from 221,008 unique songs and 55,074 unique artists.

ANALYSES
This section focuses on exploring the connection between users' playlists and their personal attributes, categorized as Demographic, Habits, and Personality.In particular, we aim to answer the following research questions: RQ1.Is there any relationship between users' personal attributes and their Spotify public playlists?RQ2.Which playlist characteristics aid in distinguishing users across attribute classes?RQ3.Are similar playlists created by similar users?

RQ1: Attributes and Playlists Relationship
Our initial objective is to discern the existence and the nature of relationships between feature families and users' attributes.For instance, are artists-related features connected with demographic attributes?Are genre preferences connected with habits such as drinking alcohol or smoking?To unravel these connections comprehensively, we undertake a thorough examination of all possible combinations of attributes (Demographic, Habits, and Personality) and feature families (Misc, Artists, Songs, Genres).
Methodology.To ascertain the presence of relationships between attributes and features, we employed two widely recognized statistical tests: the unpaired Student t-test and Analysis of Variance (ANOVA).These tests assess whether there are statistically significant differences between the means of two or more groups, determining whether any of these groups differ from each other in terms of a dependent variable.In our case, we treated our features, individually, as the dependent variable, with attributes serving as the distinct groups for assessment.Consequently, we conducted a battery of tests, subjecting each variable to examination against every attribute.Specifically, we used the Student t-test for attributes with two classes (e.g., Relationship) and ANOVA for others.The significance of these tests is established when the associated value falls below a predetermined threshold, typically set at 0.05.To mitigate the potential influence of users with a larger number of playlists, we performed these tests at the user level, where we aggregated all playlist information for each individual, ensuring a balanced and equitable analysis.
Results. Figure 1 reports the results of our analysis, categorized by attribute types and feature families.These graphs illustrate the proportion of features within a family that contribute to statistically significant differences between the classes of the target attribute ( < 0.05).An immediate observation is the diversity of feature groups that play a role in distinguishing between target attributes.
In terms of demographic attributes, the classes of Age, Relationship, and Occupation exhibit significant distinctions primarily based on Misc features, while Gender showcases the least variation.Conversely, Gender classes differ from one another in Artists, Songs, and Genres features, a pattern shared by Age, while Economic and Live Alone do not demonstrate strong relationships.
For Habits attributes, Alcohol, Smoke, and Spotify Premium reveal notable differences across all features, while Sport exhibits relatively milder associations.A parallel pattern emerges in the context of Personality Attributes, where Agreeableness and Extraversion exhibit fewer disparities in our features, while Neuroticism, Openness, and Conscientiousness reveal the most pronounced distinctions.

RQ2: Features Separating Attribute Classes
This research question naturally extends from RQ1, where we explored the presence of a connection between personal attributes and Spotify playlists.However, it remains unanswered how these musical features differentiate among the target attribute classes.For example, while we found that Genres features are associated with user gender, we have yet to uncover which specific genres Males prefer in contrast to Females and Others.

Methodology.
To address this research question, we meticulously examined the distributions of the target classes concerning our Spotify features.We focused on identifying distributions that exhibited noteworthy variations among classes within the same target attribute.By scrutinizing these distributions, we gained insights into whether a particular class displayed a propensity toward specific values.The statistical significance of this distribution diversity was established by employing the Student t-test or ANOVA, contingent upon the number of classes associated with each target.Consistent with our approach in RQ1, these analyses were conducted at the user level, with the average information from each user's playlist serving as the basis for our assessments.In the subsequent sections, we present some of the most intriguing findings 4 , accompanied by the corresponding levels of statistical significance (p-values).

Demographics.
Regarding Age, the years associated with songs and when users added them to their playlists play a pivotal role.Intriguingly, both of these factors exhibit a negative correlation with age, signifying that younger users gravitate towards more recent songs (Pearson r = −0.11, < 0.01) and recently added tracks (Pearson r = −0.415, < 0.001).Moreover, younger populations listen to the most popular artists ( < 0.01) and songs ( < 0.001)with a higher prevalence of explicit songs ( < 0.01).Additionally, songs favored by younger individuals exhibit higher energy ( < 0.05), speechiness ( < 0.05), loudness ( < 0.001), and tempo ( < 0.001).Older individuals prefer alternative and local music, which contrasts with the preferences of younger listeners ( < 0.001).Rap music garners favor among users aged 18-30 ( < 0.01), while Anime music finds more resonance with the 13-24 age group ( < 0.001).
About Gender, Males tend to have more artists in their playlist ( < 0.01), longer ( < 0.001) and less popular songs ( < 0.01), with more explicit content ( < 0.01).Their songs' energy and instrumentalness are higher ( < 0.001), while their favorite genres are local ( < 0.05), rap, hip-hop, and electric ( < 0.001, Figure 2).Almost no male listen to K-pop ( < 0.001).Females, instead, tend to favor the most followed artists ( < 0.001) or popular songs ( < 0.01).Their songs' speechiness is often lower ( < 0.001), preferring pop and k-pop genres ( < 0.001), while showing less interest in metal ( < 0.05).Interestingly, non-binary individuals often exhibit preferences that fall between Males and Females, with a particular inclination toward alternative and indie genres ( < 0.001).People across countries show several differences in their musical preferences.For instance, UK and US listen more to songs made by a single artist, while India, Germany, and Italy do the opposite ( < 0.001).In particular, playlists of Indian users contain the highest number of artists ( < 0.01) and the most followed ones.Interesting patterns appear in the most popular genres.Italy, Philippines, and India lean toward pop music ( < 0.001), while Brazil, UK, and US elect rock ( < 0.01).Local genres are the favorite in Italy and Germany ( < 0.001).Curiously, K-pop is widespread in Canada, Australia, the Philippines, Brazil, and India, but almost entirely absent in European countries.

Pop
Occupation is influenced by songs' years and time they were added to playlists.Employees often listen to older songs and add more songs during the years ( < 0.001 and  < 0.01).Unemployed prefer popular ( < 0.01), danceable ( < 0.01), and less instrumental ( < 0.01) songs.Unemployed prefer Anime songs ( < 0.001), while alternative genres are the favorite of employees ( < 0.001).All these features might reflect that people tend to have a job later in the years, thus showing similar trends to Age.
Relashionship and Live Alone, although similar ideally, present some differences.Single individuals have more recent playlist additions ( < 0.001) and listen to more popular songs ( < 0.01), similar to people living with others ( < 0.05 and  < 0.05).People in a relationship opt for songs with less energy ( < 0.01) and speechiness ( < 0.01), while those living alone favor higher valence songs ( < 0.05).People in a relationship listen to more Indie music ( < 0.001), and those living alone lean toward Local genres ( < 0.001).
Economic trait is complex to grasp from Spotify features.We note differences in the ratio of explicit songs, with medium economic people favoring less explicit ones ( < 0.01).Economic increases with the artists' number of followers ( < 0.05), and decreases with the number of times an artist appears in a playlist ( < 0.01).Low economic is related to more metal songs ( < 0.05), and Rap songs similar to high economic ( < 0.05).
Concerning Spotify Premium, various features exhibit a strong connection to a more extensive platform use.For instance, premium users tend to have a longer history of adding songs to their playlists ( < 0.001) and typically maintain larger playlists ( < 0.05).In contrast, regular users lean towards more popular songs ( < 0.01), suggesting a more superficial engagement with the platform.Notably, premium users listen to explicit songs more ( < 0.001) and favor Rock ( < 0.01) and Alternative ( < 0.01) genres, whereas regular users exhibit a preference for Pop ( < 0.01).
Unfortunately, very few features help distinguish users doing Sport regularly.More active users listen to more popular artists ( < 0.05), and higher valence songs ( < 0.05).

Personality. Differences in Agreeableness are evident only for
Local genres, with high values associated with more frequent listening.Similarly, Extraversion differences are visible when analyzing the genres, with Introvert preferring K-Pop ( < 0.01), and Extrovert leaning toward Local ( < 0.001) and Indie ( < 0.01) genres.
Neuroticism shows the most differences.It increases with listening to more recent songs ( < 0.05), and less neurotic people update their playlist for longer years ( < 0.001).Medium neuroticism levels imply listening to more artists ( < 0.001), especially popular ones ( < 0.001).Neuroticism increases with Pop and K-Pop music listening ( < 0.01), while Rap follows the opposite trend ( < 0.001).
Conscientiousness decreases in playlists that are updated more over the years (! <!0.001) and when the same artist is included multiple times (! <!0.05).Conscientious people prefer Electronical ( < 0.01) and Dance ( < 0.001) music.
Openness increases when the number of songs decreases ( < 0.001), and the same happens for the number of artists ( < 0.01) and their popularity ( < 0.05).These factors indicate more open people tend to explore more artists, even if they are unpopular.Low openness people prefer Rap ( < 0.05) and Trap ( < 0.01) genres.
Answer RQ2: Generally, all our feature families aid in distinguishing class attributes.For instance, genre features are the most impactful in distinguishing users' attributes.

RQ3: Playlists and Users Similarity
In this final question, we aim to determine whether similar playlists are associated with similar users.In this case, a thorough examination of these playlists could potentially offer deeper insights into the correlation between playlists and user attributes.To achieve this goal, we employ a cluster-based approach.
Methodology.We cluster the playlist with the following steps.i) All features are reduced with PCA, selecting a number of components that explain 80% of the variance.ii) The reduced data is clustered using K-Means [12]; the optimal number of clusters is calculated with the Silhouette score [34], from 50 to 200 with step 5. iii) We then discard clusters of playlists made by a few users.We compute user's diversity with the Simpson Diversity [15] and discard those clusters whose value is less than 0.5, following the methodology in [35].iv) We discard clusters with less than 5 playlists.
Finally, we need to find "interesting" clusters that show particular concentration for target attributes, e.g., a group of playlists made by female users or users in the age range 31+, which are minorities in our dataset.We define that a cluster is leading if there is an anomalous distribution of the attributes compared to the prior distribution.For instance, let's consider the gender scenario, with females 28%, males 68%, and others 4%: a cluster containing 20% of playlists made by the gender "others" is worth considering special since its abnormal distribution.Therefore, to find leading clusters, i.e., with a significant leading class for the attribute  ℎ , we first calculate the threshold that tells us when a cluster's probability distribution is interesting as follows: where  ( ℎ ) is the prior distribution of our population for the attribute  ℎ , and  regulates the threshold computed for each attribute's class.Then, a cluster  is defined leading toward the target  ℎ if in its distribution  ( ) ( ℎ ) there is at least one attributes class that exceeds its threshold set in ℎ.Back to the gender example, if we set  = 0.5, then ℎ( ) = {  : 0.64,  : 0.84, ℎ : 0.52}.A cluster is leading if it contains at least 64% females, 84% males, or 52% others.In our experiment, we analyze leading clusters for each attribute at the varying of  from 0 to 1 with a step of 0.1.Intuitively, the higher , the stricter our selection.
Results. Figure 4 shows the percentage of identified leading clusters by varying .For demographic attributes, many leading clusters appear up to an  of 0.3.After that point, only Live Alone presents some clusters, while the other attributes tend to have 0 leading clusters.On a threshold of 0.2, most leading clusters are for Occupation, Live Alone, and Relationship.For habits features, we see many more leading clusters, especially for Spotify Premium.Likely, premium features allow more freedom to create playlists, thus defining cohesive clusters.Also Alcohol presents a good number of leading clusters.Regarding personalities, all attributes lose most leading attributes with  > 0.3.Before that threshold, Agreeableness and Openness present more leading clusters.It is worth noting that, in all three Attribute categories, we have some leading clusters for high levels of alpha (e.g., for  > 0.8, there are 2 Live With, Spotify Premium and 1 Agreeableness leading clusters).By inspecting these clusters, interesting patterns might be unveiled.
Answer RQ3: Some similar playlists are made by similar users, especially for Demographic e Attributes.However, finding clusters that contain mostly the same attribute is uncommon.

CLASSIFICATION
We now assess whether it is possible to infer Spotfy users' attributes from their public playlists.We aim to develop a classifier that infers Spotify user attributes from their public playlists.The public playlist of a user is defined as a set where,  is the number of users, p   ∈ R  is a vector describing the -th playlist of user , while   is the number of playlist associate with the -th user (see Section 3.2 for playlist descriptors).For each user, we consider  different classification tasks.Each task has a specific target ( where U is the space of input sets of users' playlists.

Dataset
Experiments are conducted in the dataset described in Section 3. The dataset is split into training, validation, and testing sets with 70% -10% -20% ratios, respectively.The splitting is not purely randomic at playlist levels, but it considers the users on which the playlists come from.We enforce the splitting based on the users, and thus two distinct playlists of a given user belong on the same partitions.Indeed, in a realistic scenario, it is unlikely to have the same user in both training and testing sets, as such we would already know their attribute.Furthermore, the partitions split utilizes a stratified strategy on the attribute to ensure similar attribute distributions in the three splits.Last, each experiment is repeated five times where we vary users belonging to the three sets.

Models
Baselines.As baseline models we utilized five distinct simple classifiers to address the task of attribute inference from a given playlist: Logistic Regression (LR), Decision Tree (DT), Random Forest (RF), K-Nearest-Neighbours (KNN), and MultiLayer Perceptron (MLP).All of these models assume a fixed input size, while in our case the number of playlists is considered as classification task input varying user by user.Concatenating the playlists to obtain a fixed size input vector is one possible solution.However, this approach poses two issues.Firstly, since the playlists have different numbers of inputs, we need to decide on a policy for padding the vector, which results in a considerable waste of memory.Secondly, ordering the playlists during concatenation leads to a bias that may not be related to the nature of the data.For these reasons, we decided to adopt a different strategy.The baseline models process one playlist at a time a single playlist at a time, to produce a classification (probability) for each of them.We then combine the outputs of all the user's playlists and calculate the average classifications.Formally as a baseline classifier model the function G In short, the ℎ−ℎ attribute of the  −ℎ user is assigned by averaging the probability distributions obtained by the single user's playlists.
Note that for the baseline models DeepSet.To address the problem of having an inconsistent number of playlists for each user, we have investigated the use of a Deep Learning model designed to accept a set of feature vectors of any size as input: the Deepset [39].DeepSets constitute a recently proposed approach to design to define powerful and flexible aggregation function [8,23,25].More formally, it has been proven in [39] that any function   ( ) over a set  , satisfying the following two properties: (1) variable number of elements in input, i.e., each input is a set  = { 1 , . . .,   } with   belonging to some set  (typically a vectorial space) and  > 0; (2) permutation invariance; can be decomposed in the form: for some  (•) and  (•) functions, if  is countable.This is the general formulation of DeepSets [39], that being in principle universal approximators for a wide range of functions over countable sets, or uncountable sets with a fixed size, they are potentially very expressive from a functional point of view.A more detailed discussion is provided in Appendix A. In this paper, we apply the DeepSet structure to our specific problem by considering as input the set  = U  The output of the deepest will be a single vector that represents a projection of the aggregation of the user playlists set.More formally for our classification problems )) (see eq. 2).In our case, both ℎ and  are defined as MLPs.In particular,  uses 3 aggregator operators: average, max, and summation.These operators applied over the output of  (p ( )  ) obtaining a 3 user-level embeddings that are then concatenated.Then the obtained user-level embedding is projected in the output space using a Softmax activation function.

Model Selection and Evaluation
For each model, we perform a complete model selection strategy to select the hyperparameters' values in a correct and fair way and ensure a fair comparison between the model's performance, and the reproducibility of the obtained results.For the model selection we adopted a grid search, where the explored sets of values were changed based on the considered model.Other details about validation are reported in Appendix B. We evaluate our models using a weighted f1-score.Furthermore, we add a random guess (RG) using a Scikit-Learn dummy classifier using a stratified strategy.

Results
The results are reported in tables 2, 3, 4. First, we can notice that DeepSet (DS) is the most performing classifier in 9 / 16 cases, implying that utilizing a model that can capture the relationship between a set of variables leads to higher performance.Second, in general, there is only one attribute -Live A. -that is not inferrable with our extracted features and designed classifiers: all models are random.Last, we can affirm that it is in general possible to infer with good accuracy a wide set of user attributes starting from their Spotify public playlists.For instance, we find the best models with at least

CONCLUSION AND FUTURE WORKS
This study has revealed a substantial connection between Spotify playlist information and user attributes, with specific attributes, such as age and gender, exhibiting stronger correlations than others like "Living Alone."Machine learning models have proven effective in harnessing these features for attribute prediction, with the DeepSet approach often surpassing baseline algorithms.
For future research, we intend to organize user data topologically.This involves constructing a graph that represents the relationships between users by leveraging playlist similarity.Subsequently, we plan to employ Graph Neural Networks (GNN) for creating enriched topological embeddings of each user [16,21,32].

Ethical Considerations
Our institutions do not mandate formal IRB approval for the experiments detailed in this study.However, we conducted our survey and evaluations in strict accordance with the ethical guidelines outlined in the Menlo report [3].All participants were explicitly informed that their responses would be utilized for research purposes, and our questionnaire refrained from soliciting sensitive or private information, such as names or addresses.Our dataset has never been publicly released, even in anonymized form.Additionally, we provided participants with an easily accessible email contact for requesting the removal of their entries from our dataset.Given we are based in Europe, we diligently adhered to GDPR regulations.Furthermore, all underage participants were situated in regions where their involvement in research surveys did not necessitate explicit parental consent [7].

Figure 1 :
Figure 1: Ratio of feature families that exhibit statistically significant distinctions between attribute groups.

Figure 3 :
Figure 3: Song Features distributions per Smoke attribute.

Figure 4 :
Figure 4: Number of identified leading clusters per Attribute categories, by varying the Threshold .

Table 1 :
Target Attributes, their explanation, and distribution at user and playlist levels.

Table 2 :
Demographics Classification Results (best in red).

Table 3 :
Habits Classification Results (best in red).10 points percentage over the random guess like country, gender, occupation, alcohol, sport, openness, extraversion, and neurotics.