Tag: training

The Christmas season is upon us and it is the time of year where the scientist is lured to the drinking hole and spends much of the day trying to insulate herself from noises and strong smells. In other words, t’is the season to imbibe.

It was at one such gathering of scientists that we raised the possibility of agility training Athena, based on a video that’s been doing the rounds on Facebook. I was asked if Athena is food-motivated, which made me laugh. My morning routine now involves doing my teeth and checking my emails in the kitchen so Athena will pause to eat instead of running about like a lunatic.

So should I start agility training Athena any time soon, here’s what I think the ranking of her motivations looks like:

Cuddles. Everything and anything will be stopped for the possibility of cuddles.

Play that involves hunting.

Those little Whiskas treat thingies, preferably if she can hunt them.

Ear scratches.

Mr Ducky and Mr Chicken in a non-hunting capacity

Hunting people from underneath the bed.

Dry food (which has the little Whiskas treats in it)

Climbing shelves

Knocking things off shelves

Wet food (not fish).

I think between Mr Ducky and myself we could get Athena round an agility course -until she decided she was bored and needed to paw at someone for affection.

Like this:

Last week I spoke about punishment as a training aid, and denounced the way some people say you should never punish when training.

But it’s very important to recognise that punishment is very dangerous and should be used sparingly.

I really wanted to put this in the last week’s post, but it was getting long enough. So I saved the rest in a draft which WordPress promptly went and lost. Harrumph. It’s difficult enough writing blog posts with Little Miss Princess Paws wanting constant dominion over my hands. (We are still at war over whether the laptop keyboard is a suitable place to sit).

I had written a post about dog aggression and how punishment can be dangerous when used to treat dog aggression, but now I’m faced afresh with a blank page, I think we’ll take a different tact.

Last week we talked about some of the punishments I’ve used for Athena, namely the chilli powder on the cables as positive punishment to stop her from chewing on the wires. I mentioned that the positive punishment wasn’t perceived as coming from me.

This is what I want to talk about today – the effect positive punishment has on the human-animal bond. Positive punishment is aversive, that is to say it presents the animal with a stimulus that it finds unpleasant. If the source of that stimulus is its owner, it can start to associate its owner with the unpleasant stimulus.

Inappropriate dog behaviours such as aggression to people, aggression to dogs, excessive fear and excessive excitement have been significantly associated with owners who use punishment to train their dogs (Hiby et al, 2004). Now this is a survey of owners and doesn’t distinguish between positive and negative punishment in its results. It is by no means saying that punishment causes these behavioural problems in dogs, but that owners who use mainly punishment to train their dogs report more behavioural problems. I find it particularly interesting that separation anxiety was linked with the frequency of punishment-based training methods.

Another survey of dog owners (Herron et al, 2009) asked the owners what kind of punishment they used when trying to modify the dog’s behaviour. The kinds of positive punishment used were:

Striking or kicking the dog

‘Growl’ at the dog

Force the dog to release something from its mouth

The godawful ‘alpha roll’ (adjective mine)

Stare dog down

‘Dominance down’

The ‘grab and shake’ dog.

Now depending on how you do it ‘growl’ at dog and ‘stare dog down’ are not much different than how I signal to an animal that I’m unhappy. Just like I would a child, when an animal is doing something I’m unhappy about my body language changes, I focus on them, and my expression becomes ‘arch’ or angry. This is simply human body language and works remarkably well with both pre-verbal children and animals. It’s held for a very short period and is followed by verbal cues that the individual’s in trouble if it’s not immediately heeded. (Though note it’s not immediately clear how these were defined in the survey or by the respondents).

Some of these other punishments, such as the ‘alpha roll’, have been taken down before. I was first introduced to this technique via the BBC show Dog Borstal and trainer Mic Martin. He used it sparingly, but I remember thinking at the time the show was quick to glamorise and sensationalise the technique. And I don’t think on this blog I need to go into the whole ‘dominance training techniques’ any more.

