A computer-implemented method for improving security of a biometrics-based authentication system, comprising: receiving, by one or more servers, enrolled biometric samples of an enrolled user during an enrollment stage of the biometrics-based authentication system; applying, using a projection deep neural network, a first function f(·) to the enrolled biometric samples, x i, to generate a first enrolled biometric template f(x i) and to project the enrolled biometric samples, x i, to a common embedding subspace; creating, by the one or more servers, augmented biometric samples by adding learned perturbations to the enrolled biometric samples of the enrolled user; receiving, by the one or more servers, during a request for authentication, submitted biometric samples from a second user purporting to be the enrolled user; applying, using the projection deep neural network, the first function f(·) to the submitted biometric samples, x', to generate a first submitted biometric template f(x') and to project the submitted biometric samples, x', to the common embedding subspace; comparing, by the one or more servers, the submitted biometric samples of the second user to the enrolled biometric samples and to the augmented biometric samples of the enrolled user based on predefined metrics, wherein the comparing comprises computing a distance in the common embedding subspace between the first enrolled biometric template f(x i) and the first submitted biometric template f(x'); and based on the comparison, determining, by the one or more servers, that the submitted biometric samples of the second user have been modified to impersonate the enrolled user. receiving, by one or more servers, enrolled biometric samples of an enrolled user during an enrollment stage of the biometrics-based authentication system; applying, using a projection deep neural network, a first function f(·) to the enrolled biometric samples, x i, to generate a first enrolled biometric template f(x i) and to project the enrolled biometric samples, x i, to a common embedding subspace; creating, by the one or more servers, augmented biometric samples by adding learned perturbations to the enrolled biometric samples of the enrolled user; receiving, by the one or more servers, during a request for authentication, submitted biometric samples from a second user purporting to be the enrolled user; applying, using the projection deep neural network, the first function f(·) to the submitted biometric samples, x', to generate a first submitted biometric template f(x') and to project the submitted biometric samples, x', to the common embedding subspace; comparing, by the one or more servers, the submitted biometric samples of the second user to the enrolled biometric samples and to the augmented biometric samples of the enrolled user based on predefined metrics, wherein the comparing comprises computing a distance in the common embedding subspace between the first enrolled biometric template f(x i) and the first submitted biometric template f(x'); and based on the comparison, determining, by the one or more servers, that the submitted biometric samples of the second user have been modified to impersonate the enrolled user.