If you use facial recognition on your smartphone, someone else's face—a sibling's or someone else who looks like you—could unlock it too.

Despite many smartphone makers rolling out their unique algorithms, facial recognition security might not be an all-around haven after all. But why does Face ID sometimes fail?

How Does Facial Recognition on Smartphones Work?

Many facial recognition systems work with infrared scanning rather than the visible spectrum, which can be moot for its inability to scan your face in the dark.

Generally, facial unlock works by using the front camera to assess unique patterns and contours on your face. That's why setting up a facial recognition lock on your new smartphone (if it comes with the feature) requires an initial scan of your face.

After scanning, it then stores your facial details in its memory and transcribes it into some mathematical expressions. Your smartphone then compares that information with your face to authenticate secure access the next time you try to face-unlock it.

Most facial recognition technologies available today, however, combine an infrared emission spectrum with the actual algorithm. And they collect your facial picture in the form of 2D arrays. The idea behind this is to prevent picture-hacking the system.

Ultimately, the infrared emission allows your phone to accurately scan your face, even in the dark.

Why Facial Recognition Can Fail

Conventional visible spectrum camera scanning, of course, has several loopholes. It could even scan and authorize access with the face of your relative or that of a stranger. Plus, it has higher failure probabilities, and you could deceive it with a picture of yourself.

But that technology is no more in use in modern smartphones. However, even the technology that's now in vogue sometimes presents faults.

Related: Is Facial Recognition Legal in Your Country?

So while we can't detail how and why every available smartphone's facial recognition may fail, let's look at possible causes in a few examples.

Samsung's Iris Technology Is Accurate but Can Be Tricked

Back of a smart phone

Samsung's iris scanning technology, which started with Galaxy S8 and S8+, picked up a spot on the face to improve the phone's security. The technology works by scanning unique patterns in your iris.

Because the iris motif is unique to each individual, Samsung declared this a fool-proof technology. Unfortunately, there are some potential faults with this scanning method as you can still deceive it by wearing contact lenses.

And despite combining 2D imaging with iris scanning in more recent versions like the S21 series, Samsung warns that using facial recognition isn't as secure as using PINs or fingerprint scanning.

The company further advises against using this feature with online payment and money transfer platforms.

Why Huawei 2D Live Detection Isn't Completely Secure

Huawei, which uses open-source Android cores, is another popular big wig of facial recognition. The company first introduced its facial recognition security in the P20 series, and has since then added that feature to other products like the Mate 10 and Y 2018 series.

Huawei uses what it calls the 2D Live Detection technology, which is similar to how other Android phones' facial recognition work.

That technology makes it difficult for anyone to unlock your smartphone with your pictures, as it doesn't work without some facial actions like an eye blink. Consequently, your phone might fail to open if you don't abide by the rule, even upon scanning your face.

Additionally, this feature depends on the current status of your smartphone's front camera. So someone that looks like you can still open your smartphone on rare occasions. Of course, a depleted camera can weaken the accuracy of the set-up further.

Why Your Trusted Apple Face ID Can Fail

Hand holding an iPhone

Apple's Face ID, which launched with the iPhone X in 2017, is still the most advanced smartphone facial recognition system out there.

In contrast to Huawei and Samsung's 2D-iris infrared scanning technology, Apple gets a 3D capture of your face using a TrueDepth camera system instead of a single front-facing camera.

Apple's TrueDepth technology combines infrared capture with sensors and scanning components. It then uses these to analyze more than 30,000 dotted areas on your face during a scan to create a facial depth.

With your iPhone learning, memorizing, and recognizing these patterns, it takes more than a mere picture and just anybody's face to fool it.

Related: How to Set Up Face ID on Your iPhone or iPad

Apple's Face ID works by adapting to changes in your facial expression and appearance over time. That's in contrast to the one-time iris facial recognition. And this means it's more accurate.

Surprisingly, Apple's Face ID sometimes successfully opens the phone after scanning someone with a high resemblance to its original owner. But how?

Apple claims that there is a one in a million chance that other people's faces will open your iPhone. But it also warns that the probability is higher with identical twins, siblings, and children whose facial structures are yet to develop fully.

That's because Face ID learns more about your face each time you type in your Apple passcode: it could pick up different facial patterns to authenticate and unlock your iPhone the next time someone else holds it. Revealing your passcode to someone can result in a security breach, and they may not need your passcode to unlock your iPhone in future.

How to Prevent Strange Faces Unlocking Your Device

While facial recognition failure on your smartphone isn't your fault, there are still some ways to prevent it if you use the feature.

Failures on iPhones can be a result of the algorithm learning other people's facial patterns. To prevent this, you shouldn't share your Apple ID with others. And be careful not to open your iPhone with the Apple ID in the presence of someone that looks like you, like a sibling.

If your Face ID feature has failed already, go ahead and delete your Face ID data by going to Settings > Face ID & Passcode > Reset Face ID. This removes your face from memory, including all stored mathematical algorithms that set up your face patterns. You can create a new one if you wish.

You should also make sure you have Require Attention turned on. This means whoever is using Face ID has to actively look at the device: no one can open it using your face while you're asleep or looking away. Go to Settings > Face ID & Passcode and make sure Require Attention for Face ID is on.

While you can lock some apps with Face ID, some smartphone makers have warned that facial authentication might present some security issues, especially with online transactions. Fingerprints and PINs are still the most secure means of keeping your phone locked.

So if face unlock keeps failing on your smartphone, you should deactivate it to prevent unauthorized access to your device.

Facial Recognition Keeps Improving

Despite the security behind the smartphone facial recognition, it's not always completely secure after all. However, there are advancements in AI and machine learning towards training and improving the accuracy of facial recognition models.

With a tonne of train datasets now available, research has gone far and wide into developing image recognition technologies that can even identify you despite wearing a face mask. So there's enough room to incorporate further improvements in newer smartphone versions.