BLOG

Notes from the KAYAC hyper-casual team

Science Worth Knowing for Manipulating Human Behavior

Takashi Hirayama

Hello. I'm Hirayama from the Technology Department.

In this article I'll give a light introduction to the science that helps you manipulate people's behavior: predicting what they'll do and getting them to do what you want. There's no programming in it, but I've flavored it so programmers will find it easy to read.

I say "manipulating people," but if this actually let me manipulate people however I pleased, I'd be richer and higher up the ladder by now. Theory and practice are two different things.

Still, knowing this may take a weight off some of you, and maybe you'll even manage to actually improve something.

It's basically idle chatter, so only stick around if you've got time to kill.

A theory you can use for prediction might also be usable for control

If a theory lets you predict a phenomenon, that theory is useful.

Being able to predict means knowing that "under certain conditions, this will happen in the future." In physics, that corresponds to something like "given initial velocity v0 and position p0, after t seconds it will be at this position, moving at this velocity."

You should then also be able to predict "if this condition changed like so, the result would change like so," and if you can manipulate that condition, you can control the phenomenon too. That's where this is going.

Of the fields of science I know of, these two are the easiest to apply to human behavior:

  • Economics
  • Applied behavior analysis

They provide very handy frameworks for asking "Why did that person behave like that?" Economics applies when you look at people as a group, and applied behavior analysis when you look at them as individuals, which is awfully convenient.

Psychology and related fields could probably be used too, but I don't know much about them.

Economics

Economics comes in many flavors, and I'm an amateur who majored in biotechnology, so I can only give you a rough version, but even a rough version is plenty useful to me.

To put it very roughly, there's a worldview that says "people act in whatever way benefits them."

"What counts as a benefit?" is a surprisingly hard question. If you define benefit as "the amount of money in the long run," it's relatively easy to handle, and that's the field called "classical" economics. But once you're talking about things like "the amount of psychological satisfaction," personality, the mood of the day, human cognitive limits and so on come into play, and things get difficult. I'm an amateur, though, so I don't necessarily need to go there. Just flip it around and see it this way:

"Whatever a person does, they do it because they felt it benefited them"

That alone dramatically changes how the world looks.

  • A person who won't go to study groups feels that not going benefits them.
  • A daughter who doesn't do her homework as soon as she gets home feels that not doing it benefits her.
  • A person who writes messy code feels that writing messy code benefits them.
  • I, who end up playing games until 4 a.m. even though I have work the next day, feel that doing so benefits me.

And so on. Even if your first reaction is "come on, how is that a benefit?", if the behavior is actually happening, you take it as "subjectively, it's a benefit." The trick is not to think in terms of good or bad.

The line "If you say so, then I guess it is. In your head, anyway." used to get quoted a lot online, and this is exactly that. Everything starts with accepting that "in that person's head, it makes sense."

Controlling it

So what should you do if you want to control this, that is, change the behavior?

  • I want them to go to study groups
  • I want her to do her homework
  • I want them to write clean code
  • I want myself to go to bed early when there's work the next day

In cases like these, the answer is clear: manipulate the benefit. There are several ways to do it.

Increase the benefit

How about something like this, for example?

  • Go to the study group and you get sushi
  • Do your homework and you get praised
  • Write clean code and you earn respect
  • Go to bed early and you feel great

If the benefit of a behavior goes up, the chance of that behavior goes up. You may wonder what's so economic about that, but it's the same as how you end up buying something when you're told "Buy now and get a second set free!"

You don't even need economics for this: "the more you want something, the more you'll pay for it." Going to a study group means paying with something equivalent to money, like time or willpower, so it has the same structure as buying. "The price you're willing to pay for something rose because its appeal rose," and as a result you buy it (= act).

Increase the loss

There's also the reverse:

  • Skip the study group and people look down on you
  • Skip your homework and you get scolded
  • Write messy code and you end up crying over the bugs
  • Stay up late and you have a miserable next day, getting no work done at all

