Inference attack

The most sensitive information about a person may be absent from the records available to a commercial observer. Other information can nevertheless provide clues to it.

An inference attack uses relationships learned from labelled data to predict an attribute that somebody has never supplied. Where behavioural profiling constructs a broader description, this experiment concentrates on predicting one particular hidden characteristic.

Apps as a proxy

The operating system knows which applications are installed on a phone. Access to that information by individual applications is more restricted.

Android filters package visibility by default for applications targeting Android 11 or later. The QUERY_ALL_PACKAGES permission, which provides broader visibility, is subject to restrictions on Google Play.

Where information about installed applications is available, it can become an input to a statistical model. The presence or absence of each application provides a binary feature.

Suppose a researcher has a collection of app installation records accompanied by a known attribute. A model can examine whether particular installation patterns occur more frequently among people with that attribute.

# Training records contain observations
# and a known binary attribute

observations = [
    [1, 0, 1, 1, 0],
    [0, 1, 0, 1, 1],
    [1, 1, 0, 0, 1],
    ...
]

labels = [0, 1, 1, ...]

model = LogisticRegression()
model.fit(observations, labels)

# Predict a withheld attribute

scores = model.predict_proba(test_observations)

# Examine the fitted coefficients

weights = model.coef_

The coefficients describe how the presence of each application contributes to the prediction within the fitted model.

A large positive coefficient indicates an association with one value of the attribute, a negative coefficient with the other. The relationship may arise from the characteristic itself, from other circumstances associated with it or from properties of the population used for training.

The model has no independent understanding of those circumstances.

Sixty apps

The greenhouse-attacks inference experiment uses generated records for 50,000 people and sixty applications.

Each person receives a binary attribute. The generator assigns coefficients determining how that attribute affects the probability of installing each application.

The relationship the model will subsequently attempt to discover has therefore been deliberately introduced.

This gives the experiment something an observational dataset rarely provides: knowledge of the mechanism responsible for the relationship.

After training, the fitted coefficients can be compared with the ones originally supplied to the generator.

Application

Planted coefficient

Recovered coefficient

calendar_03

-1.563

-1.532

messaging_03

+0.971

+0.955

banking_03

+0.914

+0.895

maps_03

-0.921

-0.891

news_02

+0.855

+0.876

Across all sixty applications, the correlation between planted and recovered coefficients is 0.997.

The application names are placeholders. Nothing in these figures establishes a relationship between using a calendar, banking or messaging application and any actual sensitive characteristic.

The generator also makes the installations conditionally independent given the hidden attribute. Real application choices may be connected through occupation, household circumstances, shared interests, operating system restrictions and recommendations from other people.

Those relationships are absent here.

How much is enough?

The predictive performance is measured using the area under the receiver operating characteristic curve, usually abbreviated to AUC.

An AUC of 0.5 corresponds to chance level ranking. An AUC of 1 represents perfect separation between the two groups. A value between them describes how frequently a randomly selected positive example receives a higher score than a randomly selected negative example, accounting for ties.

Applications observed

AUC

1

0.536

2

0.566

5

0.601

10

0.646

20

0.687

30

0.769

40

0.795

60

0.886

The strongest individual application shares only 0.087 bits of mutual information with the hidden attribute. Individually, the signals reveal relatively little. Collectively, they allow the model to rank the generated population with considerably greater success.

The result does not mean that 88.6% of the people have been correctly classified. Classification accuracy would depend on the threshold chosen for assigning a label and the distribution of the attribute within the population.

A business selecting an audience could use the ranking directly. It might select the highest scoring individuals without ever assigning a definitive label to the remaining population.

Removing the relationship

The experiment becomes more informative when the strength of the relationship is varied.

A further series of runs generates populations of 8,000 people using five random seeds. The standard deviation of the planted coefficients determines how much the hidden attribute influences application installations.

Effect standard deviation

Mean AUC

Range across five seeds

0.0

0.493

0.469 to 0.511

0.2

0.693

0.665 to 0.733

0.5

0.899

0.879 to 0.935

With no planted effect, the model performs around chance level. Collecting many observations provides no predictive advantage here because the generator has supplied no relationship for the model to discover.

As the effects become stronger, predictive performance improves.

The first row serves as a negative control. It helps establish that the implementation is recovering the intended generated signal rather than obtaining its results through an unintended connection between the training and evaluation records.

The other rows show how strongly the result depends on the assumptions used to construct the population.

None of the effect sizes has been calibrated against observations of actual application installations. Establishing a realistic value would require suitable labelled data and an examination of the circumstances influencing people’s choices.

Useful without being right

Commercial systems can find value in predictions that remain unreliable for many individuals. An advertiser may benefit from selecting an audience that contains a higher proportion of potentially interested people than the population as a whole.

The accuracy of each individual prediction may receive little attention.

Research using Facebook activity demonstrated that ordinary behavioural records could support predictions about personal characteristics. The British Information Commissioner’s investigation into political data analytics examined the research associated with the Cambridge Analytica affair, including studies connecting Facebook likes with personality measurements and other attributes.

Those studies involved actual observations and labels, albeit under particular research conditions. Their findings provide evidence of relationships absent from the generated application experiment.

What the academic research demonstrated, what Cambridge Analytica claimed it could accomplish and what the company actually deployed are separate questions.

The commercial availability of sensitive classifications has since been documented in European investigations. Advertising marketplace inventories have contained categories describing health conditions, sexuality, political affiliations and financial difficulties.

The existence of a category reveals that a supplier considers it commercially useful. Establishing the accuracy of its contents requires further evidence.

What becomes a feature

Restricting access to particular observations can limit the information available to an inference system.

Android’s package visibility restrictions reduce the opportunities for applications to inspect other installed software. Apple’s tracking controls place restrictions on tracking across companies’ applications and services.

These measures address particular routes through which observations become available. Other records, including purchases, browsing activity and account information, may provide related signals.

The experiment illustrates the potential importance of accumulated information. It also exposes a limitation in arguments about inference based solely on the number of available observations. Sixty applications provide a strong predictive signal when the generator deliberately distributes information about a hidden attribute across them. Without that relationship, the same number provides no useful prediction.

Understanding an actual inference system therefore requires examining the population, the provenance of its observations, the labels used for training and the relationships between them. The availability of many features establishes an opportunity for inference. Its practical significance depends on what those features contain.