Katie Martin / The Atlantic

I will do anything I can to avoid admitting I’m sick. I take a double dose of my usual allergy medication when my nose gets stuffy. I blame my building’s dry heating system for my scratchy throat. I chalk up my lethargy and malaise to the fact that I spend roughly 14 hours a day on the internet.

The one symptom I cannot ignore, however, is my dog’s tiny head, resting on my leg during a portion of the day when she’s usually ignoring me. When she knows, I can no longer pretend I don’t.

Midge, my 12-pound rescue pup, isn’t the world’s most affectionate dog. We get along great, but she has her own hobbies: horrifically dismembering her cute little plush toys, chewing through her chew-proof bed. But as soon as even a mild head cold starts to take hold of me, my dog is transformed. She’s no longer her usual self, jabbing a dagger paw into my ribs to prod me into throwing her ball. Instead, she’s Doctor Midge, Medicine Chihuahua, ready to nurse me back to health by cuddling up against me (or on top of me) at all times.

Although I’m of the firm belief that my dog is a unique and special angel, it’s easy to find tales of other pets comforting or guarding their people during times of illness or injury. I was sick last week, and as Midge was glued to my side, friends told me about their own pets attending to them around the clock after everything from surgery to stomach troubles. (For the record, Midge didn’t care when I sliced my hand open while washing dishes last month.)

According to researchers who study canine cognition, it’s usually not just pet owners’ imagination. Pups really do know when their humans are having a rough time, and they use a rich variety of signals to figure it out. Not only can your pet tell when you have the sniffles, but domestic dogs have shown an aptitude for detecting both much more minute mood fluctuations and far more serious physical conditions.

“Dogs are preternaturally sensitive to changes in their people,” says Alexandra Horowitz, the head of the Horowitz Dog Cognition Lab at Barnard College. “If a person is infected with a virus or bacteria, they will smell different.” Some illnesses change a person’s odor so profoundly that even other people can notice it, but dogs are able to smell changes in their people that would escape human senses, or that are so early on that the sick person barely feels any different. That’s because dogs have exponentially more powerful senses of smell than humans: They can have as many as 300 million olfactory receptors in their nose, as opposed to a paltry 6 million for the average person.

Researchers have also found that a person’s mood, which can be an indicator of a larger illness, triggers a dog’s sense of smell. Human emotions manifest physically in chemosignals that are emitted by the body, and dogs are adept at deciphering those changes.

Beyond smell, dogs also pull information from a person’s voice in order to sense changes. In 2014, researchers discovered that dogs have an area of the brain, similar to one found in humans, that allows them to decipher emotional cues in the tone of a speaker’s voice, beyond what they’d be able to pick up from familiar words alone. That’s why Midge wags her little tail when I excitedly ask her if she’s my boo boo, even though she doesn’t know what that is. (To be fair, neither do I.) A person’s voice can also carry indicators of depression, lethargy, or other bad feelings.

What’s not understood quite so well is what dogs make of these changes. “We’re sending out lots of cues, of just the sort that dogs are specialized in attuning to,” says Horowitz. “Whether they think that it means ‘sickness’ is not clear.” What we perceive as concern on a dog’s part might be more like increased curiosity or suspicion that something is wrong with us, and sticking close by is a great way to glean more information about the situation.

Also, “concern might be vigilance,” says Horowitz. If your pup is worried about your well-being, he or she might turn into the guard dog you never knew you had. In these situations, a dog insists on being the closest living being to you when you’re sick or tries to prevent others from accessing you while you convalesce. Depending on the size and temperament of the dog, that might make keeping a flu patient hydrated a little tricky, but rest assured, Horowitz says, the pup means well.

Over centuries of breeding, domestic pups have become even more finely attuned to humans than they are to any of their fellow dogs. When coupled with their incredible sensory abilities, such an intense connection is potentially an enormous boon to human health. Beyond common seasonal illnesses, some dogs have also shown the ability to accurately detect malaria, Parkinson’s disease, diabetes, and certain types of cancer. And beyond detection, research suggests that dog ownership can have a variety of health and mood benefits in and of itself. Dogs can help people relax, and they can be a comfort to those with autism or those who are dealing with post-traumatic stress.

Among dogs, chihuahuas aren’t known for having an especially acute sense of smell, but they are said to be particularly protective of their owners. Midge has been known to fight the vacuum for my safety. Even if she is more run-of-the-mill house pet than disease-detecting superdog, it feels nice to have a warm little pup fall asleep on your lap, potentially out of concern for your well-being, when you’re feeling cruddy.

In a certain sense, she is helping. Next time she kicks me in the ribs to expel a toy from my hands, I won’t hold it against her.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.