ok for now i admit defeat against the pirates ^^
its not like i cant deal with them militarily, its just a huge hassle. ive built a bunch of small-ish escorts with like 90 firepower and just put them all on automatic without being in a fleet. and they respond reasonably fast to raids, but there are just too many damn raids.
If they have no base close to you, they won't raid you.
Bust all bases that you see (at least if you have seen them attack you). If you are attacked, and you know of no base, watch their exit, they probably jump straight for their base. This is easier with long range scanners, but if you have those, it is easy anyways... Then realize that all pirate bases are on a fuel source, so go to galaxy map, show resource (caslon/hydrogen), in the direction where they were heading, and you know your possible targets. Just send some kind of ship to each of those systems (you can queue a refuel order to make them head out of a possibly pirate infested system as soon as possible).
That pirates live on fuel sources is yet another reason to put mines on every single one of them.
And if all else fails, try to steal their galaxy (I believe) or operations map (works but is temporary), and they reveal all their secrets. But to do this, you need to know which group to hunt, so take notes of pirates raiding you.