  The energy deposited at very forward rapidities (very forward energy) is a
powerful tool for characterising proton fragmentation in pp and p$-$Pb
collisions. The correlation of very forward energy with particle production at
midrapidity provides direct insights into the initial stages and the subsequent
evolution of the collision. Furthermore, the correlation with the production of
particles with large transverse momenta at midrapidity provides information
complementary to the measurements of the underlying event, which are usually
interpreted in the framework of models implementing centrality-dependent
multiple parton interactions.
  Results about very forward energy, measured by the ALICE zero degree
calorimeters (ZDCs), and its dependence on the activity measured at midrapidity
in pp collisions at $\sqrt{s}=13$ TeV and in p$-$Pb collisions at
$\sqrt{s_{\rm{NN}}}=8.16$ TeV are discussed. The measurements performed in pp
collisions are compared with the expectations of three hadronic interaction
event generators: PYTHIA 6 (Perugia 2011 tune), PYTHIA 8 (Monash tune), and
EPOS LHC. These results provide new constraints on the validity of models in
describing the beam remnants at very forward rapidities, where perturbative QCD
cannot be used.
