I have to agree that behaviour and dress go a long way. If you can't blend in as a local because of your cultural features at least try and look like you live there.
Move with confidence, don't stand around looking lost with a map in your hand, dress like locals or 'non-touristy'.
For example, it is my second time in Kathmandu and I don't walk around in all trekking clothes like most tourists but jeans and a leather jacket with an normal shoulder bag. I move through the streets with confidence since I know where I am going and, lo and behold, I am amazed the touts leave me nearly completely alone. I imagine this would also have an impact on corrupt police. If they don't have a legitimate claim they would go for targets that seem easily intimidated / shaken.
If I were in a situation where I was clearly not at fault and the bribe that was asked was high, I would insist on contacting my embassy for 'translation' purposes as I don't 'understand' the charges laid against me. All in a friendly and cooperative manner of course.
On the other hand I think it's also important to know when to cut your losses. I got done twice (on the same route) riding a bike without an international license in Bali. The first cop was very straightforward and asked me for approx. $20AUD. I paid and he let me ride on. The second cop was really scary. He seemed prim and proper and went on and on about the massive crime I committed. He never asked for a bribe and I was too afraid to offer one. I wasn't sure if he was indeed corrupt! I could have gotten myself into even deeper trouble.
After 10 minutes of badgering me he got really agitated and started shouting, pulling out the book and telling me to lock up the bike. He was going to take me to the station. So I subtly asked if we could settle the matter in a 'different way'. . . It turns out he did want a bribe, the funny thing is he ended up asking for just $5AUD.
I guess what I am saying is that if they do have a legitimate reason for taking you in, it could be in your best interest to pay a bribe / fine directly. A luxury we don't have in the west.
It's not all bad.