Soon, it may be hard for visa holders to board an international flight without submitting to a facial geometry scan. Customs and Border Protection began testing facial recognition systems at Dulles Airport in 2015, then expanded the tests to New York’s JFK Airport last year. Face-reading check-in kiosks will be appearing at Ottawa International Airport this spring, and British Airways is rolling out a similar system at London’s Heathrow Airport, comparing faces captured at security screenings with a separate capture at the boarding gate. Now, a new project is poised to bring those same systems to every international airport in America.

Called Biometric Exit, the project would use facial matching systems to identify every visa holder as they leave the country. Passengers would have their photos taken immediately before boarding, to be matched with the passport-style photos provided with the visa application. If there’s no match in the system, it could be evidence that the visitor entered the country illegally. The system is currently being tested on a single flight from Atlanta to Tokyo, but after being expedited by the Trump administration, it’s expected to expand to more airports this summer, eventually rolling out to every international flight and border crossing in the US.

Got a tip for us? Use SecureDrop or Signal to securely send messages and files to The Verge without revealing your identity.

US Customs and Border Protection’s Larry Panetta, who took over the airport portion of the project in February, explained the advantages of facial recognition at the Border Security Expo last week. “Facial recognition is the path forward we’re working on,” Panetta said at the conference. “We currently have everyone’s photo, so we don’t need to do any sort of enrollment. We have access to the Department of State records so we have photos of US Citizens, we have visa photos, we have photos of people when they cross into the US and their biometrics are captured into [DHS biometric database] IDENT.”

Some form of Biometric Exit has been discussed for decades, but it’s only recently that facial recognition emerged as the method of choice. Customs and Border Protection agents currently take photographs and fingerprints from every visa holder entering the country, but there are no similar measures to verify someone has left the country before their visa expires. Homeland Security estimates that roughly half a million visitors to the US overstay their visas each year — but without a verifiable exit process, the government has no way to determine how many visitors are actually overstaying or who they are.

“Facial recognition is easy because everyone knows how to take a photo.”

Biometric Exit would close that loop, giving CBP agents verifiable biometric proof that a given US visitor has left the country. The most recent proposal was set in motion by former DHS chief Jeh Johnson, who planned for a rollout by the beginning of 2018 — but President Trump has sped up that process, making the program a central part of his aggressive border security policy. The president’s executive immigration order on January 27th — best known for suspending all visitors to the US from seven majority-Muslim countries — also included a clause expediting biometric exit, with three progress reports to be made over the next year. A revised order in March contained the same language, and while both orders have been stayed by federal court, the biometric exit system remains one of the new administration’s top priorities for CBP.

As recently as February, CBP was still weighing four different methods for Biometric Exit, including fingerprint and iris-based systems — but as the tests have wound down, facial recognition has become the clear favorite within CBP. Unlike iris prints, CBP already has visa holders’ faces on file — and unlike fingerprints, faces are easy to check at the gate. “Facial recognition is easy because everyone knows how to take a photo,” Panetta told the conference. “Fingerprints... sometimes you have to educate people how to submit their fingerprints to the machine.”

Making that system work will mean building a robust system for checking passengers’ faces against outside datasets — but as that system is shared with more agencies, it may be used for far more than simply verifying departures, with serious implications for anyone setting foot in an airport. Speaking at the conference, Panetta said the same technology could be shared with land borders, as well as partners in the TSA and even private airlines.

The act of flying could be cause for a law enforcement search

“We’re essentially building an IT backbone, which can allow TSA or potentially air carriers or any other partner to tie into our backbone,” Panetta said. “So once we completely build our exit infrastructure, we could potentially offer it to TSA if they want to use our facial matching or security screening test — or maybe if an airline wanted to use facial matching for access to their lounge. So we’re trying to be collaborative with our various stakeholders and our sister agencies such as TSA, and we’ll make that available to them when we have it.”

The TSA has been playing with facial recognition systems at check-in since 2003. Check-in based systems typically take photos of passengers when they collect their boarding pass and using the photo to track them on less intrusive cameras as they move through the airport. A company called Vision Box has implemented a similar system in Aruba, and was also involved in the CBP pilot at JFK. There are still technical challenges, and it’s unclear how well the system works with existing in-airport surveillance systems — but sharing the backend with CBP could make the system much more efficient, given the agency’s enormous database of passport and visa photos.

Those systems also raise serious civil rights questions that agencies still haven’t answered. Under the FBI, facial recognition has become a powerful and controversial tool for tracking criminals. If that tool extends to face photos taken at airports, it could mean a subtle but profound change in law enforcement’s powers at the airport.

“Right now, other than the no-fly list, you do not have law enforcement checks on who can fly,” says Alvaro Bedoya, who studies facial recognition at Georgetown Law’s Center on Privacy & Technology. “But once you take that high-quality photograph, why not run it against the FBI database? Why not run it against state databases of people with outstanding warrants? Suddenly you’re moving from this world in which you’re just verifying identity to another world where the act of flying is cause for a law enforcement search.”

“DHS needs to think long and hard about bias in these systems.”

So far, CBP hasn’t said anything about integrating the FBI into the new face-scanning system — but if the TSA and airlines are able to make queries, it may be difficult to keep the FBI out. Current CBP systems retain any images flagged for inspection, building a significant database of faces for anyone who wants to scan them. At the same time, the FBI already has access to passport and visa photos through the State Department, and has conducted more than 50,000 scans over those photos since 2011.

Reached by The Verge, a Customs and Border Protection spokesperson emphasized that the project would benefit travelers while fulfilling the Congressional mandate for Biometric Exit, which dates back to 1996. “CBP is committed to deploying a system that provides biometric exit data on non-U.S. Citizens in a way that doesn't disrupt air, sea, or land port operations,” the spokesperson said. “CBP remains committed to protecting the privacy of all travelers.”

Facial recognition critics have also raised concerns over racial bias. American recognition systems are typically trained on datasets of mostly white subjects, which leads to higher error rates when scanning other races. An FBI study in 2012 found three popular US algorithms were five to ten percent less accurate scanning African-American faces, with similar declines for women and younger subjects. If that bias isn’t corrected, it could present a serious civil rights problem — particularly since visa holders tend to be younger and less white than the US population at large.

Questions like these are particularly urgent as the program grows, racing to meet President Trump’s mandated 100-day check-in periods. Currently only in place for a single flight in Atlanta, the biometric exit system is expected to expand other airports in a matter of months. “DHS needs to think long and hard about bias in these systems before it starts deploying them on a massive scale,” says Bedoya.

Correction: An earlier version of this article attributed the JFK and Dulles tests to the Transportation Safety Agency rather than Customs and Border Protection. The Verge regrets the error.