Recent imaging studies suggest that object knowledge is stored in the brain as a distributed network of many cortical areas. Motivated by these observations, we study a multi-modular associative memory network, whose functional goal is to store patterns with di erent coding levels, i.e., patterns that vary in the number of modules in which they are encoded. We show that in order to accomplish this task, synaptic inputs should be segregated into intra-modular projections and inter-modular projections, with the latter undergoing additional nonlinear dendritic processing. This segregation makes sense anatomically if the inter-modular projections represent distal synaptic connections on apical dendrites. It is then straightforward to show that memories encoded in more modules are more resilient to focal a erent damage. Further hierarchical segregation of inter-modular connections on the dendritic tree improves this resilience, allowing memory retrieval from input to just one of the module...