In a lot of my games I get well ahead (ok way ahead) in techs and am getting to the spaceship building stage. All is great except that the Ai civs (and usually on one in particular) start sending spys to steal techs off me to then pass to all the other civs. 
Does anyone know of a workable way of preventing spys from keep doing this - other than sealing borders where possible or trying to expel spys (not easy when I have railroads everywhere and the offending spy can dash anywhere instantly).
It's frustrating watching my tech lead disappear.
(edited to correct spelling)

Does anyone know of a workable way of preventing spys from keep doing this - other than sealing borders where possible or trying to expel spys (not easy when I have railroads everywhere and the offending spy can dash anywhere instantly).
It's frustrating watching my tech lead disappear.

(edited to correct spelling)