• The AI Pulse
  • Posts
  • šŸ§  How AI Makes Face ID and Social Media Work

šŸ§  How AI Makes Face ID and Social Media Work

PLUS: How Secure Is Appleā€™s Face ID?

Welcome back AI prodigies!

In todayā€™s Sunday Special:

  • šŸ“œThe Prelude

  • šŸŽHow Appleā€™s Face ID Recognizes You

  • šŸ“±How Instagram Curates Your Feed

  • šŸ”‘Key Takeaway

Read Time: 7 minutes

šŸŽ“Key Terms

  • Infrared (IR) Lighting: A type of light the human eye canā€™t detect.

  • Machine Learning (ML): Leverages data to recognize patterns and make predictions without explicit instructions from developers.

  • Neural Processing Unit (NPU): A specialized processor designed to mimic the human brain. Think of it as the ā€œbrainā€ for AI.

  • Two-Tower Neural Network (NN): Two separate networks (i.e., ā€œtowersā€) that curate content tailored to your interests.

šŸ©ŗ PULSE CHECK

Do you think Facial Recognition or Social Media Platforms are more protective of your data?

Vote Below to View Live Results

Login or Subscribe to participate in polls.

šŸ“œTHE PRELUDE

AI is so seamlessly integrated into our smartphones that we rarely notice it. We tap, swipe, and type through the digital world without a second thought, unaware of the AI optimizing every interaction.

Perhaps the most overlooked and underappreciated feature is your smartphoneā€™s Facial Recognition. Despite being used billions of times per day, itā€™s rarely discussed.

In contrast, social media platforms like TikTok, YouTube, and Instagram are constantly in the news. We marvel at their Almighty Algorithms, sometimes even feel violated by their eerie accuracy, yet continue to devour the content they supply.

Today, weā€™ll explore how Facial Recognition and the Almighty Algorithms work. More specifically, Appleā€™s Face ID and Instagramā€™s Explore Recommendations System.

šŸŽHOW APPLEā€™S FACE ID RECOGNIZES YOU

At the heart of Appleā€™s Face ID is the TrueDepth Camera, which has three hardware components and employs ML techniques to collect, refine, and adjust your facial data. Whatā€™s even crazier is all this happens within a fraction of a second. Hereā€™s how it works:

1. Shining an Invisible Flashlight Onto Your Face

When you swipe up to unlock your iPhone, the TrueDepth Camera springs to life. First, the Flood Illuminator shines a controlled beam of IR Light onto your face. Then, a Diffuser evenly spreads this IR Light across your face to prevent bright areas or dark spots from interfering with the process. While the IR Light illuminates your face, the Dot Projector projects more than 30,000 IR Dots that capture your unique facial features.

2. Capturing and Processing Facial Data

Once the Flood Illuminator lights up your face with IR Light, the IR Camera within the TrueDepth Camera converts the facial features captured by the IR Dots into an image thatā€™s sent to the Apple Neural Engine (ANE): an NPU that analyzes the image to extract the distance between your eyes, the shape of your nose, and the contour of your jaw. Then, these facial features are converted into a unique numerical representation of your face, known as a Facial Template. Appleā€™s Face ID compares this Facial Template to the Stored Facial Template you created when you first set up your iPhone. If they match, your iPhoneā€™s unlocked.

3. Enabling Continuous Improvement

The Stored Facial Template isnā€™t static; it evolves as your face changes, such as growing a beard, wearing sunglasses, or aging. So, how is this possible? Appleā€™s Face ID leverages the following ML techniques:

  • Feature Normalization: Acts like a filter that ensures lighting variations, camera angles, and slight movements donā€™t prevent Appleā€™s Face ID from working.

  • Incremental Learning: Over time, your face naturally changes. Appleā€™s Face ID gradually updates the Stored Facial Template by learning from all the past times it successfully recognized you.

  • Deep Neural Networks (DNNs): Recognizes facial patterns by processing facial data through multiple layers of artificial ā€œneuronsā€ that mimic the human brain. First, DNNs use Filters, or small grids of numbers, to describe the edges and textures of your face. Then, they assign various Mathematica Weights to these Filters depending on their importance in identifying your face.

