Thanks for Barking 2.0

A number of years ago, I wrote a short blog post for clickertraining.com called How to Get Your Dog to Stop Barking—by Thanking Him for Barking.

Over the years, this post has grown legs. The procedure it describes is often referred to as the "thank you protocol," and sometimes to my embarrassment "Kiki Yablon's thank you protocol," though others have done similar things. (One example that comes to mind for me is Irith Bloom's video called "Click for Barking.")

The original post was very abbreviated; it was written with a word limit, as a quick hit for National Train Your Dog Month. I didn't have room for anything about the reasons I thought it worked, or to go into detail about what I think is actually the most interesting piece, which I sort of tacked on at the end as "extra credit." I've been meaning to expand on both of those things for a while, and I guess today's the day.

The idea occurred to me, not surprisingly, when I was having a problem with my own dog, Pigeon. Our whole back yard is fenced with 6-foot solid wood, but down the gangway is a chain link gate with a view to the street and sidewalk. When Pigeon saw people or other dogs in that narrow window, she would run to the gate and hurl herself at it, barking and snarling. The likely reinforcer for this behavior seemed to be that the people and dogs went away.

Pigeon did similar behavior on walks at the time, but there I was having some success. I was able to get ahead of the behavior--to preempt rather than redirect, and reinforce just looking at the people or other dogs, or at me, or sniffing. But in the yard, unless I stood out in front of the house, I couldn’t tell anyone was coming until Pigeon was already sprinting to the gate. And I also couldn’t control whether the passers-by continued on their merry way, thereby strengthening her behavior. This is often also the case with dogs who bark out of windows or at sounds in the hallway of an apartment building.

I felt like I needed to interrupt this behavior, because it was scary for some of the passers-by and, frankly, embarrassing for me. But my recall wasn’t actually working to call her out of it, and I was a little worried that if it did actually work, I might teach her to bark to get me to call her for treats. Now I would say without hesitation: Great! If I can in fact get her to bark for food instead of to make stuff go away, I’ll be in a good position to use food to reinforce something else.

I gave it a shot anyway. And, fair warning, I was sloppy (call it experimental if you want to be generous), as I often am with my own dog. Rather than plan sessions or brush up on the distance or distraction level on her recall first, I just committed to being outside if Pigeon was outside, with high value food on me, over the course of a summer. My husband also wove some vinyl straps through the chain link, which made it harder to see some things, but couldn’t completely block Pigeon’s view. As soon as Pigeon started to run to the gate, I ran after her and gave my recall cue (a whistle) from literally right behind her. If I got so much as a tense sideways glance, I fed handfuls of Stella and Chewy’s freeze dried patties or boiled chicken.

Pretty soon it became easier for her to look when I whistled, and I was able to fade myself gradually back to the picnic table. So now she was still running toward the gate, and sometimes getting in a few barks--but I could interrupt pretty early in the sequence without getting up off my butt. That alone would have been a vast improvement in our time together in the yard. But it looked to me like she was in fact barking at passers-by to get called back for food, and so I decided to test it: I stopped calling her right away when she barked to see what she would do next. She ran as far as she usually got when I called her, about halfway down the gangway, and when I didn’t whistle, she turned and looked at me. I immediately called her then.

When I saw that, it brought to mind to a grainy old video that I had seen while enrolled in the Karen Pryor Academy, where I started my formal dog training education in 2011 and where I am now faculty. Teaching in a hotel conference room, Pryor used audience members to demonstrate both how cues could serve as conditioned reinforcers to hold together a sequence of behaviors and what happened when one of the cues disappeared. The gist was that when a cue failed to come at the right time, the sequence folded in on itself in a predictable way—the behavior before the missing cue got shorter, and the learner moved along more quickly from it to the next behavior, which was closer to the click and Hershey’s kiss she got at the end of the sequence.

This makes sense to me, because we know that behaviors that are no longer reinforced will weaken ... eventually. We also know that when you are going to stop providing reinforcement for one behavior, you will minimize the problems that vacuum can cause (google “extinction burst”) if you can provide a clear and easy alternative path to reinforcement. If the elevator you normally take upstairs is not coming when you press the button, before your button pressing weakens, you may press more or harder, curse, kick the wall, or call the manager. But if there’s a sign posted saying another elevator down the hall is working, then you may simply walk down the hall and press that button.

When behaviors frequently are cued in a certain order, and one of the cues is too late to reinforce the behavior that came before it, we often see our learners move along to the next behavior down the line. And if that behavior produces the reinforcer, we will often see the learner do that behavior more in place of the one that didn’t work. For instance: people taking beginner dog classes often learn to teach down once their dog has learned to sit. They often practice by cueing sit, then cuing down, then giving their dog a treat. When they are late with that down cue, you will often see the dog go ahead and do the down. People may then give the treat anyway, because the dog did something it was trained to do, even if it wasn’t what was requested. And now they have a dog who lies down when they say “sit.”

While this sort of outcome is bad news in, say, an agility performance, in my case I wanted Pigeon to run and bark less or less intensely, and come back to me faster, when someone passed by the gate (the equivalent of the "sit" cue in the example above). So when I didn’t call her after she ran (the equivalent of being late with the down cue), and Pigeon turned back (the equivalent of lying down anyway), I reinforced deliberately and with gusto. She would take a few steps or look toward the gate, and often didn’t bother with any barking. And she began to look at me more quickly and sometimes start to come my way, and when that happened I moved the reinforcer down the line a little more. You could think of this as a shaping procedure--once you control the reinforcer, you can then reinforce successive approximations starting with behavior that is less intense barking and ending with turning and coming to you.

I think it's possible that in some cases there is some transfer of stimulus control happening--a cue transfer, in training terms. Many of us have used the "new cue, old cue" procedure to add a new signal to a behavior that already has one. If your dog starts coming when they see the trigger, the passer-by, which has routinely and closely preceded the recall cue, could be conceived of as the "new" cue for recall.

Another factor when this procedure is successful may be that passers-by may have come to predict the treats. So the passers-by may have started to elicit some of the same involuntary physiological responses that treats did (though most of those would have been invisible to me), and the fact that the they predicted treats may have made it less reinforcing to Pigeon for them to go away.

Of course all of this may be wrong, or some mechanisms may be in play in some cases where this procedure works, and others in other cases. I'm spitballing here based on my understanding of principles, but haven't tried to rule out one mechanism or the other in any given case.

When I wrote the “quick tip” for clickertraining.com, I glossed over the last part of the process, which actually I find the most interesting, because of the amount of explanation I thought it required. But because many people seem to be trying this on their own now, with only that brief post or secondhand descriptions of it to guide them, I've been feeling like I need to elaborate.

So here are the instructions I now give. They can and should be adjusted for individual situations. And you should have a good observation-informed guess about the purpose and context of your dog's barking--this isn't something I just apply for barking "in general." (For more on how you might decide what to do about barking based on when it happens and its function, see The ABCs of Barking.)

I know that this post so far may feel a bit like reading through three generations of someone’s family history just to get their damn pot roast recipe. But as with cooking, if things aren’t going as expected, it suddenly becomes important to understand not just what the recipe says to do but why. (Sarah Stremming, Marissa Martino, and Lisa Mullinax recently did a very entertaining and informative extended riff on this metaphor.)

Step 1: Preventive Management: Temporarily prevent rehearsal of the behavior as much as possible when you are not actively training or ready to train. For example:

  • For visually stimulated dogs, this may be as simple as closing the blinds. Translucent window film halfway up the window can still let light in and preserve the humans’ view.
  • For dogs who respond to sounds, close windows. Play music or white noise, or run a box fan or window AC.
  • Block access to any window or door where your dog tends to bark using doors or baby gates.

Sometimes, this is enough. If this solves your problem, it's perfectly fine to stop here.

Step 2: Preparation

  • Choose a cue that does not already have a long history of not working to get your dog’s attention or get them to come. “Thank you” may be a good choice because it’s unlikely you’ve said it to your dog, but there’s no magic imbued in those particular words.
  • Prepare some soft, small, highly preferred treats and store them in a location that will become predictable to your dog. This could be a pocket or treat pouch, in which case you are the location. Or it can be a container on a mantle, shelf, or console table. It can also help to have a target like dog bed or mat directly under the container and always deliver the treats there—the predictability makes it easier to know what to do.
  • I like these OXO pop-top containers for this because they are easy to open quickly, and as a bonus, they click!

Step 3: Training Prerequisite Behavior Start when your dog is not already barking, is somewhat attentive to you, and is in the mood for food.

  • Stand or sit near your dog.
  • Give the cue, then dispense 10-15 treats--or go directly to the designated location and dispense them there. Make sure the cue precedes any movement to dispense the treats. It needs to have predictive value.
  • Give the treats one after the other right in front of you if you are the “location,” or scatter them on the mat or bed.
  • Dispense the treats whether your dog comes to you or follows you to the location or not. This is very important, as this is how your dog will learn to go to the location.
  • When the dog starts to look excited upon hearing the cue, you can start to say it when the dog is not already paying attention to you.
  • Continue to deliver the treats reliably if you said the cue, whether your dog has looked or come to you.
  • Practice from different parts of the house. Practice near the window or door where the dog usually barks. Practice with no one outside. Practice several times a day when your dog is not already barking. Practice with distractions that are interesting to your dog but not the things they usually bark at.

Step 4: Reinforcing the Barking (Or, Even Better, Precursors to Barking) When your dog whips around quickly upon hearing the cue and starts to move toward you or the location in anticipation of the treats, begin to work at times when there are things outside that your dog would normally bark at.

  • Give the cue the instant your dog begins to bark, or even better, right when he alerts or starts to move. So: before he starts barking or after just a few barks.
  • If he does not respond, get closer to him before cuing again (or next time), use higher value treats (next time), and practice more near the problem location without the trigger, or with less intense versions of the trigger (e.g., passers-by across the street, known people instead of strangers)
  • When he's responding to the cue with the trigger present, start to increase your distance from the dog again a few steps at a time. Work farther away only when your dog is doing well with you at the current distance.
  • The ideal time to give this cue, once trained, is as soon you see the dog alerting to a sound or starting to go to the window. But because this procedure is best for situations where you can’t get ahead of what your dog is perceiving, it’s likely you’ll be giving it after a bark or three. That’s OK! An initial goal is for the dog to come away from the window to find you on cue after a bark or two at most.
  • Make sure that your dog is perceiving an actual stimulus outside. Don’t thank your dog for barking when you didn’t hear and can’t see anything, or you may create a different barking problem.

Step 5: Moving the Reinforcer Down the Line When your dog is responding rapidly when you cue, or you see that he starts to look at you as if expecting to be thanked after a few barks, test.

  • Don’t call your dog when he first barks.
  • Watch for the dog to turn back to you, or turn away from the window, after the usual amount of barking that he does before you cue him. He is likely to do this after the usual number of barks that you reinforce by calling him.
  • When you see that behavior, immediately cue him! Mark for any movement and reinforce in front of you or at your treat container location.

You may see the barking grow more perfunctory, or that your dog even begins to skip it and just look toward you or move toward you or the treat container. Notice and capitalize on this! Reinforce even tiny movements in the right direction immediately.

For additional thoughts since this post was first published, see Thanks for Barking: Addenda.