But the point is that at least 25% of the dogs which received these punishments then went on to show aggression to their owners.

Positive punishment, particularly those which involve you threatening an animal, or posing an animal a threat, present a challenge to the animal. It needs to have the cognitive ability to figure out how to remove that challenge. The idea behind positive punishment is that the challenge will be removed when you stop showing the behaviour you’re showing, but if you threaten too much, you may well provoke another behaviour in response. After all, what human relationship would remain cordial if you started to behave aggressively? After all, much of these positive punishment methods, particularly those detailed in Herron et al, are definitely aggressive.

Used inappropriately, punishment is ineffective, if not downright dangerous. The punishment should be something the animal can control (i.e. Athena can control whether or not to eat the chilli coated wire) and it should not make the animal face some kind of conflict.

In some ways this kind of punishment is a self-fulfilling prophesy. Most normal people don’t go straight to the ‘alpha roll’ for things like stealing a biscuit or chewing on the furniture. A simple ‘no’ or a diversion is usually used. But these more extreme punishments seem more suitable for more dangerous behaviour, things like aggression or serious destruction. But what is it that’s causing these behaviours? Aggression usually comes from an animal feeling challenged by its environment. Aggression is, after all, a tool used for the animal to get its way. Some animals go for that tool more often than others.

When you present this kind of animal with another challenge (from a place where it should feel safe and secure, no less), is it any wonder it uses its favourite tool to try and respond to that challenge?

So yes, positive punishment works when it’s used appropriately, but the inappropriate uses of positive punishment are rife. My handy guide for the non professional?

Make sure the animal has choice in experiencing the positive punishment.

Like this:

Before we start, I’d like to remind you that the opinions expressed in this blog are my own and do not necessarily reflect those of my colleagues.

With that out of the way – I think punishment gets a bad rap. Wait, wait, it’s not what you think! We’re not going into that kind of territory on this blog . . .

Skinner, of Skinner-Box fame, has framed a lot of our thinking about how we train animals. Skinner used the term ‘operant conditioning’ because he believed that the internal motivations weren’t the only things that shaped behaviour – that we learned from our environment, specifically that our behaviours influence the environment and generate consequences, and that we learn from this.

Now, admittedly, Skinner gives internal motivations short thrift. It’s worth pointing out I’ve made a career of measuring the outcome of internal x external motivations and the influence this has on the probability of behaviour. Internal motivations are important, but that’s probably a post for another day. Let’s talk about Skinner and his box first.

A rat in a box. Two levers. One lever, when pressed, gives food. The other lever, when pressed, shocks the rat. Understandably, the rat learns to press lever one and avoid lever two. The environment ‘trains’ the animal to perform certain behaviours.

At this point I’m going to take a short diversion. One of the reasons I’m doing this blog post is to try and get my head around how to teach this in a more effective way, since it always causes student confusion.

Let’s forget about Skinner for a moment and just focus on two things.

The first is ‘reinforcement‘. Whenever you ‘reinforce’ a behaviour, you’re increasing the likelihood of the animal performing the behaviour again. The second is ‘punishment‘. Whenever you ‘punish’ a behaviour, you’re decreasing the likelihood of the animal performing the behaviour.

Going back to the rat in the box. It’s showing two behaviours: it’s pressing lever one a lot, so that behaviour must be being reinforced. It’s not pressing lever two at all, so that behaviour must be being punished.

The question now is how are these behaviours being either reinforced or punished?

We use the words positive and negative to talk about this, but not in a qualitative good/bad way. Instead I think students would find it easier to think of it as ‘additive’ and ‘subtractive’, the only problem with this being that then they wouldn’t be using the same terminology as the rest of the world.

For example:

Positive Reinforcement gives the animal something to encourage the animal to perform the behaviour again. For example, when a dog sits on command it receives a treat. The behaviour being reinforced is the ‘sit’, the treat is the positive addition.

Negative Reinforcement takes something away from the animal to encourage it to perform a behaviour again. The something that we subtract has to be unpleasant for the animal so that they are rewarded by its removal (hence encouraged to do the behaviour again). A common animal example of negative reinforcement is pushing a dog’s bottom to encourage it to sit. When the animal sits (the behaviour we want to reinforce), the aversive stimulus (pushing) is subtracted.

Positive Punishment gives the animal something to discourage the animal from performing the behaviour again. Similar to the above example, in order to discourage the animal the stimulus we are adding should be unpleasant. A common animal example would be jerking the leash of a dog that’s pulling. The pulling is the behaviour we want to punish (decrease), and the leash jerk is the aversive stimulus we add.

Negative Punishment takes away something from the animal to discourage the animal from performing the behaviour again. If you’ve been following along you’ve probably guessed we have to take away something that the animal would want or desire. A common animal example would be a dog that barks when it greets its owner. The owner ignores it (removes the desired attention) and the behaviour decreases.

To further confuse matters however, sometimes these are classed into ‘aversive training‘ which would include negative reinforcement and positive punishment (because the stimulus we talk about in both these cases are aversive, or unpleasant), and ‘reward-based training‘ which includes positive reinforcement and negative punishment (because the stimulus in both these cases is rewarding, or pleasant).

Where it gets really complicated, in my opinion, is where people start to believe that one type of conditioning, or one kind of training, is by far superior to the others. ‘Reward-based’ training is usually the one that most animal welfare people are keen on (for obvious reasons, I should hope!) They cite papers such as Herron et al (2008) which show that confrontational training in dogs increases aggression. This has resulted in something odd where trainers will start saying things like “aggression should never be punished”. In training terms, this means you would never reduce the incidence of aggression being shown!

Positive punishment is the ‘worst’ of the aversive training methods by this thinking – but let me give you an example I’ve been using with Athena. When she arrived she had a terrible habit of chewing electrical cables. It was very worrying. I would scold her with an unpleasant voice (positive punishment!) and I would distract her with toys, but still she would do it. I ended up slathering chilli powder and vaseline over the most attractive cables so when she would start to mouth at the cables, she would receive an immediate aversive stimuli. This is positive punishment, an aversive stimuli used to decrease the occurrence of an undesirable behaviour.

So there is definitely a place for positive punishment – where it’s applied correctly. The chilli powder example works because the aversive stimuli is encountered the moment the undesirable behaviour begins, and stopping the behaviour quickly stops the stimuli presenting itself.

I also use negative punishment with Athena. Sometimes when we’re playing she will want to bite and scratch my hand. When this happens I let my hand go limp and stop playing with her. No matter how hard she bites, I don’t resume play. Play in this case is the reward, and my attention/play is removed when she starts displaying the undesirable behaviour. With this one, something else happens too. When she calms down and behaves gently again, play resumes. The good behaviour is reinforced by adding the desired stimulus (my attention/play) when it is performed. The combination of negative punishment and positive reinforcement here means that even though she’s getting bigger, her playing remains gentle and fun for both of us.

It’s impossible for any animal (humans included) to learn without encountering all four of these aspects. Aversive training is by definition unpleasant, but it can be appropriate to use. Take my positive punishment example. The consequences of Athena continuing the cable chewing behaviour were dire. The aversive stimulus added was relatively mild (and came with warning – I think she only actually chewed a chilli cable once, for the most part the smell was enough to make her decide otherwise), and she had a huge amount of choice about the situation: there were plenty of other things to play with (and she would be rewarded for playing with those other things), the aversive stimulus was well defined (on the actual cable – no real way of accidentally getting the aversive stimulus). Importantly, the punishment wasn’t perceived as coming from me and so our bond and her trust in me was also protected. Finally I only needed to apply the paste once. Now that the behaviour has reduced, we can use an even milder positive punisher (me saying ‘no’ in a loud, stern voice), if she tries to attempt it again.

I am sure no trainer would ever say that the ‘no in a loud, firm voice’ is inhumane, but it is a positive punishment. To say all punishment is bad is to further confuse the operant conditioning theory.

Your final exam, therefore, is to tell me – in the case of the rat with the two levers, how was it being trained? 😉

Edited to add – make sure you read Kathy’s comment below, very insightful!

Gerd Gigerenzer is one of those names in statistics I trust. His discussion of risk is fascinating. Take the example mentioned in the article:

As a doctor, you know the following facts to be true:

The probability that a woman has breast cancer is 1% (“prevalence”)

If a woman has breast cancer, the probability that she tests positive is 90% (“sensitivity”)

If a woman does not have breast cancer, the probability that she nevertheless tests positive is 9% (“false alarm rate”)

When a 50 year old female patient, who has no other symptoms of breast cancer, has a routine mammogram, she tests positive. Alarmed, she asks you what her risk is? Which of the following is the best answer?

nine in 10

eight in 10

one in 10

one in 100

If, like me, you read this at lunch with a box of strawberries with one eye on your MOOC numbers, you probably said ‘nine in ten’. In fact the answer is ‘one in ten’. Why is this the case?

Well first remember that if there are a hundred random women in a room, the prevalence of the disease in the population suggests that one of them will have breast cancer. Second, remember that if we test the same hundred women, we will have nine women testing positive who don’t have the disease, and the woman who does have the disease has a 90% chance of testing positive (meaning that it’s possible she won’t test positive).

So with no other symptoms to go on, and remembering that it’s likely that 10 of our hundred random women would test positive (one because she does have cancer and the other nine because they get false positives), the best estimate of whether this patient has cancer is actually one in ten. She might be the true positive. But nine times out of ten she’s the false positive.

It’s an excellent teaching opportunity and the maths make sense when you think about it, but it’s keeping the populations separate in your head that makes it difficult.

In other news, I picked up Andy Field’s ‘Discovering Statistics Through R’ and I’m really enjoying it so far.

Like this:

A few weeks ago I was swearing at my computer and had to go buy a Twix bar from the canteen to calm myself. There was some frantic chocolate scoffing that afternoon.

The source of my irritation? Statistics. I am not a great wielder of statistical power, but I am very interested in their dark arts. This leads to the common situation where I know I’m doing something wrong, such as using stepwise regressions to build a model, the fact I use frequentist over Bayesian probabilities, and even my over reliance on P Values to communicate scientific results, but I just don’t know how to do it better.

I’m expecting there are three reactions to that sentence. The first is “I don’t have a clue what any of that means”. Don’t worry, my grasp of it is very shaky, and it’s not something I’ve ever been taught. It’s something I’ve discovered through hanging out with statisticians.

The second is “Man, I have that exact same problem, but every time I try and learn how to do it, I can’t figure it out.” My friends we are in the same boat. I do not feel I have enough statistical training to tackle these problems.

And lastly the third kind of person is reading that and thinking “Well obviously the answer is *string of gibberish*”

I have had good stats teachers, but they are sadly few and far between, and there are a lot of poor stats teachers who get in there in the mean time and deeply confuse me. I have a lot of good friends who try to teach me and I end up glazing over. What I mean to say is that the following is not personal – and it’s as much a criticism of myself as those who have tried to teach me . . .

Loads of statistically savvy people are willing to teach, they just don’t seem to get it through to me. So seeing as I’m supposed to be quite good at this education malarky, here’s my guide to teaching me statistics.

Make Sure We’re Speaking a Common Language

Yes, we really have to start with the basics here. Statistical language is incomprehensible to me. And that’s because we’re all taught differently.

As an example, I refer to response variables as ‘y’ and explanatory variables as ‘x’. A good friend of mine refers to explanatory variables as ‘y’ and response variables as ‘a’ or ‘b’. This causes huge confusion whenever we ask one another stats questions off the cuff.

And the common language refers to more than just making sure I understand what your big formulas are saying. This is what the homepage of R looks like. R is a sophisticated and free statistical tool that we should all be using. I’ve seen more intuitive GeoCities layouts. This is written by and for coders and I have to explain how to extract a zip file to some of my colleagues.

Why are you writing your R manual or your page about your fancy new statistical technique? Are you trying to share it with others who think like you? Fine, carry on. Are you trying to improve the statistical techniques used by frustrated, busy scientists who haven’t had more than a few week stats CPD a year?

Use your words.

Now the R Book is a good start for people wanting to learn R but I still wish it was written by Andy Field, who’s Discovering Statistics book is still my favourite bible, even though I don’t use SPSS anymore. If you’ve read both, you’ll see the difference in style is extreme, and I think it’s because, as a social scientist, Field has a better grasp of how people think. (Although speaking of GeoCities sites . . . I still love the book!)

This may seem counterintuitive to what I said further up, but if you’re trying to teach me, say, an alternative method to a stepwise regression, don’t just give me a dataset and tell me the code to run.

Tell me how to arrange my dataset in the way its needed. Ask me questions about my data – get me thinking about the complexities of the experiment I designed. And then tell me the code to run. Don’t forget to walk me through the output. For example, the documentation for the lars package in R explains how I can run a least angle regression on a sample dataset. Great. I can copy and paste that code ad libitum. Can I get it to work on my data? Even though to the best of my knowledge I’ve arranged it in the same way? Nope.

Get me to work through the whole process and you show me where your new method fits into my life.

What’s the Application?

I recently sat through a stats seminar where someone was showing off a new method. In the same presentation they briefly glossed over ternary plots as a way of showing off new data.

Applied scientists work in a world that judges us on the number of papers we produce and the impacts our papers have. That is literally how we get our baseline funding.

I don’t disagree that there are lots of problems with publishing but you’re asking me to relearn how I think about statistics, and then to communicate all this in a real-world paper with real-world data (that doesn’t always play nicely). If you’re asking somebody to use an amazing new technique, you’re asking them to get that past reviewers (who more often than not will not know your new stats).

If you have a great technique but it won’t actually give me a conclusion that I can use to improve animal welfare, then it’s not going to help me. And related to this . . .

What does it Mean?

The truth of the matter is that the statistical tests we commonly use are ‘plug and play’. We get into the habit of checking the things we want to look at noting the laundry list of caveats in a footnote.

Walk me through an example of what my results mean. If you’ve got me using my own data, tell me if this result confirms or denies my hypothesis, show me why, give me some indication of the next step.

I’m amazed at how many people don’t do this when trying to explain stats to me. You’re interested in the method, I get that. I’m fascinated by recording aggression in groups, but there’s a time and a place to discuss this, or just to tell you what aggression means.

Don’t Assume I’m Stupid

I see this all the time when statisticians are trying to teach something to scientists. They spend a very long time on the basics because our fundamentals are so scattered. This is not the most helpful approach. The other method I often see, when I say I don’t understand or even hesitate, the statistician repeats what they’ve said, more slowly and slightly louder.

We’re not stupid. Try teaching us a complex problem in an environment we’re familiar with (i.e. with our own data) and you’ll be surprised how many fundamental skills we’ll pick up because of it. To use a simple analogy, if you wanted to teach me how to maintain a car, wouldn’t you be be better off showing me how to take an engine apart rather than build one from scratch?

Don’t spend half our time explaining the problem to me – I get that there is a problem with the statistics I already use, it’s why I’ve sought you out. Is a finer understanding of the theory really going to help me use this test in future?

Finally – Why Are You Teaching Me?

This blog post sounds very whiny. Trust me, I know.

I know I should have learned all this earlier in my career. I know I should use R every day until I’m fluent. I know I shouldn’t using all these out of date stats. But the sad truth is that I haven’t, I don’t and I can’t.

I want to change, and I need the great community of statisticians to help me. So if you’re a statistician who wants to help me and people like me, this is how I’d suggest doing it.

Like this:

