Eliminate the potential attacker's element of surprise. Carry your keys in your hand. This helps avoid fumbling in the dark. Keys carried in your fist, one between each pair of fingers, can be used as a weapon. Vary your daily patterns.
Some attackers stalk their victims, knowing just where and when to strike.
Keep them confused. Pay attention to your surroundings. Consider passive resistance. Try talking to your attacker in a calm manner. Report any attack to Public Safety and the residence hall staff member immediately.