I kind of get the feeling that Compton (some or most of it) was Kendrick's sophomore album before he switched gears and recorded what became TPAB. My reasoning for saying that is because Kendrick's camp was saying he was going to be rapping on a lot of Dre beats for his sophomore. Dre was only involved in one track on TPAB ("How Much A Dollar Cost"). Kendrick's camp also said that Kendrick was going to be rapping with more aggression. Kendrick's aggressive on his features on Compton.
I actually remember them saying this and thought it was true when i heard blacker the berry but the album was much calmer than they described it. Though if you remember there was speculation that Dre helped produce the album under a weird alias. Like dragon-something.
looking at the production, there's no TDE producers so that doesn't make sense.
I mean Dahi did Money Trees and that's basically it, it doesn't make sense for him to scrap all the producers and just move with his own dudes and completely different dudes. There would probably be some type of overlapping with the producers.
There is a chance that Dre probably got into the studio with kendrick, they began creating, and dre asked him if he could keep it and the other producers added their input later. They say dre generally creates his beats on the spot with rappers/producers, and makes changes later