Rats definitely do learn to be neglected. They learn that there is a pattern in the household that they follow. When I turn the TV on the rats tend to keep to themselves, when it's off they come out to say hi. They learn when you are busy and when not to disturb you... So yes very affectionate rats actually learn to leave you alone when they think you don't want to play with them. We once adopted a very neglected rat, she was actually a very sweet rat, but she very rarely ever came out to engage us.... she just assumed humans didn't want to be bothered with her.
As to rats actually getting to know you as a person, they very much do, once they realize you are a sentient being they actually make a very detailed study of you and know you much better than you think. This doesn't mean that all rats become affectionate, like the peculiar relative that your parents took in that lives in the basement or attic, some rats do keep to themselves more than others. Although it's unusual, humans an rats can actually get to know each other very well, cohabit and understand each other very well and never get close. Our sweet little girl Max actually became quite reclusive in her older age. She went from a best little buddy to a spoiled brat to an indignant old lady that snorted, flipped you the tail and walked away the instant you weren't about to give her whatever she wanted, she held a grudge and she could sulk for days... She was a brilliant rat, and was very easy to understand and she really understood us very well... she just had a personality that made it hard to like her sometimes.
Best luck