These are examples where not doing "the behavior considered desirable" costs you something. If that loss gets bigger, the overall balance should tip toward the desirable behavior. If skipping the desirable behavior costs you nothing, there's little reason to do it.

So if you intervene to make "the loss from not doing the desirable behavior" as big as possible, you can get more of the desirable behavior. But be careful: once you factor in applied behavior analysis, described later, this needs some adjustment.

Reduce the effort

You know how sometimes you've been putting something off because it's a hassle, then you try it on a whim, it turns out surprisingly good, and you keep doing it from then on?

  • Held the study group somewhere nearby, with the door left open
  • Put the homework out on the desk
  • Made clean code easy to write with the editor's autocomplete
  • Started putting away the game console instead of leaving it out

Changes like these reduce the effort needed for the desirable behavior (the last one works the other way: it increases the effort needed for the undesirable behavior). In the study group example, they reduced things like the cost of getting there and the reluctance to open the door when you arrive late. In most cases the desirable behavior has a cost, and nobody wants to pay costs. Even if you know there's a payoff later, even if you know you'll lose out by not acting, paying a cost is unpleasant. So by reducing that cost, you raise the odds that the desirable behavior happens.

To sum up the three:

  • Increase the benefit of doing it
  • Increase the loss from not doing it
  • Reduce the cost of doing it

If you manipulate the situation with these three in mind, you might be able to nudge people's behavior in the direction you want.

At the risk of repeating myself, there's no room here for value judgments like right, wrong, weird or sensible. There's no room for soft-headed sentiments like "an engineer ought to attend study groups" or "of course you do your homework." They cloud your judgment.

The reason someone is behaving that way right now is that, for them, it's rational. It's cleaner to assume that unless the situation changes, the behavior won't. And it's precisely by thinking this way that you arrive at a simple conclusion: just manipulate the conditions so that a different behavior becomes the rational one.

Of course, at the individual level nothing is certain, and some people won't change no matter what you do, but at the group level it's enough for the statistics to shift. For that, a rough way of thinking like this is more useful.

To take an extreme example, if you were told "go to the study group and your salary goes up by 1 million yen," most people would go, right? You just have to find ways to get the same effect at a much lower cost.

Handy concepts in economics

Economics is full of handy concepts, and I highly recommend it. It's a bit of a digression, but here are a few.

Comparative advantage

This is the idea that no matter how good the company president is at coding, the president should run the company and leave the code to someone else.

If the president is better than others at both coding and management, that's "absolute advantage." But if the president is relatively better at management, then even if the employees can't code as well as the president, it's better overall for the employees to write the code. In this case, the employees are said to have a "comparative advantage" in coding. It's not about "who's better or worse in absolute terms," but about "who's more or less cost-effective."

You could call this the theoretical basis for making a living by dividing up work within a company. It's also a comforting theory for people like me: the more faults a person has and the more lopsided their abilities, the more they stand to gain from working together and helping each other in a company.

Note that the example above assumes a president who is good at management. It doesn't apply if the president is a coding god but hopeless at management.

Also, in practice, there are cases where assigning someone less capable drags things down and does real damage, right? You might farm work out to a cheap contractor (= presumably one with a comparative advantage), only for the result to be unusable and have to be redone.

What went wrong in that case? Is the theory of comparative advantage wrong?

No. Not just comparative advantage: all economic theories are approximations. Comparative advantage assumes that "no matter who does it, the result is the same; only the cost differs." If the output differs, it doesn't necessarily hold.

Externalities

Many companies probably have a technical support department that serves multiple projects.

From each project's point of view, the support staff's time doesn't count as a cost to their own project, so there's an incentive to push as much work as possible onto the support department and keep their own project's costs down.

As a result, the technical support department can get overloaded, or work gets done in an order that doesn't match the organization's overall priorities, and the organization as a whole may suffer.

This kind of thing is called an externality. When people can push costs onto others (= the outside), they tend to do it, and the whole ends up worse off. After all, for each individual, it's the rational thing to do.

