In many machine learning applications, the source of the training data can be modeled as an oracle. An oracle has the ability, when presented with an example (query), to give a correct classification. An efficient query learning procedure is to provide the good training data to the oracle at low cost. This paper presents a novel approach for query-based neural network learning. Consider a layered perceptron partially trained for binary classification. The single output neuron is trained to be either a 0 or a 1. A test decision is made by thresholding the output at, say, 1/2. The set of inputs that produce an output of 1/2 forms the classification boundary. We adopted an inversion algorithm for the neural network that allows generation of this boundary. In addition, for each boundary point, we can generate the classification gradient. The gradient provides a useful measure of the steepness of the multidimensional decision surfaces. Using the boundary point and gradient information, conjugate input pairs are generated and presented to an oracle for proper classification. These new data are used to further refine the classification boundary, thereby increasing the classification accuracy. The result can be a significant reduction in the training set cardinality in comparison with, for example, randomly generated data points. An application example to power system security assessment is given.