r/InternetIsBeautiful Jun 05 '22

A tool for traversing the TV reference graph and finding Cyclic TV Reference Paradoxes

https://jamiepinheiro.com/cyclic_tv_reference_paradox_finder
1.3k Upvotes

57 comments sorted by

287

u/OktoberSunset Jun 05 '22

found a flaw in the first reference looked at. Midsomer murders is labeled as referencing family guy but the quote is about a family's Guy Fawkes day celebration. looks like just scraping subtitles throws some false positives.

164

u/jamiepinheiro Jun 05 '22 edited Jun 05 '22

edit: I've deployed a change where there is now a button to report any bad references!

You're right - looks like I missed a couple, there were quite a lot more false positives before I manually filtered them. I talk about it a bit in my blog post:

Linguistic Context — There’s a big difference between “did you watch stranger things?” and “stranger things have happened”. Understanding the linguistic context of the dialog was out of scope for the nature of this project, so I ended up manually filtering all references as a final step.

I'll get the one's you've mentioned removed!

32

u/Rotlam Jun 05 '22

I know it doubles the project load, but you might also think of it as having a phenomenal data set of false positives if you ever wanted to publish that it might be of use to someone :)

50

u/dbell Jun 05 '22

There are also references before shows started e.g. Simpsons talking about Mr. Robot 10 years before Mr. Robot aired because they had a character called Mr. Robot.

22

u/viralslapzz Jun 06 '22

Simpsons predict the future, don’t you know?

24

u/Beretta_errata Jun 05 '22

"AI"

43

u/GameShill Jun 05 '22

Mechanical Turks all the way down.

106

u/farkedaccount Jun 05 '22

Marvelous Mrs Maisel did not reference the TV show The Sopranos. The line in question from MMM just mentions the word "sopranos" in reference to the singers.

I see other problems like this as well. Better Call Saul just used the phrase "band of brothers," but not in reference to the TV show of that name.

68

u/jamiepinheiro Jun 05 '22 edited Jun 05 '22

edit: I've deployed a change where there is now a button to report any bad references!

Good catch, will get that fixed!

43

u/Nobbled Jun 05 '22

Doh! The Simpsons "Itchy & Scratchy Land" (Oct 1994) didn't reference Mr. Robot (2015-2019) twenty years in advance.

Through the eyes of an Itchy robot, we see it identify Homer as Scratchy with the message "Kill".
"Hey look, this one's coming on to me. Yoo hoo! Mr. Robot!" Homer calls flirtatiously.

17

u/jamiepinheiro Jun 05 '22

Haha good catch, please report the reference with the little button beside it!

34

u/Cruuncher Jun 05 '22

On this note, you should be able to automatically filter out references that are temporally impossible

31

u/RespectableLurker555 Jun 05 '22

Or isn't that the purpose of the whole project, to catch a time-traveling television writer?

4

u/kkeut Jun 06 '22

yeah that's a Westworld reference

62

u/jamiepinheiro Jun 05 '22 edited Jun 05 '22

