Higher attack does it make it tougher to invade in the same way that higher defense does:
Planet Defense = (Planet Attack + Planet Defense + Invasion Defense Items) * legion bonus
Your chance of succeeding in an invasion is your invasion strength divided by (3 * planet defense strength) as described above, with a minimum of 10% chance to succeed and maximum of 90% chance to succeed.
The main difference is that defense structures protect your population as well, while attack structures damage an attacker when they try to reduce your population. (invasion defense structures don't help or hinder your population, they only affect the actual invasion.)
The wiki has all the formulas here:
http://galaxylegion.com/wiki/index.php/Planetary_Invasion
_________________---------------
GD: A good legion for collecting relic badges ---------------
---------------------------------------------------------------------