I doubt that ads just by themselves are much of a factor (if at all) in the algo. But they can be a decisive factor when your site tripped some sort of a penalty hotwire and a human drone was dispatched to verify what's going on. They are pretty merciless creatures and they would very easily put you in the spam bin as soon as they see two or three considerable size (300x250 and up) ad blocks above the fold and they don't really care what ad network the ads belong to.
AdSense just happens to absolutely dominate most of the niches (except adult of course) and so their ads are always prominent and they get you penalized more likely than some of the other types of ads because the Google human drone's eyes are by now very well trained to AdSense, whereas they may not immediately realize something else is an ad, too, given the 0.1 second they got to judge you. Since they are seeing AdSense ad blocks thousands of times per day, it just immediately trips the "spam" circuitry in their overworked brains.