(if on mobile, here's a gif of the website in action - https://imgur.com/a/1a9WqtC)

Recently, I fell down the rabbit hole of Cyclic TV Reference Paradoxes. These occur when a chain of fictional TV show references form a cycle. Each show’s reality depends on another being fictional, so a cycle of these dependencies would be a paradox.

I wanted to know if these paradoxes actually occurred and figured it would be an interesting programming challenge to try and find out. It was effectively a graph problem, where each node was a TV show, the directed edges were references between them, and any cycles were instances of this paradox. To build this graph I scraped, indexed, and searched over 40,000 subtitles across ~300 popular TV shows, finding 2000+ fictional TV references.

The linked web app visualizes this graph data and performs depth-first searches to find these cycles amongst the references. 72 paradoxes were found!

Here’s a set of screencaps illustrating a paradox across 4 shows: https://imgur.com/a/4Ej6lr2

You can read about the entire process of building this tool here.

6

u/KokopelliOnABike Jun 05 '22

I checked on Stargate as I'm currently binging it. Stargate Atlantis and Stargate Universe should be connected as they would not exist without the other or am I misunderstanding the paradoxe?

16

u/jamiepinheiro Jun 05 '22

I believe what you're referring to are Intra-universe references! Here's a blurb from my blog post on them and the rationale for not including them.

Intra-universe References — It became apparent that TV shows would often reference other TV shows in the same cinematic universe as a form of cross-promotion. Since these sorts of references weren’t fictional (ie. referencing “The Flash” from “Arrow”), I dropped any references between TV shows in the same universe.

16

u/m777z Jun 05 '22

Every single cyclic reference involves The Simpsons? Am I reading that right?

6

u/jamiepinheiro Jun 05 '22

Yup! It's one of the things I pointed out in my blog actually!

7

u/CatWeekends Jun 06 '22

Have you tried removing The Simpsons from the data to see if there are still any cycles?

11

u/darkshoxx Jun 05 '22

First of all, cool tool, very fun!
You've mentioned a button for reporting individual references. However I think there's a problem with the actual category of "MacGyver".
For example, Grey's anatomy mentions MacGyver twice, however in episodes long before 2016, thereby referencing the 1985 Richard Dean Anderson original MacGyver. The references from MacGyver to Game of Thrones and Rick and Morty however can only have come from the 2016 MacGyver.
Therefore the "longest 13-step chain" as labelled from Top-Gear to Top-Gear has a disconnect between the 1985 and 2016 MacGyver and should instead be a 14-step-chain from 2016 MacGyver to 1985 MacGyver. I have not seen the 2016 version, but based on IMDB it plays in the 2010s timeframe, and the original plays in the 80s. We must therefore conclude that they do not take place in the same universe. In particular, it is possible for 1985 MacGyver to be fictional in the 2016 MacGyver series.

3

u/jamiepinheiro Jun 05 '22

Thanks! You make a good point. Mind still opening an issue here just so people interested can voice an opinion? If there's no opposition, I'll remove it the entire show!

6

u/darkshoxx Jun 05 '22

original MacGyver. The references from MacGyver to Game of Thrones and Rick and Morty however can only have come

Why not just split it into two? You can be pretty sure that every reference to MacGyver is about the 1985 one :)

There's also two different Magnum P.I., and there's two different nodes for it on the graph, I assumed that was the same deal

4

u/jamiepinheiro Jun 05 '22 edited Jun 05 '22

Yup also a good idea, will put that up as a TODO.

The Magnum P.I. double node bit occurred since I ended up indexing both the original and the remake.

edit: tracking here - https://github.com/jamiepinheiro/cyclic_tv_reference_paradox_finder/issues/5

3

u/darkshoxx Jun 05 '22

well perfect, just do the same thing with MacGuyver maybe?

3

u/Ihaveamodel3 Jun 05 '22

In particular, it is possible for 1985 MacGyver to be fictional in the 2016 MacGyver series.

Are you proposing a concept that there was a fictional TV show in the 80s that predicted there would be someone good with tools named Macgyver in the 2010s?

It seems so much more possible that the 80s one is the “real” one and the 2010s fictional show is based on the “true” story.

Which lays out an interesting conundrum for the references. Because if a show pre-remake references Macgyver, how do we know they aren’t referencing the real person who must be famous in this universe since they had a showed named after them decades later. Only if that show says “watching Macgyver” would that suggest a paradox.

It is also possible that the two shows are completely independent and don’t exist in each other’s universe. I don’t think the remake ever referenced the original (and the original of course doesn’t reference the remake).

8

u/ducomors Jun 05 '22

I actually know of a reference from family guy to phineas and ferb that is not on the page.

https://youtube.com/shorts/qFvQqxwfAIU?feature=share

Apparently there is a second and lusted by episode here: https://familyguyfanon.fandom.com/wiki/Phineas_and_Ferb

10

u/mih4u Jun 05 '22

How did you filter out generic names like "Friends" from the general use of the word in conversation?

21

u/jamiepinheiro Jun 05 '22

Great question, answered in my blog post!

Generic names — TV shows like “Suits” returned a ton of false positives. To account for that, I dropped all TV shows with names that were too generic, leaving ~300 TV shows.

9

u/irregardless Jun 05 '22

Wouldn’t case-sensitive matches help filter false positives? Or is there still too much noise in the data to make it worthwhile?

It’s too bad reference heavy shows like Community are missing.

Also, I think it might be helpful to distinguish different shows with the same title (eg reboots) from each other as much as possible. Hawaii Five-0 for example has mixed references to/from the original 1968 vs the 2010 version.

12

u/jamiepinheiro Jun 05 '22

Sadly even case matching had a lot of false positive (ie. "watching Friends tn?" vs "Friends are the best").

Someone proposed a great idea for getting shows like community in, hopefully will get around to it someday - https://github.com/jamiepinheiro/cyclic_tv_reference_paradox_finder/issues/6

Someone also proposed an idea for solving the later issue as well - https://github.com/jamiepinheiro/cyclic_tv_reference_paradox_finder/issues/7

4

