How do we respond to attacks committed by hackers or nation-states who are not influenced by traditional deterrence methods?

The threat of nuclear war and the proliferation of WMD is deterred in part by the idea of mutually assured destruction, not only for the two nations involved in a conflict, but for the larger world. Given that nearly every nation has economic and critical infrastructure dependent on technology, if a nation-state were to engage in cyberwar against a rival, it would demand a physical or cyber response. With that in mind, how can nation-states deter the use of cyberattacks against one another? How do we respond to attacks committed by hackers or nation-states who are not influenced by traditional deterrence methods?