The US government has rolled out a plan to reshape airport security around facial recognition, playing off a wealth of passport photos and visa applications.

Led by Customs and Border Protection, the plan is built around the Biometric Exit program, which will register visitors leaving the US using facial recognition. But new statements show that CBP’s plans could make facial scans necessary for US citizens as well, documenting them when they reenter the country or pass through TSA checkpoints. The result would eventually grow into an airport-wide system Customs officials call “The Biometric Pathway.”

John Wagner, deputy assistant commissioner at CBP, laid out that vision at the ConnectID conference last week. “We’re going to build this for [Biometric] Exit. We’re out of time, we have to,” Wagner told the crowd. “But why not make this available to everyone? Why not look to drive the innovation across the entire airport experience?”

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

According to Wagner, that could mean using facial recognition to identify travelers arriving in the US, including passport-holding citizens. As the system expands to TSA checkpoints or airport lounge access, it would also be applied to domestic travelers, regardless of citizenship status. “As soon as you check in for arrivals or departure, we’re going to stage your photo in that database,” Wagner said. “We want to make it available for every transaction in the airport where you have to show an ID today.”

The Exit program is currently verifying passengers on a flight from Atlanta to Tokyo, and is set to roll out in seven new airports over the summer. Expanding it beyond departure gates will depend on partner agencies, particularly the TSA — but there’s already a significant appetite for using facial recognition in other parts of the airport. Already a partner in the Atlanta test, Delta has shown early interest in the system, seeing it as an opportunity to improve customers’ airport experiences. According to Delta Customer Initiatives chief Christian Revilla, who also spoke at ConnectID, airport biometrics are one of the four chief priorities set by the company’s CEO for the coming year.

Reached by The Verge, Customs confirmed that it was seeking partnerships to expand the reach of the proposed system. “We are working closely with stakeholders to ensure successful implementation of biometric exit and exploring potential for inbound arrivals and other processes,” an agency representative said. “We simply want to open the dialogue to others outside of CBP.”

“As soon as you check in for arrivals or departure, we’re going to stage your photo in that database.”

The base of the expanded facial recognition system is biometric exit, a long-standing congressional mandate for the government to verify visa holders’ identities as they leave the country. Recommended as part of the 9/11 commission, the mandate has taken on new urgency under President Trump, who fast-tracked the project in his controversial executive order on immigration this January. In the months since, CBP has settled on facial recognition as the easiest method for fulfilling the mandate. Customs obtains photos of most US visitors as part of the visa process, which can be combined with the State Department’s passport photo system to assemble a database of passenger photos for any international flight. All that’s left is to confirm that the faces on the flight match those photos.

Because the Exit requirement only extends to visa holders, newly taken photos of US citizens are discarded once confirmation has been made — but Customs left open the possibility that it would retain those photos in the future. “If we find a need to keep that, we’ll work through the privacy approvals to be able to do so,” Wagner said, “but for now, we’re discarding that information.” Notably, CBP has no legal obligation to delete photos of foreign travelers; a separate Trump executive order repealed Privacy Act protections for non-citizens earlier this year.

Accuracy has already emerged as one of the biggest challenges for the system. Facial recognition is far less accurate than more involved biometrics like fingerprinting or iris scans, and making it work for Exit will require very particular conditions. A recent round of tests by the National Institute of Standards and Technology found that, comparing against a gallery of 48,000 faces, even the best algorithms missed a quarter of flagged suspects in a boarding gate scanning scenario. Making the system work meant shrinking the gallery to 480 faces, roughly the size of a modern passenger jet, at which point the miss rate shrank to just 1 percent. The proposed Exit system has followed NIST’s lead, only scanning faces against other passengers on the flight.

A complex and secret risk-assessment algorithm

The new facial recognition engine will also have to deal with the chaos of the airport setting. Michigan State University professor Anil Jain, one of the main academic authorities on facial recognition, says his biggest concern is lighting and other accessories that could throw off the reading. “Face recognition accuracy is very susceptible to illumination conditions,” says Jain. “The person cannot smile or cry. The accuracy critically depends on these factors.” Jain also has concerns about pictures more than five years old surfacing in the passport or visa database: if the source picture is old enough, a person might not match with their own face.

As it expands, the system will also change the way Customs greets arriving flights. CBP currently designates certain travelers for screening based on a complex and secret “risk assessment” algorithm, based on age, gender, country of origin, and other data. If those algorithms decide a passenger is a risk to national security, they can be pulled aside for interrogation after arrival or denied entry to the US entirely. In some cases, those stops are made as a result of FBI requests, as a means of recruiting informants from a particular region or community. More recently, Customs agents have also used the screening process to pressure visa holders into providing access to Facebook and Twitter accounts, as the government seeks to collect more data about travelers’ online activities.

Expanding facial recognition to arriving flights will have a profound impact on that secondary screening process, giving Customs a new way to split off designated passengers earlier in the process. “We have to get better segmenting people according to risk,” Wagner said. “All the people that we know are going to secondary? Put them in Lane 18 or Lane 20. All the people with short connections? Put them in Lane 1 and 2. We’ll be able to see the connecting information, so we’ll be able to have that segmentation.”

For critics, that could make the automated risk assessments even more harmful. EPIC’s Jeremie Scott, who is currently working on a lawsuit to force Customs to release more information about the algorithm, says Customs should make the system more transparent before it makes it more powerful. “If an individual keeps getting put into a high-risk line because of AFI, they’ll have no idea why and no real recourse. It’s just being done by this algorithm in the background,” Scott told The Verge. “It poses a large risk of flagging people who shouldn’t really be in that line.”