NEW YORK (AP) — Six artificial flavors are being ordered out of the food supply in a dispute over their safety, but good luck to anyone who wants to know which cookies, candies or drinks they’re in.

The dispute highlights the complex rules that govern what goes in our food, how much the public knows about it, and a mysterious class of ingredients that has evolved over decades largely outside of public view.

On food packages, hundreds of ingredients are listed simply as natural flavor or artificial flavor. Even in minute amounts, they help make potato chips taste oniony or give fruit candy that twang.

“The food system we have is unimaginable without flavor additives,” said Nadia Berenstein, a historian of flavor science based in New York.

The flavors are also at the center of a dispute over how ingredients should be regulated.

The U.S. Food and Drug Administration is giving companies two years to purge their products of six artificial flavors — even though the FDA made clear it believes the ingredients are safe in the trace amounts they are used.

The six artificial flavors in question, with names like methyl eugenol, benzophenone, ethyl acrylate and pyridine, are used to create cinnamon or spicy notes, fruity or minty flavors, or even hints of balsamic vinegar.

The FDA and the Flavor and Extract Manufacturers Association, an industry group, did not respond when asked for examples of products the six ingredients are used in. But they noted in statements that the compounds have natural counterparts in foods like basil, coffee, grapes and peppermint, and that the action does not affect the naturally derived versions.

The FDA said it had to order the artificial versions out of the food supply because of a lawsuit brought by consumer advocacy groups that cited a 60-year-old regulation known as the Delaney clause. The rule prohibits additives shown to have caused cancer in animals, even if tested at doses far higher than what a person would consume.

In a statement, the flavor industry group said the Delaney Clause doesn’t allow regulators to assess an ingredient’s risk based on modern scientific understanding, but that changing it would require an act of Congress. As far back as 1981, the Government Accountability Office issued a reportsaying the clause should be re-examined because of its inflexibility.

Christopher Kemp, a professor of cancer biology at the Fred Hutchinson Cancer Research Center, doesn’t think the rule is necessarily too strict a threshold. He said animal studies provide the strongest evidence about cancer risk in humans, and that it is better to err on the side of caution.

Erik Olson of the Natural Resources Defense Council, one of the groups that sued over the six ingredients, said it’s also unknown what effect they might have when used in combination with other ingredients. And since they’re listed only as “artificial flavor,” he said people don’t know in what concentrations they’re used in particular products.

“It’s all secret. You can’t pick up an ice cream or chewing gum or a baked good and have any idea what chemicals are in there,” he said.

Berenstein, the flavor science historian, said the ingredients in flavors don’t have to be specified in part because regulators decided long ago that listing the names of compounds on packages might just confuse people. And she stressed that flavors are used in infinitesimal amounts. In 2015, the flavor industry estimates just 40 pounds of one of the now banned artificial ingredients was produced.

But Bernstein said a more robust regulatory system might inspire greater public confidence about flavors.

In a separate but related lawsuit, the FDA is also facing a challenge over its oversight of the universe of ingredients companies can put into foods, including artificial flavors.

New flavors, sweeteners and other ingredients can go through an FDA petition process to be approved as food additives. But another option lets manufacturers deem their own ingredients to be “generally recognized as safe.”

There’s no clear rule for when ingredients should take one path or the other. The artificial sweetener Splenda is an approved food additive. Another sweetener, stevia, was declared GRAS by manufacturers.

The six artificial flavors in question were approved food additives, along with dozens of other synthetic flavors . The flavor industry group also regularly declares other ingredients like them to be GRAS, without formal review by the FDA.

Critics say GRAS determinations were meant for basic ingredients like salt and vinegar, not highly engineered ingredients. The advocacy groups suing the FDA say the GRAS option has turned into a loophole that lets companies approve all sorts of ingredients without public scrutiny, including artificial flavors.

In September, a judge allowed the legal challenge to move forward.

Copyright 2018, The Associated Press. All rights reserved.