Puppeteer
Emperor
Do you know if trades are involved in the decision making??
I mean, does the AI attack more when it has to give you GPT in a trade. And does the AI from attacking you when you're giving GPT in a trade??
I'm not sure about before the decision, but it seems pretty clear there are times when the AI has decided to attack you but hadn't declared yet, and after the decision you can't change it. I've actually gotten some cheap tech that way. AI SoD enters my borders for no conceivable reason other than to attack me; I buy all tech I can for huge gpt an only have to pay 1-3 turns before he declares.
I seem to recall thinking if the AI goes bankrupt he declares on you to get out of a gpt deal, but I'm not sure about that, and I may be thinking of Alpha Centauri and not Civ 3. Or maybe it was a gpt for peace deal in which the peace broke with the bank.
(They will also peacefully send their whole freakin' army through your civ to get to a barb camp on one dark tile on the far side of your lands, so look for barbs they may be hunting. On the other hand I've seen them head for an enemy on the other side of me, make peace while they're in the middle of my lands and then figure, hey, while we're here let's start a war with Puppeteer!)