Interpreting the softening of nanomaterials through gradient plasticity