We present a graph theoretic model of analysing food web structure called regular equivalence. Regular equivalence is a method for partitioning the species in a food web into "isotrophic classes" that play the same structural roles, even if they are not directly consuming the same prey or if they do not share the same predators. We contrast regular equivalence models, in which two species are members of the same trophic group if they have trophic links to the same set of other trophic groups, with structural equivalence models, in which species are equivalent if they are connected to the exact same other species. Here, the regular equivalence approach is applied to two published food webs: (1) a topological web (Malaysian pitcher plant insect food web) and (2) a carbon-flow web (St. Marks, Florida seagrass ecosystem food web). Regular equivalence produced a more satisfactory set of classes than did the structural approach, grouping basal taxa with other basal taxa and not with top predators. Regular equivalence models provide a way to mathematically formalize trophic position, trophic group and trophic niche. These models are part of a family of models that includes structural models used extensively by ecologists now. Regular equivalence models uncover similarities in trophic roles at a higher level of organization than do the structural models. The approach outlined is useful for measuring the trophic roles of species in food web models, measuring similarity in trophic relations of two or more species, comparing food webs over time and across geographic regions, and aggregating taxa into trophic groups that reduce the complexity of ecosystem feeding relations without obscuring network relationships. In addition, we hope the approach will prove useful in predicting the outcome of predator-prey interactions in experimental studies.