Arthur’s conjecture posits a relationship between the Weil group representation equipped with the Lefschetz-$\mathrm{SL}_2$ structure and the automorphic representation occurring in the $L^2$ cohomology of Shimura varieties. One may expect a similar version for torsion coefficients related to the non-generic conditions. In short, it is expected that there is a relationship between the $\mathrm{SL}_2$ action for the parameter corresponding to an automorphic representation and the cohomological degree where it appears. In this thesis, we prove a result about the {\em non-generic} part of the cohomology of certain compact unitary Shimura varieties for good $p$, partially extending a result of Boyer in the case of Harris--Taylor unitary Shimura varieties. Our arguments are different to those of Boyer --- we work in the context of the work of Fargues--Scholze, using ideas introduced by Koshikawa to study the generic part of cohomology. Furthermore, we obtain analogous results for non-compact unitary Shimura varieties of signature $(2,2)$ by combining this approach with global inputs derived from the congruence subgroup property.