Sensory systems allow animals to detect, process, and respond to their environment. Food abundance is an environmental cue that has profound effects on animal physiology and behavior. Recently, we showed that modulation of longevity in the nematode Caenorhabditis elegans by food abundance is more complex than previously recognized. The responsiveness of the lifespan to changes in food level is determined by specific genes that act by controlling information processing within a neural circuit. Our framework combines genetic analysis, high-throughput quantitative imaging and information theory. Here, we describe how these techniques can be used to characterize any gene that has a physiological relevance to broad-range dietary restriction. Specifically, this workflow is designed to reveal how a gene of interest regulates lifespan under broad-range dietary restriction; then to establish how the expression of the gene varies with food level; and finally, to provide an unbiased quantification of the amount of information conveyed by gene expression about food abundance in the environment. When several genes are examined simultaneously under the context of a neural circuit, this workflow can uncover the coding strategy employed by the circuit.