Skip to main content

What Middle School Math Teaches Us About Identity Verification and Deepfakes

5 min read
What Middle School Math Teaches Us About Identity Verification and Deepfakes

"When am I ever going to use this?"

Every math teacher has heard it, and we got a version of it within five minutes of standing in front of a 7th-grade class. At Trust Swiftly, we spend our days helping businesses determine whether the person on the other side of a screen is who they claim to be. The coordinate geometry, proportional reasoning, and statistics on the classroom whiteboard are not a complete description of that work, but the same mathematical ideas appear throughout it.

Our team has been visiting STEM middle school classrooms to make that connection in person. This post is the written version of the lesson, for two audiences: teachers who want a concrete "here's where the math goes" story for their students, and parents who want a starting point for a harder conversation about deepfakes. The fun parts are real, and so are the dangers, and we'll cover both.

Your Face Can Start as a Set of Coordinates

When students plot ordered pairs on a coordinate plane, they are learning one useful entry point into facial image processing.

Early in the process, software may locate landmarks such as the corners of the eyes, the tip of the nose, and the edges of the mouth, each represented as a point like (x, y). Those points can help the system crop, rotate, and align a face so two images are presented in a more consistent frame.

The distance between two landmarks comes from the distance formula, which is the Pythagorean theorem wearing a different outfit:

d = √((x₂ − x₁)² + (y₂ − y₁)²)

That formula gives students a useful way to explore measurements between features. Connect three landmarks and you get a triangle; compare two idealized, scaled images and similar-triangle reasoning helps explain what stays proportional. Real faces are three-dimensional, however, and head position, expression, camera perspective, and lighting all change what the camera records. Landmark geometry is therefore a starting analogy, not the whole matching process.

Modern face-matching systems commonly go further: a neural network converts each aligned image into a numerical template, sometimes called an embedding or feature vector. A comparator measures the similarity between two templates and checks the result against a threshold. As NIST explains in its biometrics teaching material, those similarity scores are not normally probabilities or "percentage matches."

Ratios Explain Normalization, Not the Whole Match

Here's the problem students spot immediately: the selfie you take today will never match your ID photo exactly. It may come from a different camera, distance, angle, or lighting condition. So how can a computer compare them?

In an idealized two-dimensional example, scaling an image down changes every measurement by the same factor while leaving ratios unchanged. The distance between the eyes divided by the width of the nose, for example, illustrates how proportional reasoning can describe size normalization. Real verification systems must also account for pose, depth, expression, image quality, and other variation through image alignment and model training.

The system then compares numerical templates and produces a similarity score. A threshold turns that score into a match or non-match decision, and the threshold is chosen to balance false matches against false non-matches for the particular use case. The system is not "98.5% certain," and a phone or verification service does not know with certainty that it is right. It makes a measured decision with a known possibility of error.

One Person, One Account Is a Goal

Fraudsters may create many accounts to abuse sign-up promotions, dodge bans, or run scams at scale. Detecting that behavior can involve several kinds of information.

Depending on the service and its privacy rules, a deduplication check might compare verified identifiers, such as a document number, or conduct a one-to-many biometric search against previously enrolled templates. It does not universally turn each person into one unique number. These searches can also produce false positives, which is why NIST requires manual review before a conforming identity-proofing service denies enrollment based on a one-to-many biometric result.

A student-to-student-ID assignment still provides a helpful math analogy, with one correction: the desired relationship is one-to-one. Mathematicians call that an injective mapping. If two different students receive the same ID, the mapping has failed its uniqueness goal. Identity deduplication similarly tries to detect collisions without treating an automated comparison as infallible.

Teaching a Computer to Spot Fakes, and Why Fairness Is a Math Problem

Document-authentication systems vary. Some check explicit rules and security features; others use machine-learning models trained on examples of genuine and fraudulent documents; many combine multiple methods. They may examine details such as layout, type, barcode consistency, signs of tampering, and whether a document appears to be physically present rather than a manipulated digital copy.

This is where middle school statistics earns its keep. Sample size, variability, and what a data set does or does not represent are not side topics here; they affect how well a model performs outside its training examples.

They also affect whether the system works consistently for different people. Underrepresentation in training data can contribute to different error rates, but it is not the only factor. Algorithm choice, task, lighting, camera position, and image quality also matter. NIST's face-recognition evaluations measure false-match and false-non-match rates across demographic groups and note that poor photography can itself produce demographic effects.

