Age verification
Disclosed herein are system, method, and device embodiments for verifying the liveness and age of a user without sharing personal identifiable information of the user. To verify the age of a user, machine learning models running on a user device may use a live self-image of the user as input. The outputs of these machine learning models may be input into a first sub-model of a final machine learning model that uses split inference to run inference until a predetermined layer k. The features at the predetermined layer k of this final machine learning model may be encoded into a one-time age token (OTAT) which is encrypted, time-bound, and submitted to a merchant. The merchant may send this token to an age verification platform that verifies the age of user using a second sub-model of the final machine learning model and the OTAT.
1 . A system for verifying an age of a user, comprising:
a client device comprising a memory and at least one processor coupled to the memory and configured to:
receive an image of a face of the user;
generate a plurality of output values based on the image using a plurality of machine learning models, each machine learning model trained to output a confidence value regarding an attribute related to verifying the age of the user;
generate a feature tensor by inputting the plurality of output values into a first sub-model of a final machine learning model;
generate a one-time age token by encrypting a payload comprising the feature tensor; and
provide the one-time age token to the user; and
a server device comprising a second memory and a second at least one processor coupled to the second memory and configured to:
receive the one-time age token; and
verify the one-time age token and derive an estimated age by inputting the feature tensor into a second sub-model of the final machine learning model, wherein the one-time age token remains valid for a certain amount of time after being generated.
2 . The system of claim 1 , wherein the plurality of machine learning models comprise a first set of machine learning models that detect an image liveness and a second set of machine learning models that estimate the age of the user.
3 . The system of claim 1 , wherein the first sub-model is a first subset of the final machine learning model and is configured to stop inference at a predetermined layer k, and wherein the second sub-model is a second subset of the final machine learning model and is configured to resume inference at the predetermined layer k.
4 . The system of claim 1 , wherein the at least one processor is further configured to generate the one-time age token by (i) performing a key encapsulation mechanism (KEM) using a public key of the server device to generate an encapsulation ciphertext and a shared secret, (ii) deriving a symmetric encryption key from the shared secret, and (iii) encrypting a payload comprising the one-time age token using the symmetric encryption key with authenticated encryption with associated data (AEAD), wherein the second at least one processor is further configured to decapsulate the encapsulation ciphertext using a private key corresponding to the public key to recover the shared secret and decrypt the payload using the symmetric encryption key.
5 . The system of claim 1 , wherein the at least one processor is further configured to encode a merchant code into the one-time age token, and wherein the second at least one processor is further configured to verify that the merchant code in the one-time age token matches a second merchant code received with the one-time age token.
6 . The system of claim 1 , wherein the plurality of machine learning models run in parallel.
7 . The system of claim 1 , the second at least one processor further configured to:
mark the one-time age token as used after verifying the age of the user.