High harmonic generation (HHG) is one of the richest processes in strong-field physics. It allows to up-convert laser light from the infrared domain into the extreme-ultraviolet or even soft x-rays, that can be synthesized into laser pulses as short as tens of attoseconds. The exact simulation of such highly non-linear and non-perturbative process requires to couple the laser-driven wavepacket dynamics given by the three-dimensional time-dependent Schrödinger equation (3D-TDSE) with the Maxwell equations to account for macroscopic propagation. Such calculations are extremely demanding, well beyond the state-of-the-art computational capabilities, and approximations, such as the strong field approximation, need to be used. In this work we show that the use of machine learning, in particular deep neural networks, allows to simulate macroscopic HHG within the 3D-TDSE, revealing hidden signatures in the attosecond pulse emission that are neglected in the standard approximations. Our HHG method assisted by artificial intelligence is particularly suited to simulate the generation of soft x-ray structured attosecond pulses.