Can you use machine learning to extract the entropy from a hand print reliably?


Let's say that I want to generate a cryptographic key based on my hand (I'm using hands just as an example). What I could do is I scan my hand (so that the friction ridges are apparent) and then use a key derivation algorithm. Problem is that if I want to get the same hash, I have to either store the scan somewhere, or be able to produce the exact same scan, which is not very feasible.

What if instead, we use a machine learning algorithm that takes a scan of a human hand and produces some data, subject to the following constraints:

  • If the same human hand is scanned twice, produce the same data
  • If different human hands are scanned, produce different data
  • Additionally, it should be hard to predict valid outputs of the neural net, other than brute force (so an adversary would either need to be able to generate human hand scan images, or just feed in random data).

One way I thought of doing this was to scan a bunch of hands multiple times, and then train a neural network in such a way that it is punished if it gives different values for hands from the same person, or if two humans get the same hand. Also, you could have another neural network trying to predict whether something is an output of the first one, and the first network is punished if the second one can do so well.

My question is, as this problem been studied before (not necessarily with hands, but producing the same output if two inputs satisfy some equivalence relation).


Posted 2017-11-19T06:05:42.633

Reputation: 97


This is called palmprint recognition and, more generally, biometric authentication. Here's a literature survey: A Survey of Palmprint Recognition.

– Emre – 2017-11-19T18:46:21.130



You are describing a classification problem, where each 'class' is a person. You are trying to learn the hand->person mapping. Having two inputs map to the same output if they are similar enough is exactly what it means to 'classify' an input. The way you're framing your question matches it perfectly with a basic task of machine learning, multi-class classification.

I have no idea if hand recognition software actually works this way - it would need to learn your hand from a single example or a very few, so I expect there is some 1-shot learning sorcery in the mix when used 'in the wild'.

Edit: The adversarial part is particularly interesting. There are techniques for training neural networks to be robust to attacks, for example you might read about Generative Adversarial Networks, where a second network feeds inputs into the first to try to trick it.


Posted 2017-11-19T06:05:42.633

Reputation: 1 938

Would that work though if our training sample does not contain hands from every possible human? I thought for classification problems you needed to know what the 'classes' where ahead of time. – PyRulez – 2017-11-19T06:26:50.480

(Also a nitpick: each 'class' would be hand. My left hand and right hand would different classes, even though they are part of the same person.) – PyRulez – 2017-11-19T06:29:26.133

Good question - one nice thing about neural networks is that you can update them when new training data comes in. I think that instead of coding the targets as 1-hot encodings (for which you would need to know the number of classes), you might represent targets as random vectors in some high-dimensional space (like, each person is mapped to [a,b,c,d] where each element is drawn from the normal distribution). Then your loss function would be how close the prediction was to the actual vector using cosine distance (basically the angle difference). – tom – 2017-11-19T06:32:10.843

So you would train the network to have a bunch of hand-->vector mappings, rather than hand-->1-hot mappings. – tom – 2017-11-19T06:34:15.390

I was kind of thinking that the network would get to choose what vector it wants each hand to get (so that similar hands might have similar vectors, for example). In particular, the network would start random, and then we feed to scans from the same hand into it, and the cost is the difference between the outputs of the scans from the same hand. Eventually, all scans from the same hand would converge to the same value. I suppose giving hands random vectors would work too, though. – PyRulez – 2017-11-19T06:36:22.917

1It sounds like you want basically a 'hash' of a handprint. I think this is how fingerprint scanners work - they look for specific features called 'minutiae' and create some code deterministically. That's all I know about it, but you might look up fingerprint scanning and see if it applies to your question. – tom – 2017-11-19T06:41:25.990