This blend of the TrueDepth Camera and ML techniques reduces the probability of someone else unlocking your iPhone to 1 in 1,000,000.

Your Stored Facial Template is kept inside the Secure Enclave, a special hardware component built into Appleā€™s iPhone, iPad, and MacBook processors that acts as a mini-fortress inside the central processor. This mini-fortress keeps your data ultra-secure.

šŸ“±HOW INSTAGRAM CURATES YOUR FEED

After unlocking our iPhones, we often navigate to social media platforms, where the Almighty Algorithms guide us. Instagram provides curated content to over 500 million people every day through Recommendation Systems like Explore. Hereā€™s how it works:

1. Finding Engaging Content

Instagramā€™s Explore Recommendations System pulls thousands of potentially engaging Instagram posts from a massive pool of content during Retrieval. To do this efficiently, Instagram uses a Two-Tower NN:

  1. User Embeddings: A numerical representation of your preferences based on your past interactions with Instagram posts.

  2. Media Embeddings: A numerical representation of Instagram posts containing details about the images used, captions created, and engagements made.

By comparing the numerical similarities between a User Embedding and a Media Embedding, the Explore Recommendations System selects thousands of Instagram posts that likely align with your interests.

2. Scoring and Prioritizing Content

After Retrieval, the Explore Recommendations System uses multiple ML techniques to Rank the thousands of selected Instagram posts based on Engagement Predictions: how likely youā€™ll like it, how long youā€™ll view it, and how likely youā€™ll share it. Instagram posts with the highest Engagement Predictions move to the top of your Explore Page.

3. Optimizing Retrieval and Ranking

After Ranking Instagram Posts, the Explore Recommendations System deploys Caching, which involves storing pre-ranked Instagram posts so Instagram doesnā€™t have to create new Rankings every time you navigate to the Explore Page. There are three types of Caches:

  1. User-Specific Caches: Stores recently Ranked Instagram posts tailored to you.

  2. Popular Content Caches: Stores popular Instagram posts in a global Cache that can quickly be served to anyone.

  3. Precomputed Embeddings Caches: Calculates User Embeddings and Media Embeddings periodically and Caches them for reuse.

4. Continuously Improving Recommendations

A/B Testing allows Instagram to refine your Explore Page by testing different variations of Instagram posts through two Groups:

  1. Control Group: Continues using the existing Explore Page.

  2. Test Group: Views modified versions of the Explore Page.

By comparing the Key Metrics between these Groups, like Dwell Time (i.e., how long you spend on the Explore Page) or Tap Rate (i.e., how often you tap on an Instagram post), Instagram can measure the effects of different variations of the Explore Page to optimize these Key Metrics.

šŸ”‘KEY TAKEAWAY

From unlocking our iPhones to scrolling through Instagram, AI quietly shapes our digital world. While OpenAIā€™s Reasoning Engines and Anthropicā€™s AI Agents consume the spotlight, the seamless integration of AI through Appleā€™s Face ID or Instagramā€™s Explore Recommendations System helps contextualize the latest AI developments and, ultimately, separates AI Hype from AI Reality.

šŸ“’FINAL NOTE

FEEDBACK

How would you rate todayā€™s email?

It helps us improve the content for you!

Login or Subscribe to participate in polls.

ā¤ļøTAIP Review of The Week

ā€œThese compact, bite-size AI insights are great!ā€

-Jesse (1ļøāƒ£ šŸ‘Nailed it!)
REFER & EARN

šŸŽ‰Your Friends Learn, You Earn!

You currently have 0 referrals, only 1 away from receiving āš™ļøUltimate Prompt Engineering Guide.

Reply

or to participate.