Fall of Empires Function
Details about the Fall of Empires attack method.
def fall_of_empires(honest_vectors, attack_factor=3, negative=False):
if negative:
attack_factor = - attack_factor
return torch.stack(honest_vectors).mean(dim=0).mul(1 - attack_factor)
Inputs
honest_vectors: list - List of honest vectors for processing.
attack_factor: int - Factor controlling the magnitude of the attack vector to be added.
negative: bool - Controls the sign of the attack factor.
Outputs
torch.Tensor - The processed Tensor after applying the Fall of Empires attack.