Characterizing flow fields with neural networks has witnessed a considerable surge in recent years. However, the efficacy of these techniques is typically constrained when applied to high-speed compressible flows, due to the susceptibility of nonphysical oscillations near shock waves. In this work, we focus on a crucial fundamental component of neural networks, the activation functions, to improve the physics-informed neural representations of high-speed compressible flows. We present a novel activation function, namely, the generalized exponential activation function, which has been specifically designed based on the intrinsic characteristics of high-speed compressible flows. Subsequently, the performance of the proposed method is subjected to a comprehensive analysis, encompassing training stability, initialization strategy, and the influence of ancillary components. Finally, a series of representative experiments were conducted to validate the efficacy of the proposed method, including the contact-discontinuity problem, the Sod shock-tube problem, and the converging–diverging nozzle flow problem.