The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
m# XITE Million Sessions Dataset
Overview
The XITE Million Sessions Dataset is the first large-scale publicly available corpus of connected-TV music video sessions. The dataset contains 1 million anonymized viewing sessions from the XITE platform, comprising approximately 31 million video impressions across 96,000+ unique music videos by 30,000+ distinct artists.
XITE app interface
This dataset enables research on music video consumption patterns, sequential recommendation, and the interplay between editorial curation and algorithmic recommendations in audiovisual music contexts.
Dataset Contents
The download package contains the following files:
- xite_msd.parquet - The main dataset file containing session data and video metadata
- hierarchy.csv - Expert-curated genre-subgenre hierarchy
- correlation.csv - Subgenre correlation matrix (between 0 and 1)
- mappings.pickle - Mapping of video IDs to their indices in the dataset
- train_sessions.npy - Training set session IDs
- val_sessions.npy - Validation set session IDs
- test_sessions.npy - Test set session IDs
- stats.json - Simple statistics about the dataset, such as number of videos and number of total events
- XITE.mov - A screen grab of the XITE app, showcasing the user interface and the different ways users interact with the content inside the app
Visualisation of dataset sample
Data Format and Usage
Main Dataset (xite_msd.parquet)
The dataset is stored in Apache Parquet format, which provides several advantages:
- Column-based storage enabling efficient querying of specific fields
- Compression that reduces file size while maintaining fast access
- Schema enforcement ensuring data consistency
- Excellent performance with data analysis tools
Data Structure
The dataset has the following key columns:
session_id: Unique identifier for each viewing sessionvideo_id: Unique identifier for each music videotitle: The title of the songmain_artist: The primary artist of the video (one per video)secondary_artists: Additional featured artists, separated by ";" (can be multiple or none)genre: The primary genre of the video (one per video)subgenres: Multiple subgenres separated by ";" (can be multiple or none)release_year: The year in which the music video was releasedvideo_isrc: International Standard Recording Code (ISRC) allows for unique identification of recordingstime_in_video: Duration the user spent watching the video (in seconds)mbid: The musicbrainz id of the most similar recording to the music videomb_conf: The matching confidence with the music video and musibrainz recordingsession_order: An integer that orders sessions by their starting time. Lower means the session started earliervideo_order: 0-index order of videos in a sessioncontext_segment: Integer identifier that groups together videos experienced in the same viewing context, for instance, videos played from a single playlist, a single search session, or the same recommended content context. While we are unable to release exact context lables, this column allows researchers to differentiate between such contextual groupings.
To load and explore the dataset:
import pandas as pd
import pyarrow.parquet as pq
# Load the entire dataset
df = pd.read_parquet('xite_msd.parquet')
# Basic statistics
print(f"Number of sessions: {df['session_id'].nunique()}")
print(f"Number of unique videos: {df['video_id'].nunique()}")
print(f"Number of unique main artists: {df['main_artist'].nunique()}")
print(f"Total video impressions: {len(df)}")
# Example: Average videos per session
session_lengths = df.groupby('session_id').size()
print(f"Average videos per session: {session_lengths.mean():.2f}")
# Example: Working with the secondary artists (split by ";")
# First, create a helper function to handle the semicolon-separated values
def extract_list_from_delimited(series):
"""Extract lists from semicolon-delimited strings"""
# Handle NaN/empty cases
return series.fillna('').str.split(';').apply(
lambda x: [item.strip() for item in x if item.strip()]
)
# Get all secondary artists
all_secondary_artists = extract_list_from_delimited(df['secondary_artists'])
# Count videos with at least one secondary artist
videos_with_features = sum(len(artists) > 0 for artists in all_secondary_artists)
print(f"Videos with featured artists: {videos_with_features} ({videos_with_features/len(df)*100:.1f}%)")
# Example: Working with subgenres (also split by ";")
all_subgenres = extract_list_from_delimited(df['subgenres'])
# Count the most common subgenres
from collections import Counter
subgenre_counter = Counter()
for subgenre_list in all_subgenres:
for subgenre in subgenre_list:
subgenre_counter[subgenre] += 1
print("Top 10 subgenres:")
for subgenre, count in subgenre_counter.most_common(10):
print(f" {subgenre}: {count}")
# Example: Distribution of primary genres
genre_distribution = df['genre'].value_counts(normalize=True) * 100
print("\nGenre distribution:")
print(genre_distribution.head(10))
Genre Hierarchy (hierarchy.csv)
This file contains the mapping between subgenres and their parent genres, as curated by XITE's music experts:
import pandas as pd
# Load the genre hierarchy
hierarchy = pd.read_csv('hierarchy.csv')
# View the structure
print(hierarchy.head())
# Find all subgenres for a specific genre
pop_subgenres = hierarchy[hierarchy['genre'] == 'Pop']['subgenre'].tolist()
print(f"Number of Pop subgenres: {len(pop_subgenres)}")
print(pop_subgenres[:5]) # Show first 5
Subgenre Correlation (correlation.csv)
This file contains a correlation matrix showing the relationships between different subgenres, as determined by XITE's music experts:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# Load the correlation matrix
correlations = pd.read_csv('correlation.csv', index_col=0)
# Basic inspection
print(f"Number of subgenres: {correlations.shape[0]}")
# Example: Find most correlated subgenres for "Indie Pop"
indie_pop_correlations = correlations.loc['Indie Pop'].sort_values(ascending=False)
print("Top 5 subgenres correlated with Indie Pop:")
print(indie_pop_correlations.head(6)) # First one is self-correlation (1.0)
# Visualize a subset of the correlation matrix
plt.figure(figsize=(12, 10))
subset = correlations.iloc[:20, :20] # First 20 subgenres
sns.heatmap(subset, cmap='viridis')
plt.title('Subgenre Correlation Matrix (Subset)')
plt.tight_layout()
plt.savefig('subgenre_correlations.png')
Video ID Mappings (mappings.pickle)
This file provides mapping between video IDs and their corresponding indices in the dataset, useful for implementing recommendation models:
import pickle
# Load the mappings
with open('mappings.pickle', 'rb') as f:
id_to_index, index_to_id = pickle.load(f)
# Structure of mappings
print(f"Number of mapped videos: {len(id_to_index)}")
print("Example mapping entries:")
sample_ids = list(id_to_index.keys())[:5]
for video_id in sample_ids:
print(f"Video ID: {video_id} → Index: {id_to_index[video_id]}")
Train/Validation/Test Splits
These files contain the session IDs for the standard train/validation/test splits for benchmarking recommendation algorithms:
import numpy as np
# Load the splits
train_sessions = np.load('train_sessions.npy')
val_sessions = np.load('val_sessions.npy')
test_sessions = np.load('test_sessions.npy')
print(f"Number of training sessions: {len(train_sessions)}")
print(f"Number of validation sessions: {len(val_sessions)}")
print(f"Number of test sessions: {len(test_sessions)}")
# Example: Filter the main dataset to get only training sessions
import pandas as pd
df = pd.read_parquet('dataset.parquet')
train_df = df[df['session_id'].isin(train_sessions)]
print(f"Training set size: {len(train_df)} video impressions")
Example: Working with Artists and Genres
Here's a more detailed example of how to work with the artist and genre fields:
import pandas as pd
# Load the dataset
df = pd.read_parquet('xite_msd.parquet')
# Helper function for semicolon-separated fields
def get_all_values(series, delimiter=';'):
"""Extract all unique values from a semicolon-separated field"""
# Concatenate all non-null values, split, and get unique items
all_values = set()
for val in series.dropna():
all_values.update([v.strip() for v in val.split(delimiter) if v.strip()])
return all_values
# Get all unique artists (both main and secondary)
main_artists = set(df['main_artist'].unique())
secondary_artists = get_all_values(df['secondary_artists'])
all_artists = main_artists.union(secondary_artists)
print(f"Total unique artists: {len(all_artists)}")
# Find videos with multiple subgenres
df['num_subgenres'] = df['subgenres'].fillna('').apply(
lambda x: len([s for s in x.split(';') if s.strip()])
)
multi_subgenre_videos = df[df['num_subgenres'] > 1]
print(f"Videos with multiple subgenres: {len(multi_subgenre_videos)} ({len(multi_subgenre_videos)/len(df)*100:.1f}%)")
# For each genre, find the most common subgenres
genre_to_subgenres = {}
for genre in df['genre'].unique():
# Get videos of this genre
genre_videos = df[df['genre'] == genre]
# Extract all subgenres
subgenres = []
for sg in genre_videos['subgenres'].dropna():
subgenres.extend([s.strip() for s in sg.split(';') if s.strip()])
# Count and find top 5
from collections import Counter
top_subgenres = Counter(subgenres).most_common(5)
genre_to_subgenres[genre] = top_subgenres
# Print results for a few genres
for genre in list(genre_to_subgenres.keys())[:3]:
print(f"\nTop subgenres for {genre}:")
for subgenre, count in genre_to_subgenres[genre]:
print(f" {subgenre}: {count}")
Baseline Models and Evaluation
For baseline models and evaluation code to benchmark your algorithms, please refer to our GitHub repository: https://github.com/XiteTV/XITE-Million-Sessions-Dataset
License
The XITE Million Sessions Dataset is made available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0). This license allows you to:
Share: Copy and redistribute the material in any medium or format Adapt: Remix, transform, and build upon the material
Under the following terms:
Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made NonCommercial: You may not use the material for commercial purposes ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license
For the full license text, visit: https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
Contact Information
For questions about the dataset, please contact:
Email: datascience@xite.com
- Downloads last month
- 37

