Inspiration
Music recommendation systems shape what artists get heard, but they often do so invisibly. While using Spotify, I realized that even when my taste spans genres like dancehall, afrobeats, and soca, my recommendations still skew toward familiar or already popular artists.
What it does
FairPlay is a Responsible AI music recommendation system that audits a user’s listening behavior for popularity bias and then generates fairer, more transparent recommendations. Instead of treating recommendations as a black box, FairPlay:
- Analyzes recent listening history to identify bias toward mainstream or familiar artists
- Quantifies discovery using an exploration score
- Generates recommendations that preserve genre relevance while intentionally promoting emerging and mid-popularity artists
- Explains every recommendation in plain language The goal is not to replace existing recommender systems, but to make them more accountable, interpretable, and human-centered.
How I built it
FairPlay is built as a backend API using FastAPI and integrates directly with the Spotify Web API. High-level pipeline:
- Spotify OAuth is used to fetch a user’s recently played tracks securely
- Artist metadata (genres + popularity) is retrieved and normalized
- An audit module computes:
- Popularity distribution (mainstream / mid / emerging)
- Genre diversity
- An exploration score
- Candidate tracks are generated by searching Spotify using the user’s top genres
- A fairness-aware ranking algorithm scores candidates based on:
- Genre match
- Artist novelty
- Popularity bias correction
- Each recommendation includes a transparent explanation describing why it was suggested
Challenges I ran into
- Spotify API limitations (e.g., deprecated endpoints) required redesigning candidate generation
- Artist genre data is often incomplete, so fallback strategies were needed
- Avoiding duplicate recommendations across genre searches
- Designing explanations that are accurate but still understandable to non-technical users
Accomplishments that I'm proud of
What I learned
- How subtle algorithmic choices can reinforce inequality even in creative domains like music
- How to design ranking systems that balance fairness and relevance
- How to integrate real-world APIs while maintaining clean data pipelines
- The importance of explainability in building trust with users
Log in or sign up for Devpost to join the conversation.