Economics textbooks often use pollution as an example. A chemical company loses nothing by dumping harmful substances into a river, so it dumps away. People who think nothing of littering are an externality too.

The basic way to deal with externalities is "internalization."

In the technical support example, if each project were charged for the work it requested, you could say the cost had been "internalized." Many companies probably do that.

However, if you overdo it, the incentive to externalize in some other way grows, and things can get even messier. Take team members' overtime, for example. At a company where overtime pay is fixed, there's an inevitable incentive to work team members to the bone. That, too, is "the project pushing costs outside (= onto things that aren't on the books)," so it's externalization. And because it happens inside the team, it's hard to see from outside, which actually makes it worse. In that sense, I suspect things work better if you leave projects some reason to want to hand work to the technical support department.

Externalities do come back to bite you eventually. For example, if you force team members into unpaid overtime, you pay for it in the form of lower productivity. In the long run, it isn't really external at all, but humans aren't smart enough to think that far ahead.

By the way, my daughter is slow to tidy her room, and that's an example of externalization too. If she holds out long enough, a parent does it. She's pushing the cost of tidying onto her parents. How could we internalize it in this case?

One economically straightforward option is to set a fee. Something like "if I tidy up your toys, you owe me 10 yen": "the child pays the parent who does the tidying." Note: this is not a punishment. It simply internalizes the cost, and carries no moral meaning. To me, the key to the economic approach is not letting soft-headed concepts like morality get involved. Far from getting angry, you smile, and when you actually get the money, you say "thank you."

Whether this works is up for debate, though. You hear stories here and there along the lines of "they introduced a fine, people decided it was OK as long as they paid it, and violations went up" (this one, for example). I don't know if it's true.

Marginal cost

This is the cost of producing one more unit of something. For things like bread or cars, which have variable costs such as raw materials and shipping, this "marginal cost" isn't zero. At first, the bigger the factory, the lower the cost per unit, but eventually you hit a limit where the factory can't get any bigger, and the cost starts going up.

But some products have a marginal cost of almost zero. The smartphone games I work on are one example. One more customer doesn't raise the development cost, and barely adds to the distribution load (for example, CDN fees). Products like this share one big characteristic: whatever comes out on top sweeps up a large share of the market.

Why? Because the marginal cost is zero.

If the marginal cost is zero, a single product can take on as many customers as it likes. With products whose marginal cost starts rising at some point, there's a limit to how many customers one product can serve, so some customers flow to other products, but with zero marginal cost that doesn't happen.

Information products like music, games and films are "nearly free to copy once made," so they always have this property. That kind of business is inevitably a gamble, which is truly terrifying.

Now, let's consider the marginal cost of a study group. The cost of preparing doesn't depend on the number of attendees, as long as they fit in the room. But the total benefit (= learning) is proportional to the number of attendees, and the speaker usually gets more satisfaction the more people show up. So to maximize the benefit of a study group, the key is to "secure high-quality content that draws lots of attendees." If the quality is poor, attendance drops, and it's no longer worth the cost of preparing. I've wandered quite far off topic, but I think that to keep a study group running stably, it's better to raise the quality of the talks, even if you have to push yourself a bit. Unless you build up attendance that way first, it slides into an "is there even any point in doing this?" state, and becomes fragile.

You can also expect another effect: "the more participants a study group has, the more satisfied they are." A study group with lots of people usually feels more worthwhile than one with only a few.

The value of a telephone lies in other people having one too, right? Having the only one is pointless. Popular music, popular games, popular study groups and so on carry, on top of their own value, the value of "it's what other people are doing." This is called a network externality. The value comes from "outside the product itself."

"If I go to this study group, that person is always there" is a network externality. In that sense too, I think a study group is easier to keep stable if you first grow its numbers and build up the value of the network externality.

Incidentally, we have something called the "Unity study group" at our company, and since I took over running it, I've been using it as a guinea pig to see whether this theory really works. So far it seems to be going as planned. What happens next, I can't say.

Applied behavior analysis (ABA)

