No, compost bins do not attract rats. However, if you add meat or other food scraps to the compost bin, it will attract pests.