Social structure seems to evolve more slowly than morphological adaptations. Shultz and co. tested alternative models of the evolution of social structure in primates and challenge the notion that social structure adapts fluidly to ecological conditions (the ‘socioecological hypothesis’). This fits with the observation that social and behavioral evolution in macaques is also highly constrained by phylogeny.

I wouldn’t go so far as Nick Wade’s summary that this finding suggests genes play a major role as one could imagine a parallel cultural transmission system that would be perfectly confounded with the phylogenetic signal.
So social behavior in primates is uncoupled quite a bit from ecological functioning.
- Shultz Opie Atkinson. 2011. Stepwise evolution of stable sociality in primates. Nature 479: 219–222.