We put it to the students this way: imagine a video game where the rules are quietly harder depending on which character you picked. Nobody would call that a fair game. Responsible verification therefore requires representative data, consistent capture conditions, measurement of both kinds of error across relevant groups, independent testing, accessible alternatives, and human review when automation may be wrong. "Check your data" is an ethical instruction, not just a technical one.

The Live Deepfake Demo: Loud, Fast, and Instructive

The most popular part of every visit was the deepfake demonstration, and nothing about it was prerecorded. Students watched a face swap happen live on the classroom screen: our presenter loaded a target face, and in seconds the swap was running in real time. Turn the head, talk, smile — the fake face follows along. We turned it into a guessing game by swapping in celebrity faces one at a time and letting the class call out who had just "appeared" at the front of their classroom. Nobody sat in stunned silence — these are middle schoolers. They laughed, they shouted guesses over each other, and, encouragingly, they mostly got it right in the end.

AI-generated illustration of a classroom guessing game comparing two synthetic portraits labeled Real and AI

AI-generated illustration; not a photograph of the classroom visit. Both displayed portraits are synthetic.

Then we adjusted the settings in front of them. Sliding the opacity up and down blends between the real face and the target, so students could see how the illusion was built: at one end the seams were obvious, and a few adjustments later the swap looked much more convincing. Watching that change happen in under a minute made the speed and accessibility of the technology concrete.

The students learned to notice artifacts produced by this particular demonstration: flicker or wobble during quick movement, edges that swim near hair and glasses, and lighting that does not quite match the room. That was a useful observation exercise, but it was not proof that people can reliably authenticate every deepfake by sight. Newer or different tools may not produce the same tells, and the absence of a visible flaw is not evidence that media is genuine.

A second opinion can surface something one viewer missed, but several classmates looking at the same content are not independent samples of the truth. They see the same artifact and can influence one another. The stronger next step is to verify the claim through a separate, trusted channel.

With documented permission, we take the demonstration one step further by using a teacher's face and, separately, a short sample of the teacher's voice. That one lands differently. Some tools can animate or swap a face from a single clear photograph; voice cloning requires audio, and the amount and quality needed vary by tool. The lesson is not that every result will be perfect. It is that synthetic media no longer requires a celebrity-sized archive of source material.

That's when we had the serious conversation, and it belongs here too, because this is the part teachers and parents should not skip.

Students already know face swaps as an often-playful feature of filters and messaging apps. Related synthetic-media techniques can also do real damage, and middle school is precisely where some of that harm starts showing up:

  • Bullying and humiliation. A deepfake can put a classmate's face into a photo or video of something they never did or said, and it can spread rapidly through group chats. Schools around the country have dealt with fabricated explicit images of students. Creating or sharing nonconsensual intimate imagery, including AI-generated imagery, can violate federal or state law as well as school policy. Never create, save, or forward it; tell a trusted adult and report it. The federal TAKE IT DOWN Act also requires covered platforms to provide a removal process for real or digitally forged intimate imagery.
  • Fake "evidence." A screenshot of a text conversation or social media post can be altered or manufactured. Screenshots can still be useful evidence, but they are not conclusive on their own. Preserve ordinary messages with a trusted adult when it is safe to do so; never download or forward explicit images of a minor in an attempt to document them.
  • Scams that clone voices. A call may sound like a parent or grandparent asking for money or information. The FTC warns that some voice-cloning tools can work from a short audio clip found online.
  • Pressure and blackmail. Scammers use fake or stolen images to threaten teens into sending money or more images. It is called sextortion, and the FBI reports a major increase in cases involving children and teens. The targeted student is a victim and is not in trouble. Do not pay or send more images; tell a trusted adult immediately.

None of that is a reason to panic. It is a reason to change one default setting in your head.

The Rule: Pause and Verify Through a Trusted Channel

If a student remembers one sentence from the lesson, we want it to be this one:

When a digital message is unexpected, urgent, or asks for money, information, or images, pause. Contact the person through a number or account you already know, and involve a trusted adult.