Economics is a discipline that mainly deals with groups. It's a rough argument along the lines of "increase the benefit, increase the loss, cut the effort, and people will drift that way, right?" Whether it works on "this particular person in front of me right now" is pretty uncertain. When it comes to things like "I want my daughter to practice the violin," the target is an individual, so you need a more fine-grained approach.

That's where applied behavior analysis comes in. In full it's Applied Behavior Analysis, or ABA for short.

Antecedence-Behavior-Consequence analysis (ABC analysis)

First, break a behavior and what surrounds it down into 3 elements.

  • The situation preceding the behavior (Antecedence)
  • The behavior (Behavior)
  • The result (Consequence)

Hence the name ABC analysis. In short, it's "in what situation," "did what," and "what happened."

  • A: In the sweets aisle of the supermarket
  • B: Threw a crying tantrum for sweets, and
  • C: Got them

You break it down like that. Then, if the result (C) of the behavior (B) is pleasant for the person, the behavior (B) becomes more frequent. This is called reinforcement.

It's simply "try something, and if something good happens, do it more." You're probably thinking, "Isn't that obvious?" But if you apply it rigorously to every behavior, you start to see all sorts of things.

Some of you may be thinking, "Isn't that the same thing economics says? It's just 'people do what benefits them'." They do overlap to some extent, but there's one decisive difference: it holds "even if the person has no intention of choosing that behavior." Or rather, it doesn't assume anything called "intention" in the first place.

In economics, I get the sense that there's a working assumption along the lines of "people choose a behavior with some kind of intention" (I'm not really sure, though), but applied behavior analysis, partly because it grew out of animal experiments, doesn't assume anything as soft-headed as intention. It doesn't assume reason exists either. Reinforcement happens without the person even being aware of it.

Take the "cry and get sweets" example above. That's a toddler, right? A toddler doesn't cry with sophisticated foresight like "if I cry, I'll get them, so I'll cry." It's on the same level as a conditioned reflex. If you touch a pot and get burned, you're scared of touching pots after that, right? You flinch and pull your hand back even when it isn't hot, but there's no reasoning involved in that moment, is there? The "intentional" decisions economics deals with don't happen on a scale of seconds, but I think you can treat the "behavioral" decisions of applied behavior analysis as happening in under a second. Applied behavior analysis, I suppose, is about predicting and controlling behavior at a level below reason. That's just my understanding, so it may be academically wrong, but that's how it looks to me.

Applied behavior analysis (ABA) in practice

So how do we use this? Its biggest real-world application is probably in educating children with autism, and I, too, learned about it while researching for my own child. In fact, if you search for ABA, almost everything that comes up is related to autism.

You show 2 picture cards, one with an apple and one with a mandarin orange, ask "Which one is the apple?", and if the child picks the apple, you praise them like crazy or give them a treat. Within seconds. A one-second delay drastically weakens the effect. This is how you teach all sorts of things. At the aquarium, they give the dolphins a fish every time they do a trick, right? It's roughly like that.

If something good happens as a result of a behavior, that behavior is reinforced. That is, it becomes more frequent. Those of you who work on AI are probably already making the connection. Reinforcement learning is exactly this, isn't it? The more immediate and powerful the feedback, the faster the learning (and, just the same, it often overfits and stops generalizing).

A typically developing child learns on their own without all that, but there are many things an autistic child can't learn any other way. The causes vary: praise isn't a reward because they don't understand what it means, or a memory issue means they can't connect behavior and result if there's a time gap between them, and so on. Watching an autistic child, you actually start to find typically developing children's powerful ability to learn rather mysterious.

Yet the underlying principle of learning is the same whether a child is typically developing or autistic. When "you do something" and "something good happens," "doing something" is reinforced. It's just that in a typically developing child, reinforcement happens even if the "something good" is weak, and even after a time gap.

You can see where this is going, right? It means it works on the ordinary adult in front of you too.

If someone comes to your study group, make them feel welcome at lightning speed. Within 1 second.

If a colleague makes a good tool, praise them at lightning speed. Within 1 second.

