Imitation as a Deep Learning Technique for Self-Driving Cars


By Dr. Lance B. Eliot, the AI Trends Insider

I was driving on a freeway that I rarely go onto, and the traffic was completely snarled with pure bumper-to-bumper slowness as far as the eye could see. Besides listening to the traffic reports on the radio, my mind was clawing at finding a means to somehow get around or through this freeway road blockage. Didn’t want to get off the freeway, even if it might be faster to get to my destination, mainly because the areas off the freeway are known for high crime rates and best to be avoided. I could maybe sprout wings on my car and try to fly over the thousands of cars, but the sprouting wings are in the same place as my long awaited personal jet pack (hey, I thought we were all supposed to have jet packs by now!).

I noticed up ahead a car that was desperately trying to get from the fast lane all the way over to the upcoming freeway exit. The driver was squeezing into each successive lane to the right, pushing into those lanes and acting nearly like a maniac. I assumed that the driver had suddenly realized that their desired exit was coming and rather than having gradually gotten over to it, the driver was now in a panic. The car barely made it to the exit and I figured that’s the last I would ever see of that crazy car.

To my surprise, in a few minutes, I saw the same exact car up ahead of me on the freeway. What kind of magic trick was this? Did I dream that the car had exited?  Can the driver make their car appear and disappear at will? I was now interested in this particular car. Well, it could also be the boredom of being stuck in inching along traffic. Anyway, I noticed that the car had pushed over into the second lane from the right, thus he wasn’t in the so-called slow lane, and he wasn’t yet in the so-called fast lane. There was an opening in the freeway in that particular lane and I noticed that the driver seemed to have anticipated it would be there.

In this instance, the freeway was bending to the left, and the inner most lanes were now jammed, but that second lane from the right had a clear passage for about a quarter mile. I also looked at my GPS and realized that the prior exit that the car had used was actually both an exit and an entrance onto the freeway. The driver had used it to slip ahead of the rest of the traffic, by entering into it as though exiting the freeway, but then using the extended portion that came back onto the freeway, and got ahead of the rest of the cars on the freeway.

I deduced that this was a driver that knew this freeway well. The driver was aware of the various tricks to get around the traffic bog. One method was to use an exit that was also an entrance, and thus jump ahead of the freeway traffic. Another was to know the bends of the freeway and anticipate whether the inner lanes or outer lanes would be the most likely to have the best flow. I am guessing that the driver probably drove this stretch dozens of times a month and knew the in’s and out’s of it. If you’ve ever seen the famous movie “Groundhog Day” you’ll know what I mean when I say that the driver has studied this over and over, finding ways to optimize their driving journey.

Unless I have mental telepathy, I realized that I would not have any direct means of knowing what that driver knows. There was one thing I could do, though, and that was to imitate the other driver. In other words, follow along and try to do the same things that the other driver is doing, and presumably therefore gain the same advantages. I might not even know why for example that I am suddenly to get into one lane or another, but if I imitate what the other driver is doing then there was a good chance that I too would be optimizing my driving. Would I follow the other driver over a cliff? No, that I wouldn’t do. Anything that the other driver did that seemed legal and reasonable, I was willing to try. It worked out pretty well and I was able to shave a lot of time off my trip.

What does this have to do with self-driving cars?

It has to do with using imitation or mimicry as a deep learning technique for self-driving cars. At the Cybernetic Self-Driving Car Institute, we are researching and putting into practice the use of mimicry for self-driving cars and find that it is a novel and promising approach for improving self-driving car capabilities.

Before we get into the technical details, I’d like to remind you of the quote by Confucius about imitation: “By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest.”

I’ll say right now that imitation is not as easy as it might seem. Yes, you can readily copy what someone else is doing, but if you do so blindly you can end-up in trouble. As mentioned before, I was not going to go over a cliff simply because the other driver went off a cliff. Maybe the other driver knew that going off a cliff was safe to do, or maybe the timing of going off the cliff if done just right would be OK, but on the other hand maybe the other driver made a mistake and going over the cliff was going to lead to their death. With imitation, you need to add judgement, else the end result could be disastrous.

A self-driving car has sensors that allow it to scan the scene around it and detect where other vehicles are. Most of the time, the self-driving car is just trying to avoid hitting those other cars. The AI prevents the self-driving car from switching lanes into another car, or avoids hitting a car up ahead by slowing down the self-driving car. A good self-driving car is also observing other cars to predict what they might do next. If a car to the left of the self-driving car is weaving in and out of its lane, it could be a sign that the driver is drunk. As such, the self-driving car might want to move over to another lane, or attempt to stay behind or get way in front of the suspected drunken driver.

