To me this "sudden attacking for no reason" sounds like petting aggression.
Cats are weird that way - when you pet them too much they often get overstimulated and then bite or scratch.
They give out signs that they are about to attack (tail flicking, body changes like stiffening of the body, hackles may go up, ears changing position)... and if we are alert we will SEE these warning signs. If we are petting them while not alert (like while watching TV or multitasking) then it will seem like they just went psycho....But when we are alert and immediately
stop the petting at the first sign of this body posture change, then we can usually avoid these attacks....which are normal when cats are overstimulated.
Here's an article on cats that bite - hope it may help