  Strong gravitational lensing is a promising way of uncovering the nature of
dark matter, by finding perturbations to images that cannot be well accounted
for by modeling the lens galaxy without additional structure, be it subhalos
(smaller halos within the smooth lens) or line-of-sight (LOS) halos. We present
results attempting to infer the presence of substructure from images without
requiring an intermediate step in which a smooth model has to be subtracted,
using a simple convolutional neural network (CNN). We find that the network is
only able to infer the presence of subhalos with $>75\%$ accuracy when they
have masses of $\geq 5 \times 10^9$M$_{\odot}$ if they lie within the main lens
galaxy. Since less massive foreground LOS halos can have the same effect as
higher mass subhalos, the CNN can probe lower masses in the halo mass function.
The accuracy does not improve significantly if we add a population of less
massive subhalos. With the expectation of experiments such as HST and Euclid
yielding thousands of high-quality strong lensing images in the next years,
having a way of analyzing images quickly to identify candidates that merit
further analysis to determine individual subhalo properties while preventing
extensive resources being used for images that would yield null detections
could be very useful. By understanding the sensitivity as a function of
substructure mass, non-detections could be combined with the information from
images with substructure to constrain the cold dark matter scenario, in
particular if the sensitivity can be pushed to lower masses.