Another perspective on what to do about other cars involves considering imitating them. A self-driving car does this somewhat already by the standard technique of car following. In car following, the self-driving car detects a car directly ahead of it, and then matches the speed and braking of that car. If the car ahead speeds up, the self-driving car speeds up. If the car ahead slows down, the self-driving car slows down. When the car ahead taps its brakes, a good self-driving car will start to tap its brakes too.  This is all a form of imitation, though relatively simplistic.

It is simplistic is several ways. One is that the self-driving car is not especially paying attention to the specific car ahead, but more like any car ahead of it. Thus, if the car ahead suddenly switches to another lane, the algorithm for car following usually just latches onto whatever car is next ahead of the self-driving car. The self-driving car is not tracking the car that was previously ahead of it. That car is now lost among a sea of cars. Instead, the self-driving car is merely spotting whichever car is ahead of it. There is no relationship per se between the self-driving car and that car ahead that was being followed. It was transitory and just being used as a vehicle for car following while in the lane that the self-driving car is in.

What we are doing at our Lab is actually tracking other cars, and using the AI to figure out whether other cars that are on-the-road with the self-driving car might provide some imitation worthy practices that the self-driving car can leverage. We assign labels to all the surrounding cars and then track them for as long as the self-driving car can still spot them. Over time, some of those cars go out of the range of the sensors, and thus the self-driving car assumes they are no longer trackable, but might be tracked again later on.

Those cars that have gone beyond tracking scope can re-enter into the tracking scope. Similar to my story about the car that exited and then came back onto the freeway ahead of me, the self-driving car AI realizes that cars will come and go, and that they might reappear. Sometimes this can be because the other car pulls a stunt like the driver that appeared to exit and came back onto the freeway. In other cases, the other car has gone outside the viable range of the sensors and so it is no longer readily detected. For example, if a car goes past my car at 80 miles per hour, and I am doing 50 miles per hour, it will soon enough get so far ahead of me that no use of my eyes will still see it. Likewise, for a self-driving car, another car can go beyond the range of the cameras and radar, seemingly therefore no longer being trackable.

I think we all know though that cars that go outside our scope can readily come back into our scope. The car that zoomed past me at 80 miles per hour might soon up ahead encounter snarled traffic. The car gets stuck at the back of the pack. I come along at my 50 miles per hour, eventually catching up with that car, and now am at the back of the pack with that same car. The other car was in my scope, then outside my scope, and now back into my scope. A self-driving car can track cars in the same manner, realizing that the cars will enter into and exit from scope, during the driving journey.

How do you know that it was the same car? The obvious approach involves reading the license plate of the other car. This is handy, but often not feasible. The other car might only be seen from a distance or be blocked by other intervening cars. You cannot assume that you’ll always be able to detect the license plate. Just as humans look for other clues, so does the self-driving car. It detects aspects such as the type of car, make and model, color of the car, design and shape of the car, etc.

We also include personalized characteristics such as whether the car has stickers on the back, or a broken tail light, or even if it is muddied and maybe has some prominent dents. Or a roof rack. And so on. Now, admittedly, you can have more than one car that looks the same as another car, and so you need to be cautious in concluding that a car being tracked, once lost, and then seemingly reappears, will indeed be that same exact car. It could be a car that is similar. We use probabilities to assign the likelihood that the same car was the one being tracked.

On my morning commute, I leave my house each day at around the same time and travel on the same streets and freeways to get to work. Over the course of my hour or longer commute, I tend to see many of the same cars, day after day. This is not happenstance. Those cars are presumably trying to get to work in a geographic area roughly the same as me and so it makes sense that they would each day be going along the same overall route. If I leave earlier or later, I tend not to see those cars. It is a window of time that dictates that I see them again and again. I recognize their cars, without paying any attention to their license plates. There’s that bright blue BMW that likes to go fast, and there’s that red Chevy Bolt that holds up traffic. I know them by what they look like.

Notice that I also know those cars by what they do. I’ve observed them over time. I have seen how they drive in traffic. This takes us to the next aspect of imitation for self-driving cars. Besides spotting a car and tracking it, the next aspect involves making sense of the tracking. What is the other car doing? Does it exhibit any patterns of driving?

