Instinctual responses are generally understood to be stored within the genetic material, though I imagine like most anything, there’s a sort of continuous distribution between instinctual and learned behaviors rather than an analog black and white distinction.