Tag Archives: black mirror

Where Black Mirror’s “Hang the DJ” Goes Wrong

Charlie Brooker’s Black Mirror offers an incisive perspective on how the human struggle adapts as technology progresses. The episode, “Hang the DJ,” (HtDJ) is a story about what happens when an algorithm can predict love.

Wait a second … that’s what Nanaya does!

In my last post, I described how the algorithm in HtDJ works. This time, I’ll describe why the HtDJ doesn’t work in terms of the computer science and human psychology, as well as how Nanaya compares to HtDJ.

What HtDJ and its Algorithm Get Wrong

While much of the HtDJ’s app algorithm is feasible to code there’s a lot about it that could be done better, or simply would not work in a reasonable way. For example, the bots in the simulation are exposed to a limited set of interactions.

Real Life is More Complex

Consider that we never see Frank (Joe Cole) go to work, Amy (Georgina Campbell) deal with her parents, Frank deal with Amy’s parents – and so on. We also never see Amy and Frank experience non-monogamy. These sorts of interactions happen in real life and indicate a lot about who people are both in and out of relationships.

To generalize, the characters never dealt with the concept of scarcity, except, notably, the scarcity of time. In the real world one can imagine a scenario if Frank were to come back from work disappointed by not getting a raise. It would inject a real-life interaction into the relationship. Frank is providing less money, a planned vacation may not be taken, and resulting with Amy to also be disappointed and to perhaps harbor resentment for Frank’s middling ambition.

A weak way to resolve this gap without significantly burdening the simulation would be “fabricating” emotional memories based on what the dating app observes from the user in their real life. This could be done by appending to a user’s emotional memory during a non-interacting period (like the bot’s simulated sleep).

Even simpler, and possibly more impactful, is taking time off from relationships. In HtDJ, the user’s bot is paired with another bot immediately after their previous relationship ends. In reality, people learn a lot during durations of singledom as they reflect on who they are and what they want from their next relationship. So, if we assume that the app can accurately evolve people such that they learn from experiences, it really, really needs to model being single.

To add these types of interactions in the simulation would be to fundamentally assume the way in which bot individuality evolves is representative of how a real-life user would evolve.

Modeling Real-Life Dynamics is Tough

There are several reasons why this is essentially impossible. One reason that I’ve already described before on the blog is chaos. Or maybe Ian Malcolm can summarize it:

 

Specifically, a computer simulation describing evolving human behavior is almost guaranteed to diverge dramatically from real-life behavior to the point that artificial patterns of behaviors will emerge leading to significant error.

In other words, if bots in the simulation evolve identically to people in real life – the simulation could still be completely off-base just because someone’s individuality was measured within some standard measurement error. For instance, Amy was scored to be an extrovert with a score of 50±2. If her true, real-life extroversion were actually 52 divergences can be expected. Moreover, because how you define simulated individuality will vary based on convention, there is no fundamentally correct mapping to real-life individuality – the predictive power of such a time-variable approach is significantly limited even if the core nature of the simulation and real life are identical.

As it is unlikely the simulation can accurately describe individuality, interactions, and memory completely, synthetic patterns of interactions and emotions will be created. These synthetic emotions would then be used in the rebellion scoring routine in a manner that would simply not be accurate.

So, if a simulation can’t be expected to model real-life evolution of human behaviors, what’s the value of a system simulating dynamic behavior? I believe that the dynamic modeling is a waste given the vast computation required. In general, it’s highly unlikely that any of HtDJ’s simulations would have rendered graphics and simulate the environment because you would have to write code and pay for processing time that isn’t required to arrive at the solution.

HtDJ’s Similarities to the Nanaya Algorithm

At the core of both algorithms is the notion of matching individuals, evolving their relationships in some manner, and comparing scores of romantic options to determine an optimal solution. No other dating apps do this: only Nanaya in real life and HtDJ’s system in fiction.

Simulated Partners

HtDJ featured a lot of nameless partners that Amy and Frank had. Were these based on real people? Were they made up by the algorithm? I think it’s pretty safe to assume HtDJ picks partners based on who is on the app in your area. However, it’s unclear if the partners it picks are actually those a user might date.

For instance, Frank’s first partner after Amy was not only uninterested in Frank but also didn’t seem to share any compatibility whatsoever. In real life, it’s hard to imagine there would even be a first date between them.

On the other hand, the Nanaya algorithm generates fake partners that are those who you have enough in common with such that you might end up dating but later find an incompatibility with. This approach is not just more realistic but also reduces wasteful computation.

Ultimately the core difference is precisely that HtDJ’s system’s bots exist and evolve in scaled time. If you accept the reasons discussed above, then dynamic simulation of bot individuality is not computational efficient. You will spend a lot of effort simulating the dynamics of relationships in a way that has no bearing on reality. So why bother?

Simulation Decisions

A scoring solution based on static variables is Nanaya’s alternative method. In other words, the Nanaya algorithm uses simple equations to estimate value of a relationship based on the initial conditions of your identity. There would be no point having bots grow and learn in the simulation because it’s just not accurate enough. As soon as it’s not worth it for bots to learn – there’s no point in simulating a timeline!

Now instead of 1,000 timelines, you simulate 5,000, or even 10,000, possible partners in addition to the matched partner. Without timelines and dynamically evolving bots, the “rebellions” in HtDJ are unnecessary and can be simplified to comparing scores from a utility function.

