A binary data transformation apparatus comprising a hash function parameter optimization section that optimizes one or more parameters of a hash function, the hash function parameter optimization section receiving, from a memory, a data set composed of a plurality of items of data each represented by a data point on a space of a preset number of dimensions and transforming the data set into a plurality of items of K-bit-long binary data, using a hash function having the one or more parameters optimized, as each of K number hash functions that transforms the data into a binary representation, based on a value of projection of the data point on a projection vector, K being a preset positive integer, wherein the hash function parameter optimization section includes: a hash function operation unit that, using, as the hash function, a continuous valued hash function including, as a variable, a projection of the data point on the projection vector, finds a hash value, and outputs the hash value to a memory, as continuous valued learning data for binary transformation, wherein the hash function parameter optimization section derives one or more parameters of the hash function that minimizes a cost function defined based at least on a distance of the data points computed using a distance function and on a distance of the continuous valued learning data for binary transformation, as the optimized one or more parameters of the hash function, the distance function being defined as such a one in which, as long as a distance between data points is less than or equal to a preset distance parameter, the value of the distance function preserves the distance, while the value of the distance function decreases if the distance between the data points exceeds the distance parameter, characterized in that the hash function operation section optimizes parameters -> w k and α k, where -> w k is a projection vector, -> representing a vector, and α k is an offset, using, as a k'th (k = 1, ···, K) one of the continuous valued hash functions, a sigmoid function 2 1 + exp − β t w → k T x → − α k − 1 where β (t) is a control parameter of a positive value, t being a number of times of iterations of derivation of the parameters in the hash function parameter optimization section, with β (t) increasing with increase in the number of times of iterations t; superscript T denotes transpose; -> x denotes a data point which is D-dimensional, D being a preset positive integer; and -> w k T-> x denotes a projection of the data point on the projection vector. a hash function operation unit that, using, as the hash function, a continuous valued hash function including, as a variable, a projection of the data point on the projection vector, finds a hash value, and outputs the hash value to a memory, as continuous valued learning data for binary transformation, wherein the hash function parameter optimization section derives one or more parameters of the hash function that minimizes a cost function defined based at least on a distance of the data points computed using a distance function and on a distance of the continuous valued learning data for binary transformation, as the optimized one or more parameters of the hash function, the distance function being defined as such a one in which, as long as a distance between data points is less than or equal to a preset distance parameter, the value of the distance function preserves the distance, while the value of the distance function decreases if the distance between the data points exceeds the distance parameter, characterized in that the hash function operation section optimizes parameters -> w k and α k, where -> w k is a projection vector, -> representing a vector, and α k is an offset, using, as a k'th (k = 1, ···, K) one of the continuous valued hash functions, a sigmoid function 2 1 + exp − β t w → k T x → − α k − 1 where β (t) is a control parameter of a positive value, t being a number of times of iterations of derivation of the parameters in the hash function parameter optimization section, with β (t) increasing with increase in the number of times of iterations t; superscript T denotes transpose; -> x denotes a data point which is D-dimensional, D being a preset positive integer; and -> w k T-> x denotes a projection of the data point on the projection vector. β (t) is a control parameter of a positive value, t being a number of times of iterations of derivation of the parameters in the hash function parameter optimization section, with β (t) increasing with increase in the number of times of iterations t; superscript T denotes transpose; -> x denotes a data point which is D-dimensional, D being a preset positive integer; and -> w k T-> x denotes a projection of the data point on the projection vector.