Taylor Swift has challenged the focus on her former relationships, telling Julia Roberts that her songs can be inspired by ideas, characters, history and imagination—not simply romantic partners.