Before the A.C.A., data brokers bought data from pharmacies and sold it to insurance companies, which would then deny coverage based on prescription histories. Future uses of data in insurance will not be so straightforward.

As machine learning works its way into more and more decisions about who gets coverage and what it costs, discrimination becomes harder to spot.

Part of the problem is the automatic deference that society has so often given to technology, as though artificial intelligence is unerring. But the other problem is that artificial intelligence is known to reproduce biases that aren’t explicitly coded into it. In the field of insurance, this turns into “proxy discrimination.” For example, an algorithm might (correctly) conclude that joining a Facebook group for a BRCA1 mutation is an indicator of high risk for a health insurance company. Even though actual genetic information — which is illegal to use — is never put into the system, the algorithmic black box ends up reproducing genetic discrimination.

A ZIP code might become a proxy for race; a choice of wording in a résumé might become a proxy for gender; a credit card purchase history can become a proxy for pregnancy status. Legal oversight of insurance companies, which are typically regulated by states, mostly looks at discrimination deemed to be irrational: bias based on race, sex, poverty or genetics . It’s not so clear what can be done about rational indicators that are little but proxies for factors that would be illegal to consider.

Placing those biases inside a secret algorithm can prevent critical examination of inequality. ProPublica found that people in minority neighborhoods paid higher car insurance premiums than residents of majority-white neighborhoods with similar risk, but its reporters could not determine exactly why, since the insurance companies would not disclose their proprietary algorithms or data sets.

A handful of lawsuits in other arenas have challenged this practice. After Idaho’s Medicaid program started using an automated system to calculate benefits, recipients suddenly saw their benefits cut by as much as 30 percent. When the state refused to disclose its algorithm, claiming it was a trade secret, the A.C.L.U. of Idaho sued to gain access to the code, and ultimately discovered that the formula was riddled with flaws.

Artificial intelligence, in all its variations, holds great promise. The automated processing of car accident photos or machine reading of medical scans can help cut down costs, and even save lives. But the opacity around many applications of automation and artificial intelligence are reason for pause. Not only do people have limited access to the code that determines key facets of their lives, but the bar to understanding the “reasoning” of algorithms and data sets is high. It will get higher as more industries begin to use sophisticated technologies like deep learning.