A creature attacks alone if it's the only creature declared as an attacker during the declare attackers step. For example, Ancestral Katana's triggered ability won't trigger if you attack with multiple creatures and all but one of them are removed from combat.