We present a computational method to link structure and function in neural circuits A series of circuit models with increasing complexity was devised for the retina Models progressively performed better in predicting ganglion cell visual responses Models correctly inferred inner structure of the retina from ganglion cell function