This leads to another key difference. HtDJ’s system only cares about the compatibility with the match for a match score. Nanaya does this but it does two other equally important things. First, it estimates your likelihood of meeting other people you would be compatible with if you choose to not date the prospective or existing partner. Second, it also considers how willing you actually are to settle into a relationship. For instance, a user might have a very compatible match lined up, but what’s does it matter if the user is also content being single?

In summary, Nanaya uses a far simpler way to estimate relationship satisfaction while at the same time does more to account for real-life situations.

 

Black Mirror’s “Hang the DJ” Explained

Even if you haven’t seen it, there’s a pretty good chance you’ve heard of Charlie Brooker’s series, Black Mirror. In its first two seasons, Black Mirror used its standalone episodes to explore the dark side of upcoming and speculative technologies. New seasons, however, have included more uplifting episodes that depicts technology actually helping peoples’ lives such as Emmy-award winning San Junipero’s time traveling lesbian tryst or Season 4’s Hang the DJ (HtDJ).

If you haven’t seen it, you should. Otherwise, the Verge has a decent recap of it here and you can watch the trailer below:

As HtDJ came to an end with its twist ending, it dawned on me: the app in HtDJ is very much like the algorithm behind Nanaya! Nanaya’s algorithm was published during January 2015 and publicized by the New Scientist. Maybe it’s wishful thinking, but just maybe it was one of many different things that  inspired the script.

Nanaya and the system’s algorithm in HtDJ seemed like they had some similarities. But to actually understand what those similarities are I needed to reverse engineer the HtDJ’s algorithm.

This post offers an overview of how the algorithm behind HtDJ’s system and Nanaya work. Next week, I’ll post the issues with the HtDJ. In the following week I’ll post an even more detailed interpretation of how the HtDJ algorithm works.

How HtDJ’s algorithm works

To really evaluate the effectiveness of the HtDJ system, we need to understand a little bit about how the system’s algorithm works. In short, the algorithm creates matches real-life virtual profiles to see which two matches are most likely to lead to a successful relationship, while comparing it to other possible relationships. That’s not too different from how Nanaya works! The figure below shows the general steps of the HtDJ algorithm.



 

But to understand how Nanaya’s and HtDJ’s algorithms are different, we need to go into more detail.

For starters, HtDJ’s algorithm creates 1,000 simulations, each one a timeline starting with a 12-hour date between the real-life matches. These real-life users are represented by bots, like virtual Amy and Frank, in a scaled time simulation. After that first date with their real-life matches, both bots are assigned new relationships with different bots for a different duration. Here, the algorithm can be pretty complex – finding the right pairings that force bots to evolve and react the most.

In this way, the simulation can learn more from each relationship and improve accuracy. For any of this to be realistic, the bots need to accurately represent how the real-life user behaves and changes their behavior based on interactions.

After a series of relationships, a certain condition in the algorithm is reached and “pairing day” arrives. That morning, both real-life matches’ bots are given a final opportunity to meet again.  Interestingly, at least in HtDJ, the coach said both Amy and Frank would be matched with a “perfect match” they didn’t know. Essentially they have a choice: rebel against the system (which could conceivably be not accepting Frank and giving up on relationships!) or accept a random relationship. This choice as presented in HtDJ is something that is evaluated in Nanaya as well.

Ironically, their decision to be paired or rebel is a simulated emotional decision. Every dating service that uses numerical matchmaking or the Nanaya algorithm, which uses economic, modeling, defines a consistent and absolute standard of what is a good match. Typically, a good match is one that’s close in the highly dimensional matchmaking space (read more about that here). But in HtDJ’s algorithm, a good match is one that your simulated bot “feels” really good about. This is a paradigm shift in dating apps – emphasizing the emotional sensation of good than what is abstractly considered to be good.

But again, it’s simulated emotion. The emotional decision needs to be mathematically calculated. Some theory of decision-making needs to have been coded or numerically achieved such that a finite set of parameters can be fed into its machinery to come to a single, binary decision.

So how would you even go about attempting to simulation emotions? That’s:

The complicated part

In each relationship, the bots’ personalities can remember, evolve, and learn based on the experiences they have within the simulation, leading to the variability between timelines as different types and durations of relationships occur in each one.

These bot identities and personalities must be explicitly defined in a way that accounts for what we understand as identity and personality in real-life. For instance, there’s inevitably some parameter like extroversion. Imagine the designers of the app in HtDJ have found a way to relate your phone conversations, cell phone photos, text messages, and even biometric data like heart rate relate to extroversion. By snooping in, the app can find out how extroverted you are in a bar after a long day of work or at a public park on a sunny day.

Going deeper, the algorithm can do more if their ex’s are also users. With more information about their past relationship, it’s possible to start classifying what combinations of identities and circumstances just don’t result in healthy, long-term partnerships.

After some time, the app can build a very rich profile of not just how you’re extroverted but many other traits, values, and how it defines emotions. To account for all aspects of personality needed for the simulation, more than tens of thousands of variables are needed (The Nanaya algorithm on the site uses about 1,000 variables, depending on the user).

But this fabric of identity and emotion has to evolve in the simulation. Otherwise Amy and Frank would have rebelled at the start. To evolve all these parameters, many equations or numerical routines, like based on machine learning algorithm, would have to define how any interaction changes identity and emotion.

Between tens and thousands of variables and non-linear equations that relate them and how they change, there’s a lot of room for error. There’s also a lot of computation required, which runs up server bills!

In the next post, I’ll talk about the impacts of these errors and server bills as I describe the issues in the algorithm and what solutions exist.