I can't confirm this, but when you go to war with a faction, their lords don't immediately hate you unless you besiege a castle, raid one of their villages, execute one of their lords, etc. and I'm pretty sure this determines whether or not they will keep you as a prisoner or execute you.
I believe that if you have low enough relations with a certain lord they will execute you.