AI Glossary / Graphs and symbolic AI / Intermediate

k-anonymity

Definition

k-anonymity is a property of a released table in which each record shares its combination of designated quasi-identifier values with at least k − 1 other records. It limits uniqueness on those selected identifying attributes, but does not by itself prevent every form of privacy disclosure.

What it means

A quasi-identifier is an attribute, or combination of attributes, that can help link a record to a person using other information. Removing names does not necessarily remove that linkage: combinations such as age, location and occupation can still distinguish people.

Records that match on the designated quasi-identifiers form an equivalence class. A table is k-anonymous with respect to those attributes when every such class contains at least k records, under the model's assumptions about records and individuals.

The qualification matters. A table can meet the grouping rule and still expose a confidential attribute shared by everyone in a group. Additional knowledge, repeated releases and omitted identifying attributes can also change the privacy picture. k is a structural parameter, not a universal probability of safety.

How it works

Identify the release's direct identifiers and relevant quasi-identifiers, considering plausible linkage information. Transform the quasi-identifiers so that every resulting combination occurs often enough. Generalization replaces a precise value with a broader category, while suppression removes selected details or records.

Then group the transformed records by their released quasi-identifier values and check the smallest group. The minimum group size determines the largest k supported by that grouping. An average group size is insufficient because one small class can violate the target.

Evaluate the loss of analytical detail as well as the grouping property. Coarser values can affect downstream analyses, and suppressing unusual records can change the represented population. The procedure also needs a stated threat model and review of what sensitive information remains inferable; passing a group-size test is only one part of that assessment.

Three practical examples

  • A teaching dataset replaces exact ages with age bands and checks the sizes of groups sharing the released demographic fields.
  • A data-review exercise identifies a rare combination that remains unique after direct names are removed.
  • An analytics team compares candidate generalizations to see how much useful detail is lost while meeting a specified grouping target.

Think of it this way

Think of describing a person as one of several people wearing the same team uniform. The description no longer singles out one wearer, but it may still reveal something that all those wearers share.

The analogy explains the distinction between ambiguity about identity and disclosure of an attribute. Real tables involve multiple fields, outside knowledge and repeated observations, so matching uniforms are not a complete privacy model.

Worked example

A table that passes the count but still reveals an answer

Suppose a fictional six-person survey releases AgeBand, Region and RequestedPrivateSupport. Names have been removed, and each row represents a different person. Designate AgeBand and Region as the quasi-identifiers.

Three rows have AgeBand 20-29 and Region North. The other three have AgeBand 30-39 and Region South. Within each group, the released quasi-identifier values are identical. Both equivalence classes have size 3, so the table is 3-anonymous with respect to those two fields.

Now suppose RequestedPrivateSupport is Yes for all three North-group rows. Someone who knows that a particular respondent belongs to that group can infer the Yes answer without identifying which of the three rows belongs to that person. Identity ambiguity has not prevented attribute disclosure.

If one South-group row is removed without further transformation, the class sizes become 3 and 2. The remaining table is only 2-anonymous on the same attributes, not 3-anonymous. The average class size of 2.5 cannot repair that failure.

If an exact occupation field is later added and separates one member from the others, the grouping must be reconsidered with the relevant expanded quasi-identifier set. The original claim cannot cover a changed release. These invented records illustrate the model and its limitations.

Illustrative case study

The fictional Maple Data team prepares a training exercise using synthetic survey records. A reviewer checks only that every age-region combination contains three rows and initially describes the result as fully private.

Another reviewer notices that a confidential response is uniform within one group. The team changes the explanation to distinguish the demonstrated k-anonymity property from the unresolved attribute-disclosure issue. It also records which fields were included in the grouping and repeats the check whenever the release changes.

Maple evaluates whether a different release format or additional privacy approach better fits the intended analysis. This fictional case illustrates careful interpretation of a technical property.

Common misconceptions and mistakes

  • Deleting names guarantees k-anonymity. Remaining quasi-identifiers can still create small or unique groups.
  • Every record must be identical in every column. The property concerns the designated quasi-identifiers, which is also why sensitive attributes can remain exposed.
  • k is the average group size. Every equivalence class must meet the minimum.
  • A larger k eliminates all disclosure risks. Homogeneity, background knowledge and release combinations can still matter.

Business use

The concept helps teams ask concrete questions about uniqueness and linkage in tabular releases. It can also make the utility cost of broadening categories visible before information is shared.

Use the term precisely in project documentation: specify the quasi-identifiers, transformation, record population and achieved minimum group size. Avoid describing it as equivalent to differential privacy, which uses a different formal approach. Review sensitive-attribute inference and external information separately. Technical satisfaction of k-anonymity should not be presented as an automatic conclusion about a release's overall privacy or legal status.

People also ask

Does k-anonymity require adding random noise?

No. Generalization and suppression are common approaches; the definition itself is a grouping property.

Does 3-anonymity imply a one-third identification probability in every real setting?

No. That interpretation needs additional assumptions about knowledge and candidates that the grouping property alone does not establish.

What does l-diversity address?

It adds conditions concerning sensitive-value diversity within groups to address limitations such as homogeneous sensitive attributes, though it too has assumptions and limitations.

Check your understanding

Why can the North group disclose RequestedPrivateSupport even though it has three indistinguishable quasi-identifier records?

Answer: Every record in that group has the same Yes response. Knowing group membership is enough to infer the attribute without selecting a unique row.

Related terms

  • Generalization
  • Differential privacy
  • Quasi-identifier
  • equivalence class
  • suppression
  • re-identification
  • attribute disclosure
  • l-diversity

Learn next

Create a synthetic table with two quasi-identifiers and one confidential attribute. Compute every equivalence-class size, then check whether any class has a uniform confidential value. Report these as separate findings rather than one overall privacy score.

More in Graphs and symbolic AI

  • Jump point search - Jump point search, or JPS, is a pathfinding technique that reduces redundant search on suitable grid maps.
  • Jump search - Jump search is a lookup algorithm for sorted data that checks spaced block boundaries until it locates the block that could contain a target, then searches...
  • Justification - A justification is an explicit record of the reasons or conditions supporting a conclusion.
  • K-components - K-components are maximal parts of an undirected graph whose node connectivity is at least k.
  • k-d tree - A k-d tree is a binary spatial index that recursively divides points using coordinate-aligned boundaries.
  • K-edge-components - K-edge-components are maximal groups of vertices for which every pair has at least k edge-disjoint connecting paths in the original graph.

Sources

Sweeney defines k-anonymity and discusses release-related limitations: https://dataprivacylab.org/dataprivacy/projects/kanonymity/kanonymity.pdf

Machanavajjhala and colleagues analyze homogeneity and background-knowledge problems and introduce l-diversity: https://www.cs.cornell.edu/johannes/papers/2006/2006-icde-publishing.pdf

The table and Maple Data case are synthetic illustrations, not certification of a real release.

Previous: Justification Next: K-components

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer