This question already has an answer here:
Suppose that you have a group of items and you make a hierarchy structure for them. Now, you call this structure, "item hierarchy" or "items hierarchy"?
However, my real phrase is "context hierarchy" vs. "contexts hierarchy"
In general there are some noun-noun constructions which address a group of things. Then the first noun is plural or singular?