A voice, screenshot, photo, or video may be real or altered. The important question is not only whether you can spot a flaw; it is whether you can confirm the claim through a channel the sender does not control. We gave students five habits for doing that:

  1. Tell a trusted adult. If something feels wrong, threatening, or embarrassing, say something immediately to a parent, teacher, counselor, or another safe adult. You are not in trouble, and you should not handle it alone.
  2. Pause and do not act on urgency. Do not send money, passwords, verification codes, personal information, or images. Do not forward suspicious or humiliating media. Pressure to act immediately or keep a request secret is a warning sign.
  3. Reconnect through a known channel. End the suspicious call or conversation. Call or message the person using contact information you already had, not a number or link supplied by the sender. If you cannot reach them, ask another trusted family member. A family safe word agreed on offline can be an additional check, but it should not replace calling back through a known channel.
  4. Preserve and report safely. With an adult's help, save usernames, URLs, dates, and ordinary messages when it is safe. Block and report the account. Do not download, send, or share an explicit image to make a report. If there is an immediate threat of physical harm, contact emergency services.
  5. Treat visual tells and second opinions as clues, not proof. Flicker, warped backgrounds, mismatched lighting, and poor audio synchronization may justify more scrutiny. Asking for an unexpected movement during a live call or showing ordinary content to another trusted person may reveal a problem, but neither authenticates the person. Final confirmation comes through a known channel and, for a student, with a trusted adult involved.

These habits resemble professional verification ideas without being exact replicas. A family safe word is a shared secret; reconnecting through a known number is an out-of-band check; an unexpected movement resembles a human-in-the-loop cue. Professional systems add tested biometric and attack-detection algorithms, capture-sensor protections, protected channels, and manual review. NIST's identity-proofing guidance emphasizes that no single control addresses every forged-media attack. The shared principle is layering checks rather than trusting one signal.

A 20-Minute Activity Any Teacher Can Run

You do not need our team in the room to teach the machine-learning half of this. Google's Teachable Machine is a free, browser-based tool that lets students train an image classifier without coding or an account. Google says examples and training remain on the device unless someone deliberately saves the project to Google Drive. Teachers should still follow their school or district technology and privacy policies and use paper objects rather than students' faces.

A simple sequence that connects model output to actual measured performance:

  1. Train triangles versus squares. Capture 10 examples of each paper shape at different distances and angles.
  2. Create a separate test set. Use cards or views that were not included in training. Run 20 trials, tally the correct and incorrect predictions, and calculate measured accuracy as correct predictions ÷ total trials.
  3. Add variation and compare. Add more training examples under different angles and lighting, retrain the model, and repeat the same test. Graph the number of training examples against measured test accuracy.
  4. Break it on purpose. Dim the lights, tilt a shape, or hold it partly out of frame. Record which changes cause errors and ask why.

AI-generated illustration of hands holding a paper triangle near a laptop running a shape-classification activity

AI-generated illustration; the interface shown is conceptual rather than a screenshot of Teachable Machine.

The score shown beside one prediction is not the same as the model's probability of being correct, and a displayed score of 95% does not establish 95% real-world accuracy. Testing on unseen examples is what lets the class estimate performance. That distinction loops the lesson back to sample size, variability, and fairness, and to why an identity-verification company must evaluate systems on far more than ideal, well-lit training examples.

Resources for Teachers and Parents

  • Google Teachable Machine — the browser-based classifier tool used in the activity above.
  • Take It Down — a free NCMEC service for nude, partially nude, or sexually explicit images or videos taken of someone when they were under 18. It creates a hash from a file already on the person's device so participating public or unencrypted platforms can detect copies. Do not download or ask someone to send an image merely to submit it.
  • NCMEC CyberTipline — report online child sexual exploitation, including threats involving explicit images.
  • FTC guidance on the TAKE IT DOWN Act — information about requesting removal of real or digitally forged nonconsensual intimate imagery from covered platforms.
  • StopBullying.gov — federal guidance on recognizing and responding to cyberbullying.
  • FBI guidance on sextortion — what it looks like, how to report it, and how adults can support a young victim.

Math class is where students learn to plot points, compare ratios, test a model, and reason about data. Those skills do not authenticate a suspicious message by themselves, but they help students understand how automated decisions are made, where errors enter, and why evidence needs to be tested. Showing students that connection does two things at once: it answers "when am I going to use this," and it gives them practical tools to protect themselves and each other.

If you teach in a STEM classroom and want to bring this lesson to your students, or you'd like the slide deck to adapt for your own class, reach out to us. We're glad to help.

Share: X LinkedIn

About the Trust Swiftly Team

We publish practical guidance on identity assurance, fraud prevention, and FedRAMP-aligned controls for high-risk workflows.

Comments