Aggression tendencies appear explicitly on the Chihuahua's condition list, which is unusual, and the reason is not really genetic.
A hundred-pound guardian that growls at a stranger gets addressed immediately — training, management, professional help. A four-pound dog that does exactly the same thing gets described as feisty and picked up. The behaviour is rehearsed daily, never interrupted, and by three years old it is who the dog is.
The fix is to treat a Chihuahua exactly like a large dog. Socialise it properly from eight weeks — surfaces, noises, calm adult dogs, people of all kinds. Let it walk rather than carrying it everywhere. Do not allow behaviour you would not allow from a Rottweiler.
The Akita gets the opposite treatment and needs the same discipline. Its dog-intolerance, frequently same-sex, typically arrives at social maturity around two years old in a dog that was fine as a puppy, which means socialisation has to continue well past the first year.
Both breeds rate 2/5 with strangers. Only one of them is routinely excused for it.