Most of the time, it seems, AI will attack me because of rival/threat thingy. Basically they jump because they see you as weak, and if things turn to their favor, they demand a province or 2, or something else to fill up the score %.
However, sometimes, AI will attack you for a core province or for a conquest mission, and at those times, it will pretty much refuse ANY peace offer that does not include what they were originally after, but if you manage to prolong the war they will eventually settle for anything, including other provinces/sphere reduction etc, it seems this kicks in sometimes like 5 years after the war had started.