Semi-supervised FP-growth

Machine Learning
Introduced by
Extensions of Han, Pei & Yin (2000); semi-supervised variants developed by various authors in the 2000s–2010s
Year
2000s–2010s
Type
Semi-supervised frequent pattern mining
Family
Machine learning

What does it do?

Semi-supervised FP-growth is a family of pattern-mining extensions of the FP-growth algorithm (Han, Pei & Yin, 2000) that use partial class labels or user-specified constraints to guide which frequent itemsets and association rules are reported.

Rather than returning every frequent pattern, it favours patterns that are frequent and also relevant to the available supervision. The name does not refer to a single established specification. It is used for a general approach, and implementations differ in how supervision is scored and applied.

The intuition behind the method

FP-growth compresses a transaction database into a prefix tree and mines frequent patterns from it without generating candidates. In many datasets, however, some transactions carry class labels or domain constraints that an unsupervised run ignores, so it reports many patterns that are frequent but irrelevant to the question. The semi-supervised extension uses this side information during mining: patterns whose support is concentrated in one class are flagged as discriminative, and constraints can remove branches before they are explored. The output is a smaller rule set oriented toward the labelled structure of the data.

History

FP-growth was introduced by Jiawei Han, Jian Pei, and Yiwen Yin at the 2000 ACM SIGMOD conference as an alternative to candidate-generation approaches such as Apriori, which the paper's abstract describes as costly when there are many or long patterns. The semi-supervised and constrained extensions are later developments of this base method. No specific originating paper for these variants is cited on this page, so a particular variant should be traced to its own source before it is cited.

When to use it

Choose this method when your data are transactional or categorical, when some records carry class labels or known domain constraints, and when the question concerns association rules or frequent patterns that should respect that supervision. Market-basket data with product-category labels, clinical records with partial diagnoses, and small sets of tagged documents are examples. Do not use it when every record is labelled and the goal is prediction, since a supervised classifier is more direct. It adds little when no meaningful constraints exist, in which case plain FP-growth is sufficient, and it is not suitable for continuous data that have not been discretised into items.

Limitations and considerations

  • Without labels or constraints the method reduces to plain FP-growth, so its added value depends on the supervision being available and informative.
  • Choosing constraint types and a minimum support threshold requires domain knowledge, and the results are sensitive to these choices.
  • The FP-tree can still become large for high-dimensional, sparse transaction data, and constraint pruning does not remove that structural cost.
  • Completeness holds for the constrained pattern set only when the constraints are anti-monotone. Label-based or other post-hoc filtering can exclude frequent patterns by design, so the reported output is a selected subset rather than all frequent patterns.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Pattern selection is guided by class labels or constraints, so reported rules can be checked against known domain structure rather than read in isolation.
  • Because it builds on FP-growth, it avoids candidate generation and stores transactions in a compressed prefix tree, which is the efficiency argument of the original 2000 paper.
  • Anti-monotone constraints allow whole branches of the search to be discarded, which can reduce work compared with mining all patterns and filtering afterwards.
  • It can use partial labels or a small number of constraints, so it does not require every transaction to be annotated.
  • Its output is a list of association rules with explicit antecedents and consequents, which domain experts can inspect directly.

Applications

  • Market-basket analysis with product-category or customer-segment labels, where labels could guide rule discovery (illustrative use case, not drawn from cited studies).
  • Clinical data mining in which partial diagnosis codes constrain which co-occurrence patterns are examined (illustrative use case, not drawn from cited studies).
  • Intrusion detection, where network event data with known attack labels could be mined for discriminative patterns (illustrative use case, not drawn from cited studies).
  • Text and document mining, where a small set of tagged documents could anchor topically relevant itemsets (illustrative use case, not drawn from cited studies).
  • Bioinformatics, where gene-expression data with partial phenotype labels could be used to look for condition-specific co-expression patterns (illustrative use case, not drawn from cited studies).

How it works

How it works

1

All transactions are scanned to count item frequencies, and items below the minimum support threshold are dropped. The remaining items are ordered by frequency, and each transaction is inserted into a prefix tree along shared paths. This is the standard FP-growth construction, which avoids the candidate-generation step that the original paper describes as costly when there are many or long patterns.

2

Available supervision is encoded into the mining step: class labels on transactions, user-defined item constraints, or pairwise must-link and cannot-link relations. Anti-monotone constraints, such as forbidding a given item, allow a branch to be discarded once it violates them, because every extension of that branch violates them too. Monotone constraints, such as requiring a given item, do not allow this kind of early pruning in the same way.

3

As in standard FP-growth, conditional pattern bases are built recursively for each frequent item. The semi-supervised extension applies the injected constraints to these conditional structures before recursing, so that branches which cannot yield a valid constrained pattern are not expanded. The exact pruning rule depends on the implementation.

4

Each retained frequent itemset is compared with the labels of the transactions that contain it. Itemsets whose support is concentrated in one class can be treated as discriminative and prioritised for rule generation. No standard discriminativeness score is fixed for this step, so the score used depends on the implementation and must be defined explicitly before results are described as discriminative.

5

Association rules A → B are derived from the retained itemsets and scored by confidence, support(A ∪ B) / support(A). Confidence alone does not show whether a rule is informative about a class, so class-conditional measures such as lift or purity should be used alongside it, with their definitions stated explicitly in any analysis.

Formula
confidence(A \Rightarrow B) = \frac{support(A \cup B)}{support(A)}

Common pitfalls

  • Setting minimum support too low floods the output with trivial patterns and weakens the benefit of the supervision.
  • Reading class-conditional patterns as causal. They describe association in the data, and confounding can produce them.
  • Ignoring the imbalance between labelled and unlabelled transactions, which can skew class-conditional support toward the majority class.
  • Reporting frequent itemsets or confidence alone without a class-conditional measure, which can make rules look more informative about the labels than they are.
  • Assuming the labels improve results without checking. Compare the rule set with and without supervision on held-out labelled transactions before drawing conclusions.

Frequently asked questions

How is semi-supervised FP-growth different from constrained FP-growth?

The two names are not interchangeable in the literature. In the sense used here, constrained FP-growth applies item or pattern constraints, while this method also uses class labels attached to transactions to score how discriminative a pattern is. Sources differ on these boundaries, so the terms should be checked against the specific paper being followed.

How many labelled transactions do I need?

No fixed minimum is established. Labels help only if the labelled transactions represent the class structure of the data, so the benefit should be checked on your own data rather than assumed from a fixed proportion.

What minimum support threshold should I set?

Begin with a high threshold and lower it gradually, watching the number of rules and their confidence and class-conditional measures. The appropriate level depends on the dataset and cannot be fixed in advance.

Can I use this method with continuous features?

Not directly. FP-growth operates on categorical or binary items. Continuous features must first be discretised (e.g., binned into low/medium/high ranges) before the algorithm can treat them as items in a transaction.

Does it guarantee finding all frequent patterns?

Only in part. Variants that apply anti-monotone constraints keep the search complete for the constrained pattern set. If label-based filtering is applied after mining, some frequent patterns are excluded by design, so the output is a selected subset.

Related methods

Sources

  1. Han, J., Pei, J., & Yin, Y. (2000). Mining frequent patterns without candidate generation. Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, 1–12.

    Open DOI reference
  2. FP-growth algorithm. Wikipedia.

    Open publication reference