The curvature Qσ of spherically averaged exchange (X) holes ρX,σ(r, u) is one of the crucial variables for the construction of approximations to the exchange-correlation energy of Kohn-Sham theory, the most prominent example being the Becke-Roussel model [A. D. Becke and M. R. Roussel, Phys. Rev. A 39, 3761 (1989)]. Here, we consider the next higher nonzero derivative of the spherically averaged X hole, the fourth-order term Tσ. This variable contains information about the nonlocality of the X hole and we employ it to approximate hybrid functionals, eliminating the sometimes demanding calculation of the exact X energy. The new functional is constructed using machine learning; having identified a physical correlation between Tσ and the nonlocality of the X hole, we employ a neural network to express this relation. While we only modify the X functional of the Perdew-Burke-Ernzerhof functional [Perdew et al., Phys. Rev. Lett. 77, 3865 (1996)], a significant improvement over this method is achieved.