Wednesday, January 11, 2012

Classical conditioning: do try this at home

In What is classical conditioning? (And why does it matter?), Jason Goldman asks, “Can you think of other real-world examples of classical conditioning?” Dog training, Jason! I can’t believe you missed it — beyond talking about Pavlov, who wasn’t really a dog trainer. How useful is it really to teach a dog to drool?

I used classical conditioning on my dog Jenny a few minutes before writing this post. She is in the process of developing an ear infection, but she hates to have her ears cleaned. I’m using classical conditioning to change her emotional reaction to the ear cleaner from fear or stress to anticipation and enthusiasm.

The unconditional stimulus (UCS) is the ear cleaner. When I show it to her, she has a natural response (fear, demonstrated by her sudden flight from my vicinity). I could pair this UCS (ear cleaner) with a neutral stimulus (a bell). The animal learns to apply its emotional response to the second stimulus (fear of the ear cleaner) to the first stimulus (the bell). In other words, the bell comes to predict the ear cleaner, and eventually, the dog would learn to run away when she heard the bell, as if she were afraid of the bell.

That’s not useful either. What I am doing is pairing something to which Jenny has a positive natural response (cheese) with the ear cleaner. The first thing she sees predicts the second thing, so I show her the ear cleaner first, then give her cheese. Over time, the ear cleaner comes to predict cheese, and eventually she will greet the ear cleaner with the enthusiasm previously reserved for cheddar. Of course, I have to build slowly up to actually cleaning her ears, but after one session she is enthusiastically touching her nose to the bottle when I show it to her instead of leaving the room. I expect the process to take several sessions, so I’m starting before I actually need to clean her ears.

Classical conditioning is also used frequently in behavior modification, to change the emotional response (fear) of dogs to a stimulus (strange people, strange dogs) into a new emotional response (enthusiasm). Again, pairing food with the approach of the stimulus works well, with a sufficiently gradual approach. This counter-conditioning approach is frequently used in the behavioral treatment of dogs who erupt into enraged barking at the sight of other dogs.

It is important to remember that the first stimulus predicts the second. If you get things backwards, you can break your dog! I have heard stories of people teaching their dogs to flee the room upon smelling peanut butter, because peanut butter had been overused as a lure before a variety of unpleasant stimuli (ear cleaning, nail clipping...). So remember, bad thing first, good thing second.

Go, try it if you have trouble cleaning your dog’s ears or clipping their nails!

[ETA: There is some very interesting discussion about the definition of classical conditioning in the comments. -DZ]


  1. My dog Charlie will sit peacefully out on my apartment balcony until any neighbor walks or drives in and then he barks aggressively. My balcony overlooks the car park and entrance area.
    How would I use classical conditioning to counteract this please?
    Is it possible to have him sit calmly without reacting regardless of who enters the parking lot?
    Thanks very much.

    1. Yes, this is exactly the kind of thing counter conditioning is good for. However, if you want to tackle something more difficult than "nail clipping is scary," you will need some training expertise -- not just teaching your dog how to sit expertise, but behavior modification expertise.

      If you want to work on this, I'd recommend getting a trainer who specializes in reactive dogs (dogs who overreact to things), or a behaviorist. Finding a good trainer or good behaviorist can also be challenging, so I would go with someone who is certified: a trainer who is a CPDT, or a behaviorist who is a "DVM, DAVCB" or "CAAB." Realizing the whole "how do find a good partner in dog training" issue is complicated, I'm now intending to write a post about it in the next few days, so watch for that.

      I also recommend the book "Click to Calm" by Emma Parsons for dealing with dogs with this kind of issue.

      Good luck! Let me know if you need more help figuring out how to proceed.

  2. This is good, except the pairing of two stimuli which each have unconditional responses (the ear cleaner and the cheese) does not strictly fit the criteria for classical conditioning, which is the pairing of a neutral stimulus with an unconditional stimulus. Your method sounds more like operant conditioning, in that you are using reinforcement to successively shape a desired behavior. My explainer on operant conditioning will come probably after #scio12.

    1. I will disagree with you here! As you say, operant conditioning entails the animal performing a behavior due to reinforcement. I'm talking about changing the animal's emotional state instead of reinforcing particular behaviors. Reinforcing preferred behaviors is, of course, another method of dealing with unwanted behavior, but it's not the method I'm talking about here.

      Patricia McConnell, a well known PhD behaviorist, has an interesting discussion on "counter classical" conditioning vs operant conditioning on her blog: Counter classical or counter operant?. Looking up "counter" conditioning, I find that it is defined as "Any of a group of conditioning techniques used to replace a negative conditioned response to a stimulus with a positive response." In other words, one may use either classical or operant conditioning in counter conditioning.

      You make a good point that classical conditioning is defined as using a neutral stimulus, and the technique I'm talking about uses a non-neutral stimulus. I hadn't thought about that before. Dog trainers refer to this technique as "classical" conditioning all the time. Maybe they're wrong. But if so, what is it? You are not going to get me to agree that it is operant!

  3. I think it is classical but substitution is occurring. The bottle of ear cleaner is itself neutral. Through prior pairing the dog has learned that a bottle of ear cleaner predicts ear cleaning, and it is this latter thing that is intrinsically unpleasant to the dog, not the bottle of ear cleaner itself. At that point the bottle is no longer neutral but it could become neutral again (if, for example, DZ had simply presented it for many repetitions withOUT following it by actual ear cleaning).

    When cheese treats follow the bottle instead of ear cleaning following the bottle, the dog substitutes a new association for the one that it made earlier.

    Since the bottle itself was never unpleasant EXCEPT by virtue of an association, accomplishing the first stage of Dogzombie's process is straightforward. The challenge for Dogzombie comes when DZ re-introduces the inherently unpleasant event of ear cleaning into the mix.

    This part of the process can be touchier than trainers sometimes think, because on any given set of facts, some dogs take to this stage well and some do not--it depends on HOW unpleasant ear cleaning is to the particular individual. This stage is harder to pull off than just building a new pleasant association with something that was inherently neutral (sight of bottle of cleaner).

    How is training going on the actual cleaning, now?

  4. A clearly-thought through and obviously correct solution to the dilemma; thanks!

    I am embarrassed to admit that I stalled out on counter-conditioning the ear cleaning bottle. I've been focusing instead on getting her more comfortable with other things that are more important (in this case, being able to walk on a leash outside the back yard without collapsing in terror).

  5. Interesting take on classic conditioning. I find that classic works best for things like eliminating on command etc. vs association with ear cleaning. I also believe that what you described is a morph between classic and operant. However, I'm a trainer that believes whatever works! We can talk the "four quandrants" all day long. But, the dogs don't know any better! I do think that by being matter of fact, leashing your dog so that she can't flee and work herself up even more, cleaning the ears, and THEN REWARDING with cheese might be more effective.

  6. Hi, Lisa! Very practical suggestion. I think this is exactly what I would try with any dog but Jenny (it is the approach I have taken with my other dog, Jack, and it worked just fine). But Jenny is so sensitive to aversive experiences that I hesitate to put her through them. Specifically, I think it's important for her to feel that she has control over her world, so I think that restraining her for as long as it would take to clean an ear would do damage to her progress. Right now I'm pondering how I can apply BAT to ear cleaning, as it has been working well for her in other areas. I will report back if I find a good solution.