Hmm, ants aren't too fond of water, I believe. Keeping your compost moist & mixed may help. You can also try spreading the compost out. Get a tarp and put the compost there. It'll make the ants confused and they'll scatter around. After a bit, you can put the compost back in the bin... which you should also make sure is clear of ants.