In preparation for our MOOC, we’ve become a little obsessive. Every time I check the student count the numbers go up – we’re currently sitting at a staggering 19,129 students and roughly 6.7% of you have taken part in our little data gathering exercise we’ve sent out on the emails – so a big thank you for that.

At the moment you come from 153 different countries, and you span the age ranges of 13-70+.

We are so excited to meet all of you, and I have a little clip from the Jeanne Marchig YouTube channel of our third VLog.

Let us momentarily leap backwards in time to our English classes. My education contained very little formal grammar training, which may be obvious to the casual reader, but even I know that personal pronouns (e.g. who, he, she, they) are reserved for people. Animal are referred to as objects (e.g. which, it, that).

“The dog which barked” is preferable to “The dog who barked”.

“It is lying in the cat basket” may be preferable to “she is lying in the cat basket”.

This can lead to the English language treating animals very strangely. For example, say you visit a new acquaintance. You know this acquaintance has two cats, Gin and Tonic (this friend might be a bit odd), but you see one cat on the windowsill. You want to know, is that cat Gin or is that cat Tonic? You may ask “What cat is that?” or “Which cat is that?” seeing as you know it is one of two. It would be wrong to say “Who is that?”

Is it problematic to refer to animals as objects? Well first we have to ask if grammar affects the way we think. (And before we go any further I want to tell you that journals on grammar and semantics are almost as impenetrable as journals on molecular genetics)

Boroditsky (2009) investigated the differences in how speakers of English and Mandarin thought about time. In English we speak of time as a horizontal construct (you look ahead to the good times and back on the bad times) whereas in Mandarin time is spoken of in a vertical manner (the paper gives the translated example “what is the year before the year of the tiger?”).

The experiment itself is a bit odd to get your head around, but first they primed English and Mandarin speakers with either vertical or horizontal concepts (i.e. the black worm is ahead of the white worm, the black ball is below the white ball) and then given ‘target’ statements about time ‘March is earlier than April’, ‘March is before April’.

English speakers answered these questions faster after hearing a horizontal prime (similar to how they think of time) and Mandarin speakers answered these questions faster after they had heard a vertical prime (similar to how they think of time). Boroditsky concludes that the way we speak frames the way we perceive the world.

But does this happen in animal welfare? Well I’m not the only one who wondered about this. Gilquin & Jacobs (2006) wrote a paper which is whimsically titled ‘Elephants Who Marry Mice’. They reviewed style standards in various publication manuals. For example, the Guardian’s, which you can find here, says:

animals

pronoun “it” unless gender established

The Guardian also says:

any more

Please do not say “anymore” any more

So I don’t dream of writing a Comment Is Free column anymore.

Unsurprisingly, Gilquin and Jacobs found that it was the familiar animals (horses, dogs, cats, etc.) which scored a ‘who’ more often than the non familiar animals. Furthermore, publications aimed at animal-related interest groups were more likely to use ‘who’, e.g. Dogs Today.

They noted that in general texts or interviews, the personal pronoun was used when the author wanted to garner sympathy for the animal in question. It is “the poor cat who was stuck in a tree” rather than “the cat which was stuck in the tree”.

More interestingly, given some of my other posts on anthropomorphism, 60% of the sentences they found which used the personal pronoun for the animals attributed human-like characteristics to the animals.

Gilquin and Jacobs conclude that ‘who’ is used in English to refer to animals, although inconsistently. They suggest a wider adoption of this grammatical structure might engender more empathy for animals from humans, something which I think reflects what Ganea et al found in their work.

Should animal welfare scientists be calling for the personal pronoun usage?

I really can’t decide. I’m not convinced that it will completely change the way we think about animals. But it’s a nudge you might want to be aware of if you’re talking animal welfare science.

On my morning run I came up with (what I think) is a great idea for one of our MOOC’s interactive sessions. Check out the preview below as I started working out the technicalities in my head. Spoilers? I guess? If you can understand them? Remember to check out our Massive Open Online Course in Animal Behaviour and Welfare which will start in the first week of July. Sign up! It’s free!