You won’t know you’ve been attacked until after the deed. That’s why it used to be called a “cheap shot”. If you live to regain consciousness, your attackers will be gone. The only safe option is to shoot first in suspicious situations. Think about that one for a while.
Be aware of who is in front of you , behind you, to your sides, etc...
If it’s “yutes” walk around them out of punching range.
If one or more makes a sudden move, then fire away.
Also watch for clenched fists and the “interview” process: “Got a light, know what time it is, got a cigarette? etc...”