When you are part of more than one guild, each guild applies an experience penalty to the other guild(s) you are a member of based on the abilities you get from the guilds.
The penalties largely come from A/D, but also from the other guild abilities:
Thieving, Backstabbing, Critical Hit, Multi Swing, Fighting, Perception
The penalty is based on how powerful the abilities provided by a guild are relative to your total abilities. Guilds like Ninja & Villain contribute skills in a wide variety of areas, so tend to suffer less from penalties, but inflict worse penalties on other guilds.
Spell power is not included as an ability that induces penalties, so spellcasting guilds tend to give very small penalties to other guilds, and also suffer from high penalties from other guilds.
Penalties maximise at 1.5, which requires a character to get 150% extra experience than normal to level.
Since penalties come largely from A/D, taking artisan beyond level 30 is not recommended, because it provides very little in the way of character skills, and gives any other guilds a high penalty.
When a character gains levels in one guild, it increases the penalty
on other guilds. The increase in penalty is applied retroactively
to the experience the character needed to gain its currently level as
well as to the experience required to gain subsequent levels.
e.g.(Using made up figures) 30 sorceror/28 ninja requires 7,000XP to get to level 31 in sorceror. The character now levels ninja up to 60 increasing the penalty on sorceror from .15 to .41. This penalty increase is applied to the XP required for the previous 30 levels the sorceror has gained, and now the XP required is 90,000.
This means that there is no avoiding penalties, as they will get you in the end - but if you plan to level a guild just to get minimum spell costs, then do that early on, then level other non-spellcasting guilds later on so that you will not suffer from penalties.