The reinforcement this produces happens below the level of reason, so it leaves no room for weighing pros and cons. You often hear things like "greeting each other feels nice" or "gratitude matters," but to me they look like one technique for putting applied behavior analysis into practice. They're a procedure for reinforcing the other person's desirable behavior, and that's exactly why they have to happen at lightning speed. If you stop to think first, it's too late, so you train yourself to do it by reflex.

Economics is a theory built by constructing mathematical models and approximating, so within that scope it's perfectly correct. But it's only an approximation, so you can't be sure things will actually turn out that way. Applied behavior analysis, on the other hand, looks more like a rule of thumb than a theory. It says "if you understand behavior in these terms, you can predict it, and even control it," and doesn't ask "why." But it's frighteningly powerful.

Negative reinforcement

Addendum, 2/4 22:55: I received a comment pointing out that "negative reinforcement" differs from the academic definition. I plan to fix it, but until then, please take it as "a term used within this article." I'm truly sorry.

So we've seen that desirable behavior can be reinforced with "something good." But often the problem is the opposite: how do you get rid of behavior you don't want?

As with economics, the simple answer is to create a situation where "doing that costs you." In fact, what happens with "tried it" → "something bad happened" is negative reinforcement (also called extinction). The behavior becomes less frequent.

A common example is punishment.

  • Behavior: wrote messy code, and
  • Consequence: got scolded

Getting scolded is a punishment. You try to "extinguish" the undesirable behavior by inflicting the loss that a punishment brings. But this rarely works well, because there are other ways to avoid the punishment.

One is to ignore the scolding. Tune it out. If being scolded no longer feels harmful, negative reinforcement doesn't happen. The one doing the scolding has no choice but to get more intense, but the one being scolded just tunes it out even more, and it turns into a cat-and-mouse game. Eventually it might even escalate to violence. A sad state of affairs.

The other is to find a way to avoid getting scolded that costs less than writing clean code. In this case, for example, if you can dodge code review, you can write messy code without getting scolded. As long as you don't get caught, you're fine!

You may think, "Come on, what kind of person does that?", but people are primates before they're human. Primates are apparently creatures whose specialty is cunning, and I seem to recall a passage in a book by the primatologist 島泰三 (I believe it was Why Is the Thumb Thick? Getting to the Origin of Upright Bipedal Walking) where the author watches his grandchild misbehave and reflects on how very primate it is. I think the gist was something like: the basic primate behavior pattern is to wriggle out of situations by deceiving or fudging. I don't know whether that's true, but I'm certainly like that, and my kid also nonchalantly wipes her food-covered hands on the underside of the table and so on, and I think, yep, a primate all right.

So "negative reinforcement" through punishment invites either escalating punishment or cunning avoidance, and as a result it's unlikely to work.

Punishment also has a much scarier side effect. If the punishment works, the act of punishing gets reinforced in the one doing the punishing.

Suppose you yelled at someone who did sloppy work, and from then on they took their work seriously. That's a success story for yelling. You learn that yelling gets results. In this example, more than a second passes between the yelling and the serious work, so the reinforcement probably isn't that strong, but when the result comes at lightning speed, extremely strong reinforcement takes place.

For example, say a leader tries to speak in a meeting, but the team is chatting among themselves and shows no sign of listening. If the leader bangs the desk and yells, the room probably goes silent in an instant, right?

That's dangerous. Reinforcement happens at lightning speed.

From then on, this leader will probably feel the urge to bang the desk and yell at every opportunity. Reinforcement happens regardless of reason, so it's hard for them to resist that urge. Applied behavior analysis shows us how shaky the naive worldview of "I decide my own behavior" really is.

Reinforcers

In applied behavior analysis, the "something good" you get after doing something is called a "reinforcer." Like the sweets you got after crying, or the words of welcome you heard the moment you showed up at the study group.

There are various kinds of reinforcers, ranked roughly like this in terms of power:

  • Sensory reinforcers, like food
  • Social reinforcers, like being praised
  • Reinforcers that arise inside yourself, like a sense of achievement

