Can an AI place your ideology between Jordan B. Peterson and Slavoj Žižek?

Jordan B Peterson & Slavoj Žižek; photo sourced from RT

On April 19, 2019, Jordan B. Peterson and Slavoj Žižek, arguably the world’s two foremost pop philosophers, participated in a debate titled “Happiness: Capitalism vs. Marxism.” This debate gave me an idea: would an AI be able to tell which participant a user would agree more with?

To avoid burying the lede, the AI lives at postmodernbot.com; feel free to try it yourself! For the uninitiated, though, let me contextualize who Peterson & Žižek are, and why the AI is a fun thought experiment. Essentially, the two sit on opposite ends of the political spectrum, which thus makes an AI that tells you which one you align with a nice political Rorshach test.

Jordan B. Peterson

Jordan B. Peterson is a controversial, right-leaning figure most notable for his bestselling self-help book, 12 Rules for Life. He is an eminently meme-able figure, causing countless internet posters to crack wise about his mandate to “clean your room,” one of his many neologisms. His bona fides also include being a professor of Psychology at the University of Toronto.

Slavoj Žižek

Slavoj Žižek is an equally iconoclastic multi-hyphenate, and is no less meme-able than Peterson. Known for his animated demeanor and rambling polemics, Žižek is known as more of pure philosopher than Peterson. He is also notable for his film criticism, and his “Pervert’s Guide” films, e.g., “The Pervert’s Guide to Ideology,” and the “Pervert’s Guide to Cinema.”

These two figures are obviously on quite opposite ends of the ideological spectrum; one is reactionary and polished, while the other is a disheveled-looking Marxist. Thus, the task we face shall be to see if we can generalize the differences between the two based on some of their own writings, using Machine Learning.

The AI: Overview

Our AI will tell a user whether they lean more towards Peterson or Žižek on the ideological spectrum, giving them a percentage score that represents the closeness to their nearest match. Under the hood, the bot is actually assigning the user a probability that the text they inputted matches one of the philosophers, e.g., their text is 90% aligned with Peterson.

So how does the bot actually calculate this? Well, for starters, it uses a bag-of-words approach to its data, making essentially a word salad of its source material. I fed it some examples of Peterson & Žižek’s work — transcripts of lectures and dialogues available on their respective websites — and the bot found the most common 1,000 words in all the supplied text, creating a vocabulary. It uses these as features for the classifier I create, a Multinomial Naïve Bayes classifier.

(Multinomial) Naïve Bayes

So, what is a Naïve Bayes classifier? Essentially, it builds off of Bayes’ Rule (pictured above), which, per Wikipedia, does the following:

“[Bayes’ Rule] describes the probability of an event, based on prior knowledge of conditions that might be related to the event.”

The Naïve part of Naïve Bayes is that it assumes independence between words found in a text, which isn’t necessarily true. For example, Naïve Bayes naïvely assumes that if Žižek talked about “Serbs” in a lecture, it would not increase the chance one would also see “Yugoslavia,” when in reality it would.

To generate predictions, Naïve Bayes must first be trained on the examples of Peterson & Žižek’s writing. It needs to learn which words in its vocabulary are the biggest giveaways for Peterson and Žižek, respectively. Once it has such knowledge, if a user provides the AI a text sample, it can infer the probability of the user agreeing with Peterson or Žižek.

For example, if I opine that “Jacques Lacan is an excellent philosopher who has many insightful ideas,” the AI will say my alignment with Žižek is 99%, due to Žižek’s frequent mention of Lacan. Conversely, if I tell the bot that “Every youth should clean their room,” it will be 87% sure that I am a student of the Jordan B. Peterson school of thinking.

Final Thoughts

At the start of this piece, I sought to answer if a user’s writing can tell us where they stand ideologically between Slavoj Žižek or Jordan B Peterson. I believe the AI that I created serves this purpose well, although there are many ways to make it more robust. An interesting next step I plan on investigating is if I can generate an AI that can place you on the political compass, so watch this space!

You can play with the AI at postmodernbot.com, and see my code on GitHub.

Chris Collins is a Data Scientist who enjoys consuming pop culture, sports, and memes in his spare time. Follow him on Twitter (@capn_collins)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store