  We build a deep learning framework that connects the local formation process
of dark matter halos to the halo bias. We train a convolutional neural network
(CNN) to predict the final mass and concentration of dark matter halos from the
initial conditions. The CNN is then used as a surrogate model to derive the
response of the halos' mass and concentration to long-wavelength perturbations
in the initial conditions, and consequently the halo bias parameters following
the "response bias" definition. The CNN correctly predicts how the local
properties of dark matter halos respond to changes in the large-scale
environment, despite no explicit knowledge of halo bias being provided during
training. We show that the CNN recovers the known trends for the linear and
second-order density bias parameters $b_1$ and $b_2$, as well as for the local
primordial non-Gaussianity linear bias parameter $b_\phi$. The expected
secondary assembly bias dependence on halo concentration is also recovered by
the CNN: at fixed mass, halo concentration has only a mild impact on $b_1$, but
a strong impact on $b_\phi$. Our framework opens a new window for discovering
which physical aspects of the halo's Lagrangian patch determine assembly bias,
which in turn can inform physical models of halo formation and bias.