The further down the list, the harder it is to establish as a reinforcer, but the more powerful it is. The standard progression is to lure with food at first, gradually shift the balance toward praise, and eventually get them to do it on their own, finding a sense of achievement even when left to themselves.

For a study group, you start by putting out sushi or pizza, gradually shift the balance toward social reinforcers like conversations with other participants and the audience's reaction to a talk, and eventually people reach a self-contained satisfaction. Once most participants reach this stage, you could say the study group is on solid ground.

It's the same with lessons and studying. Lure them into practicing with food, permission to play games or whatever works, praise them to the skies, and steer them until getting better becomes fun in itself and they do it on their own without any prompting. Coding is exactly the same.

Put the other way around, until you reach that point, nothing really comes of it. As long as you only write code when you're paid to, you probably won't become first-rate, and if you can only write code when you're praised, you probably won't become first-rate either. You're free to say "this person just wasn't cut out for it," but I think a big part of it is that "the people around them couldn't give them the support to get that far." It's not just a matter of talent or personality.

Using it on yourself

Applied behavior analysis (ABA) works on others, but it also works on yourself. You could even say that using it on yourself is the best use of all.

Changing yourself is far easier and more reliable than changing others, and as a way to get yourself to "do what you want to do" and "not do what you don't," applied behavior analysis is powerfully effective.

Once you get used to ABC-analyzing your own behavior, you can see yourself objectively, which helps dampen your emotional swings.

It's also useful when working toward big goals that seem to demand effort and willpower. Remember that applied behavior analysis doesn't assume soft-headed concepts like reason or intention. A plan that depends on effort and willpower has already failed. People who get good at something aren't consciously trying hard. Even if they write code 12 hours a day, if for them it blends seamlessly into play, no effort or willpower is needed. How do you set things up to reach that state? As a framework for thinking about that, applied behavior analysis is extremely useful.

What am I even writing about

That ran a bit long, didn't it?

  • For dealing with people as a group, economics
  • For dealing with individuals in fine detail, applied behavior analysis

That's the gist.

Finally, let me sum up what I think matters most when it comes to manipulating people.

  • Don't bring in morality
    • You can't manipulate people with something that soft-headed. Keep a cool head.
    • The moment you use the word "should," you can consider yourself already beaten
    • The same goes for words like "weird / sensible / properly / good / bad"
  • Don't get angry
    • Recognize that anger is an attempt to dominate the other person
    • If the attempt fails, it escalates; if it succeeds, reinforcement makes it escalate anyway
    • The same goes for trying to dominate the other person by crying
  • Negative reinforcement is inefficient
    • "Negative reinforcement" or "extinction" through punishment provokes escalation and avoidance, and doesn't work
    • When manipulating a group, attempts to "increase the cost of the status quo" with threats like "keep this up and we're dead" fail for this reason.
    • It's more effective to reduce the undesirable behavior's relative frequency by "reinforcing a different, desirable behavior."

Now, written in this tone, it all comes across as thoroughly immoral and inhumane, like an affront to humanity itself, but think about it carefully. Don't you think the result of putting it into practice is awfully gentlemanly?

You may think praising someone with an ulterior motive is distasteful, but if you're busy calculating like that, you can't praise within 1 second. Unless "amazing!" genuinely pops straight out of your mouth when you see something good, you can't move the other person. Isn't that what a "good person" is?

People who don't get angry are gentlemanly, right? And people who don't say "you should do this and that" but take a good look at your circumstances are gentlemanly too, right?

I devoured books on applied behavior analysis out of necessity, but lately I've come to see it as "a trial, and an opportunity, for me to grow." I think it has influenced me as much as, if not more than, Adler and Drucker, whom I read a few years ago.

Still, how did I end up writing about this...

I was told the Advent Calendar had empty slots, so I volunteered, planning to write a sequel to the compute shader post, but I worried I couldn't finish the implementation in a day, so I picked a topic I could write about without looking anything up. Before I knew it, this is what came out...

References