I'm not sure of the mechanics of it, but I do know they are super intelligent.
I had a white rat once that I used to let run around my room. I used to call 'ratty!' and it used to come running like a dog. I love rats, I can't understand why they have a bad rep, they're super pets.