The problem of deterministieally coding a continuous time signal using an ensemble of spike trains is addressed. Coding is defined with an eye toward “efficiency”, defined as a trade-off between the number of spikes in the code and the quality of the code operationalized using the notion of reconstruction error. It is shown that inverting the coding model leads to a reconstruction procedure that amounts to a constrained optimization problem. A class of coding models is considered that makes the coding procedure biologically plausible while at the same time making the reconstruction problem tractable. It is demonstrated that the reconstruction error depends acutely on the coding model. This tight coupling is then used to describe a procedure that learns a coding model of improved efficiency. Experiments on a corpus of voice data validate the strength of our approach.