← Back to list

Jay-Z Has 99 Problems — Here’s What a Neural Network Thinks They Are

*TL;DR**  I used a neural network and clustering to figure out what Jay-Z’s other 99 problems might be based on his lyrics. We grouped…

Ethan Jarrell · 2025-07-02 03:05 · 0 claps · 4.4 min read
#neural-network-algorithm #hdbscan #umap #python #machine-learning
Open on Medium ↗
Wiki topics: ML · Machine Learning EDU · Education & Learning 💻 · Programming

Generated using AI

Generated using AI

Jay-Z Has 99 Problems — Here’s What a Neural Network Thinks They Are

  • *TL;DR** I used a neural network and clustering to figure out what Jay-Z’s other 99 problems might be based on his lyrics. We grouped music industry issues using GPT-3.5, sentence embeddings, UMAP, and HDBSCAN — then matched them to lines in “99 Problems”. Here’s the github and the final chart of his most referenced issues.

Why Do This?

I was listening to 99 Problems and found myself thinking: “Well… what are they?” Jay-Z only talks about a few in the song. That left me wondering if I could use natural language processing to identify the rest.

After all, what if we could programmatically decode the real struggles of an artist based on their lyrics?

Step 1: Define the Problem Space

First, I brainstormed the types of problems hip-hop artists frequently reference. Then, I used GPT-3.5 to generate a set of anchor words — terms closely related to each topic. These topics included things like:

  • Money
  • Fame
  • Legal trouble
  • Record label issues
  • Violence
  • Betrayal

For each of these topics, GPT-3.5 generated 15 detailed phrases that encapsulated the kinds of struggles rappers face.

Step 2: Group the Chaos

Next, I used sentence embeddings from sentence-transformers to convert these anchor phrases into vectors. These high-dimensional vectors represent semantic meaning, but they’re hard to visualize. So I:

  • Reduced the dimensions with UMAP
  • Clustered them with HDBSCAN

UMAP stands for Uniform Manifold Approximation and Projection. It’s a dimensionality reduction algorithm. That sounds scary, but imagine this: You have 384-dimensional embeddings (from sentence-transformers) for your anchor words. That’s impossible to visualize or cluster intuitively in that space.UMAP compresses those embeddings into 2D or 3D space while preserving their relative distances as best it can. Then, using this 2 dimensional layer, we’ll use HDBSCAN to group the topics into natural clusters. HDBSCAN is a clustering algorithm that finds natural groupings of points. It works even when those clusters are uneven sizes or densities, and doesn’t require you to say “I want 5 clusters.” It figures that out. Once UMAP reduces your embeddings to 2D or 5D, HDBSCAN can group similar anchor sets (topics) together. These groupings become our high-level “problem themes”

This gave me natural groupings of problems — for example, everything about money, scams, and fame might cluster together, while another cluster captured emotional and mental health issues. If you’re following along at home, the result will probably look something like this:

[
  {
    "label": "Label disputes",
    "embedding": [
      -0.0642881914973259,
      ...,
      0.05606312304735184,
    ],
    "embedding_2d": [
      -0.4470033049583435,
      -0.3063269853591919
    ],
    "cluster": 3
  },

Some outliers (phrases that didn’t cleanly fit any cluster) were left ungrouped.

Step 3: Feed Jay-Z’s Lyrics to the Machine

To do this, we split the 99 Problems lyrics line by line and embedded each sentence using the same sentence transformer.

When we’re finished, each line becomes a vector, just like the anchor words.

For this step, we’ll use sentence-transformers “all-MiniLM-L6-v2” Model. This model is one of the most commonly used sentence embedding models in the sentence-transformers library. It’s popular because it’s Compact but powerful: Only 22M parameters, yet surprisingly strong performance on semantic similarity tasks. It’s also fast and very suitable for projects like this, where we embed many sentences quickly. It’s great for general purpose text because it’s been trained on a diverse set of data using contrastive learning, so it handles varied sentence types well.

In our current pipeline (with UMAP + HDBSCAN), clustering is used to group related “problem concepts” based on their embeddings. Each cluster represents a group of anchor topics that are semantically similar. The centroid of a cluster is the average vector (in the full embedding space, not the 2D one) of all the embeddings in that cluster. When we embed a lyric line, we want to match it to the most semantically similar problem group. So we compute the embedding of the lyric line, and then compare it to each cluster’s centroid using cosine similarity, and finally pick the most similar cluster. This is more scalable and robust than comparing each line to all individual anchor words.

When we finish, we should end up with a dataset that looks like this:

{
    "line": "Foes that wanna make sure my casket's closed",
    "embedding": [
      -0.047511663287878036,
      ....,
      -0.0792527049779892
    ],
    "assigned_cluster": 39,
    "similarity": 0.3466274034673452
  },

Step 4: Match Bars to Burdens

Then comes the fun part: for each lyric line, we can measure its cosine similarity to each cluster centroid. The line was assigned to the cluster it was most similar to. By converting everything to the 2 dimensional vectors, we’ve reduced our search space. Instead of comparing every lyric line to dozens of individual topics, we’re comparing it to just a handful of cluster centroids. Since the centroids represent the “center” of a theme (e.g., “money problems”, “industry beefs”, etc.), the lyric gets mapped to the closest overall topic. Think of it like sorting tweets into a few big buckets like: “career struggles”, “mental health”, “public image”. Instead of comparing each tweet to every possible complaint, you just match it to the most representative one.

This gives us a rough idea of which lines corresponded to which problem categories. For example:

"I've got the Rap Patrol on the - patrol"
 → Gun violence
"Rap critics that say, 'He's Money, Cash -'"
 → Financial pressures, bad investments, wealth loss

Step 5: Visualize It

Finally, I aggregated the results and built a chart showing the most referenced problem types in the song. Some of Jay-Z’s biggest issues (according to the algorithm):

What I Learned

  • UMAP and HDBSCAN are amazing for clustering nuanced language data.
  • Sentence embeddings let you compare the meaning of text, not just the words.
  • Even a relatively short song can be deeply mined for thematic content.
  • You can mix humor, music, and machine learning to explore questions nobody asked.

Want to Try It?

Check out the full repo on GitHub. You can plug in your own song lyrics and find out what problems your favorite artist really has.

Because hey, maybe you’ve got 99 problems too.

Thanks for reading!


메타데이터
post_id
71d2bfbfe4f3
slug
jay-z-has-99-problems-heres-what-a-neural-network-thinks-they-are-71d2bfbfe4f3
url
https://medium.com/@ethan.jarrell/jay-z-has-99-problems-heres-what-a-neural-network-thinks-they-are-71d2bfbfe4f3
canonical_url
https://medium.com/@ethan.jarrell/jay-z-has-99-problems-heres-what-a-neural-network-thinks-they-are-71d2bfbfe4f3
author_url
https://medium.com/@ethan.jarrell
status
ok
fetched_at
2026-08-11 06:46:56