I think it's fair to say when we see a dog with their tail tucked between their legs we know that dog is scared and/or nervous. Most often those dogs are quite sensitive to various sounds and movements. What I don't think most owners are aware of is that dogs that lunge or are aggressive are more sensitive than the scared dogs. This sensitivity has just manifested itself to look differently than the scared dog. By lunging a dog has learned they can create a lot of space around themselves which in turn makes them feel comfortable. The dog that lunges can by hyper sensitive to anyone approaching their space which turns into a big loud display to make themselves look bigger and more intimidating. Instead of the loud display the nervous and scared dog will often use "flight" as their defense to create space to make themselves feel better. In both cases, the dogs feel they must make a decision because it has worked for them at some time in the past. Once they figure out if they keep repeating the process they get what they want, then that behavior can turn into an "auto-pilot" reaction.
If either of these cases sounds like a dog you have it's important to look at your dog's day through their eyes, yes all 24 hours! It might give you a better idea of how and why they think. With dogs that are very sensitive I focus on calming activities like massage, walks, treadmill, or leash handling without commands. To me, the quieter you communicate with a dog like this the better the relationship can become as it's more primal. When dogs communicate there are no commands or treats, just intensity, body language, and eye contact. Go back to working with your dog's instincts and you will end up with a dog that feels more comfortable with their environment.