I find that coming up with white lies beforehand works. If you're uncomfortable with lying, think of it this way: if the people in your lives are being inconsiderate enough to force you to socialize, why not be inconsiderate back by being dishonest? Tit for tat, I say. It helped me get through my father's 60th birthday party at this noisy restaurant. I stayed for only an hour, and then was able to excuse myself. Plus, in very large social settings, it's easy to slip in and out unnoticed.
For the most part, I find that letting others think you're a busy person is the trick. You can then get away with only staying somewhere for a small amount of time. In my case, I happen to be a musician, so I simply let others think I'm busier than I really am.
Often, just making an appearance is enough to satisfy people.
_________________
"I'm sorry, I seem to have a tin ear for other people's feelings..." -Naoto Shirogane