A fundamental challenge for humans—and other animals—is to survive in response to a natural diversity of dangers. Here, we provide a new perspective called Adaptive Threat Coding (ATC), where human defensive behavior is constructed in response to sensory, inferential, internal and subjective states that facilitate survival in a multidimensional landscape of danger. In humans, these states are guided by culture and social norms that influence the defensive response (e.g., avoidance of shame). The ATC model proposes that two contiguous survival strategies emerge: generalization, which is associated with representations that have high dimensionality and which furnish flexible cognitive heuristics (including efficient perceptual and conceptual representations, relations between threats, higher-order imagination, memory) and which converge through the construction of defensive states and via transfer learning. These representations support generalization and ‘explorative’ behaviors including information seeking and curiosity, where the goal is to increase situational awareness that can be used to mitigate current and future threat. Conversely, specialization entails lower dimensional representations, which underpin specialized, ‘exploitative’ behaviors. This specialization facilitates the economic execution of defensive behaviors, that are generated through a combination of learning and innate configuration. We finally propose that systems implicated in specialization and generalization coalesce through active inference and learning—and that this captures a central adaptive feature of human defensive systems; namely, self-preservation in response to a mélange of threats across diverse ecologies.