It's always the one with the higher score that takes the dominant position. Back in beta I wondered about that, so I made a quick test game, let the AI grow for a while, and when I came in contact, I proposed Protectorate, and I became the protectee, and the AI the protector (took a few tries though, and a few gifts

).
You can tell which end of the treaty you're on by looking at the empires with the "Tariff" option, if all the numbers are zero, you're on the wrong end of the treaty

Can also tell by looking at the scores, although I don't know what would happen if the stronger somehow became the weaker...