Episodic cosmic-ray modulation in the heliosphere