what's the formula for "Hostilities with other factions"?
If you're talking about the accessibility penalty, that's a vanilla function so I don't know how it works for sure, but IIRC it's just [% of sum of market size in the sector that belongs to a hostile faction].
Can we got a different alliance system? It's upset that forming a alliance would synchronize player's diplomatic relations with allies, which will negatively affect trade experience. What if there are separate levels of alliance? For high level alliance, player need to help defending all kinds of hostile activities, but for low level alliance, player only help defending invasion while allies have to defend strike and other hostile activities. In the latter case player's diplomatic relations only obtain like a half of influence compare with high level alliance.
Just try to make alliance more useful because at least for me the random influence like suddenly declaring a war is not so pleasure. 
First the quick suggestion: If you really want to both stay in the alliance and not join whatever war happens, use the 'defy vote' option when the war vote dialog appears. That will cost -10 rep with each of your allies if the vote passes, but it can be worth it.
Anyway, for now that's just the basic expectations of alliances, everyone participates in a war if there's a consensus.
I'm also not sure what different alliance tiers in your suggestion supposed to do here, for a couple of reasons:
- Invasions and non-invasion offensive events (raid, blockade, sat bomb) come from the same place anyway, a faction that is hostile to your ally and may or may not be hostile to you, I don't currently have a mechanical concept (or an idea for one) that specifies "will help against invasions but not raids"
- I don't trust any script I could write to correctly judge whether the player is in fact helping their allies against e.g. invasions, or indeed is capable of doing so
(Nor can I easily do something like separate alliance types/votes based on defensive vs. offensive actions (like in something like Stellaris), since for the most part neither the game nor Nex have a concept of who the offensive vs. defensive side is in a war.)
Having typed all that, I'll say that there's a bunch of reasons I've wanted to do like Paradox and make wars a discrete event instead of an assumed state whenever relations are below -50, then I could distinguish different types of wars etc. Definitely not attempting this for next update though, if I ever do; it's a lot of complexity that's in tension with some fundamental assumptions about how the game and modiverse are written.