Once the self-driving car is aware of these other trackable cars, and been identifying patterns of their behavior, the next step involves ascertaining whether there is anything worthwhile to mimic.

We divide imitation into two major categories, tactical imitation and strategic imitation. Let’s take a look at each of these.


In tactical imitation, the AI of the self-driving car is looking for any small sized imitation carveouts that might be worth considering doing.

Here’s some aspects taken into consideration:

a) Specific maneuver

Has the other car been able to do a specific maneuver that might be worth also doing? For example, suppose there is a sharp curve ahead. The car ahead has seemed to be a good driver, and so if the car as it takes the curve hugs the inside of the road, perhaps this is a tactical maneuver that the self-driving car should also do.

b) Contextual memory

The self-driving car maintains a context for the maneuver. For example, the hugging of the inside of the road worked for a particular sharp curve, and so maybe that’s the only circumstance that warrants doing the hug. Realizing the context is crucial to deciding whether to imitate and also when to imitate.

c) Transitory

Cars do lots of things, some stupid, some smart. Tracking of other cars will result in mainly aspects that aren’t worthy of remembering. There is a ton of throw away. It’s those few tidbits that the AI is searching for. When I was on the freeway and saw the car ahead of my get into the second lane from the right and then had an opening, I didn’t also tell you about the dozens of other cars around me that were doing all sorts of twists and turns. The volume of tracking other cars is huge, and you need to have the AI find that worthwhile needle in the haystack.

d) Immediacy

In the tactical use of mimicry, the self-driving car either opts to mimic something that has just occurred or it does not, and the moment then vanishes. In essence, there is a time decay of the mimicking. It’s pretty much a monkey-see and monkey-do kind of situation.  The AI has to work fast enough to ascertain whether the mimicry is worthy and if so whether the time window to do so is still open or not. Keep in mind that it takes time to process the volume of data about the cars around it, and so time is a crucial element in all of this.


In strategic imitation, the AI of the self-driving car is looking for either tactical imitations that might have lifelong value, or larger sized imitation carveouts that might be worth considering doing permanently.

Here’s some aspects taken into consideration:

a) Generalizable maneuvers

Remember that during a tactical mimicry, it’s all about the specific context, such as perhaps the self-driving car mimicked a car that was getting onto the freeway via an onramp and realized that rapid acceleration to the very end of the onramp was a tactic worthy to imitate. This rapid acceleration might work for that particular onramp on that particular day and at that particular time, but then not be viable in any other circumstances.

Or, it might be that doing a rapid acceleration on an onramp until its end would be handy in situations that are befitting that maneuver. The strategic imitation tries to generalize from specific maneuvers and figure out when those maneuvers can otherwise be applied.

b) Larger constructs

In the tactical realm, each maneuver is essentially a standalone. In the strategic realm, the AI is trying to piece together perhaps several maneuvers into a larger picture. When I had seen the driver that went off the freeway and come back on, and then also saw that the driver cleverly got into lane that was going to open up due to a curve, it provided more than just those singular tactics. It provided a pattern of driving behavior about how to make my way through this freeway during crowded times.

c) Saved up for future use

A strategic perspective takes the viewpoint that even if a particular tactic cannot be immediately mimicked, it can be stored for future use. Maybe getting to that exit to come back onto the freeway is out of the reach of the self-driving car when it first witnesses it. But, by remembering it, and upon the next such instance of being on that freeway, it can now mimic that other car, even though that other car is no longer around. It is a delayed learned-mimicry or imitation.


For those that believe in Neurolinguistics Programming (NLP), they are all about modeling your human behavior after the behavior of other people, especially of successful people. That’s kind of what we are trying to do for self-driving cars. Have self-driving cars be able to model their behavior after the behavior of other cars, whether human driven vehicles or other self-driving cars.

There is a theory of other minds which recently in biological studies showed that there are mirror neurons in the ventral pre-motor area of monkeys. It is believed that perhaps these neurons are used to undertake imitation or mimicry. Imitation seems to be a extremely popular behavior among most animals. Humans of course do so.

You might even recall the Charles Caleb Cotton quote: “Imitation is the sincerest form of flattery.” Self-driving cars can improve their capabilities by leveraging what seems to be an innate feature of most living organisms, the ability to imitate. Imitation is not something though done by the foolhardy. Self-driving cars and their AI need to realize that imitating another car that drives off a cliff is not the proper use of mimicry.

This content is originally posted on AI Trends.