Taylor Swift has compared songwriting to being haunted because she can't always explain her inspiration.