What is going to constitute an "invalid" up-vote?
There is always going to be an element of counter-culture in a group. If you express that something is bad, there will always be someone to say "oh, it's not as bad as that." So you down-vote, they up-vote. That is the way of things.
So you want to pick out when votes are "valid" expressions of someone's opinion? OtherSome voters have different motivations. The idea that you are going to somehow tell the differnece is folly and dangerous.
But, don't panic. Stack Overflow has a large population of voters. In the end, the overall vote will reflect the substance and quality of the content. There's no need to somehow filter out the small amount of noise in either up-votes or down-votes.