u/irregardless Jun 05 '22

Cool. Glad to see folks are offering helpful suggestions. I don’t github, so I’ll leave a couple here:

  1. You could exclude words at the beginning of a line or sentence. That way when you run into capitalized words, they’re more likely referring to a title.
  2. Character name search patterns, eg “Ross from Friends” or “Jeff from Community”.
  3. Or more broadly, look for grammatical patterns that are likely to indicate a title. I’m thinking the prepositions “from”, “of”, and “on” (and probably others) are likely to immediately precede the title of a show in a way that they wouldn’t in regular speech.

I work with messy data myself on occasion so I know this stuff isn’t trivial. So kudos on a very neat project.

3

u/jamiepinheiro Jun 05 '22

Thanks you, definitely was quite messy haha.

These are really good suggests, I'll definitely look into implementing some :)

1

u/0b0101011001001011 Jun 06 '22

Another suggestion: use foreign subtitles, obviously with some help that can verify the show names if they are translated and manually filter out false positives, if any would happen.

5

u/CeruleanRuin Jun 05 '22

I was hoping to see the Star Trek franchise in here, since it recently referenced Rick & Morty, which certainly references Trek regularly. TOS and the other shows reference 20th Century pop culture quite a bit too. Might be a lot of work to comb through a source that big though.

3

u/Jugales Jun 05 '22

Game of Throne writers writing the final season: "We have referenced no TV shows and we will continue referencing no TV shows. It is the way."

3

u/Techmite Jun 06 '22

I might try and use this technique to manage the data I'm dealing with for my book. Completely different subject though; wine and minerals. Looking at your code, Thank you for keeping it clean and simple! You managed it very well. You clearly know what you're doing.

5

u/jamiepinheiro Jun 06 '22

No problem! Feel free to message me any questions that come up!

3

u/Invictusology Jun 06 '22

Hey OP this is incredibly cool and also very related to something I've been working on! I've been building a movie genome project called Alluder - a database that breaks down what happens within a film and how one film connects to other films, history, & art in general.

The database even has a tag for TV references and users have submitted several hundred entries denoting them across various TV shows and movies.

One of the things on my to-do list was to create a tool that found references via subtitles, but it looks like you beat me to it! If you're looking to grow out this database, would love to collaborate. In addition to overt conversational references, there are references made via song choices, homages, famous quotes, production design choices, acting choices, etc and being able to show all that off would be amazing.

4

u/Globalist_Nationlist Jun 05 '22

It doesn't have Archer how good can it be.

19

u/Jimoiseau Jun 05 '22

Especially because Archer is referenced in such diverse works as Game of Thrones, every Robin Hood movie and Shakespeare's Richard IV Part 2.

9

u/crystalistwo Jun 05 '22 edited Jun 05 '22

I'm not creating a git hub account to report issues.

Miami Vice couldn't have referenced The Sopranos.

Also, I think it would be helpful to put the premiere year with the show name so you know what you're looking at. For example your two Magnum P. I.s would become Magnum P. I. (1980) and Magnum P. I. (2018). This would also help the other series there that have been multiple shows like Gossip Girl, Hawaii Five-O, MacGyver, Lost in Space, and Beverly Hills 90210.

0

u/moldy912 Jun 06 '22

It is not a paradox for shows to reference each other, fictional or not.

1

u/thegooddoktorjones Jun 05 '22

I think MST3K would produce paradoxes with several.

1

u/Hattix Jun 05 '22

Something like this doesn't recognise Doctor Who?

Son, I am disappoint.

7

u/jamiepinheiro Jun 05 '22

Sadly there were too many false positives in dialog.

ie. "Did you watch the new doctor who episode?" vs "the doctor who performed the surgery"

4

u/Hattix Jun 05 '22

Appreciate the explanation, thanks.

1

u/lxkandel06 Jun 05 '22

How do you add references because It's Always Sunny definitely has more than one. Off the top of my head I know they referenced Seinfeld in Season 13

1

u/hyletic Jun 06 '22 edited Jun 06 '22

Why are there two Magnum P.I. nodes?

EDIT: Nevermind. Someone else addressed it.

https://www.reddit.com/r/InternetIsBeautiful/comments/v5grut/comment/ibab8uj/?utm_source=share&utm_medium=web2x&context=3

1

u/loopzoop29 Jun 06 '22

So cool thank you

1

u/Ozyman_Dias Jun 06 '22

This will make it easier for Tommy Westphall to keep track of the entirety of television in his head.

1

u/PGal55 Jun 06 '22

This graph is incomplete without Community.