Stop putting food out for a few weeks; the rats will have to disperse to find food. You'll always have rats visiting the garden, but you don't want them to make it their home, so they need to not see it as a good food source.
When it's time to put food out again, invest in a pole feeder with a conical squirrel baffle (e.g. RSPB website). Make sure the baffle is at least four feet off the ground, and the pole is placed in the open so can't be jumped on from above or the side.
You can also get baffles for bird tables, or to go above feeders which hang from tree branches and the like.
Definitely, definitely buy high quality seed! Pure sunflower hearts are much better than any mix - the birds will eat the lot, whereas mixes usually result in lots of discarded seed. You can fix trays to the bottom of your feeders to catch most of the mess.
(I know this reiterates much of what has already been said, but thought it worth repeating as this is what I've done in the past to deter squirrels and rats - it worked!)