ArticleslgStudy

computer science

Occam learning

Occam learning is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Occam learning rather than just read about it. In short: In computational learning theory, Occam learning is a model of algorithmic learning where the objective of the learner is to output a succinct representation of received training data. This is closely related to probably approximately correct (PAC) learning, where the learner is evaluated on its predictive power of a test set.

Key takeaways

  • Occam learning belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Occam learning to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Occam learning from memory before moving on to harder problems.

Reference excerpt

In computational learning theory, Occam learning is a model of algorithmic learning where the objective of the learner is to output a succinct representation of received training data. This is closely related to probably approximately correct (PAC) learning, where the learner is evaluated on its predictive power of a test set. Occam learnability implies PAC learning, and for a wide variety of concept classes, the converse is also true: PAC learnability implies Occam learnability.

Introduction Occam Learning is named after Occam's razor, which is a principle stating that, given all other things being equal, a shorter explanation for observed data should be favored over a lengthier explanation. The theory of Occam learning is a formal and mathematical justification for this principle. It was first shown by Blumer, et al. that Occam learning implies PAC learning, which is the standard model of learning in computational learning theory. In other words, parsimony (of the output hypothesis) implies predictive power.

Definition of Occam learning The succinctness of a concept c in concept class 𝒞 can be expressed by the length size(c) of the shortest bit string that can represent c in 𝒞. Occam learning connects the succinctness of a learning algorithm's output to its predictive power on unseen data. Let 𝒞 and ℋ be concept classes containing target concepts and hypotheses respectively. Then, for constants α≥0 and 0≤β<1, a learning algorithm L is an (α,β)-Occam algorithm for 𝒞 using ℋ iff, given a set S={x1,…,xm} of m samples labeled according to a concept c∈𝒞, L outputs a hypothesis h∈ℋ such that

h is consistent with c on S (that is, h(x)=c(x),∀x∈S), and size(h)≤(n⋅size(c))αmβ where n is the maximum length of any sample x∈S. An Occam algorithm is called efficient if it runs in time polynomial in n, m, and size(c). We say a concept class 𝒞 is Occam learnable with respect to a hypothesis class ℋ if there exists an efficient Occam algorithm for 𝒞 using ℋ.

The relation between Occam and PAC learning Occam learnability implies PAC learnability, as the following theorem of Blumer, et al. shows:

Theorem (Occam learning implies PAC learning) Let L be an efficient (α,β)-Occam algorithm for 𝒞 using ℋ. Then there exists a constant a>0 such that for any 0<ϵ,δ<1, for any distribution 𝒟, given m≥a(1ϵlog⁡1δ+((n⋅size(c))αϵ)11−β) samples drawn from 𝒟 and labelled according to a concept c∈𝒞 of length n bits each, the algorithm L will output a hypothesis h∈ℋ such that error(h)≤ϵ with probability at least 1−δ .Here, error(h) is with respect to the concept c and distribution 𝒟. This implies that the algorithm L is also a PAC learner for the concept class 𝒞 using hypothesis class ℋ. A slightly more general formulation is as follows:

Theorem (Occam learning implies PAC learning, cardinality version) Let 0<ϵ,δ<1. Let L be an algorithm such that, given m samples drawn from a fixed but unknown distribution 𝒟 and labeled according to a concept c∈𝒞 of length n bits each, outputs a hypothesis h∈ℋn,m that is consistent with the labeled samples. Then, there exists a constant b such that if log⁡|ℋn,m|≤bϵm−log⁡1δ, then L is guaranteed to output a hypothesis h∈ℋn,m such that error(h)≤ϵ with probability at least 1−δ. While the above theorems show that Occam learning is sufficient for PAC learning, it doesn't say anything about necessity. Board and Pitt show that, for a wide variety of concept classes, Occam learning is in fact necessary for PAC learning. They proved that for any concept class that is polynomially closed under exception lists, PAC learnability implies the existence of an Occam algorithm for that concept class. Concept classes that are polynomially closed under exception lists include Boolean formulas, circuits, deterministic finite automata, decision-lists, decision-trees, and other geometrically defined concept classes. A concept class 𝒞 is polynomially closed under exception lists if there exists a polynomial-time algorithm A such that, when given the representation of a concept c∈𝒞 and a finite list E of exceptions, outputs a representation of a concept c′∈𝒞 such that the concepts c and c′ agree except on the set E.

Proof that Occam learning implies PAC learning We first prove the Cardinality version. Call a hypothesis h∈ℋ bad if error(h)≥ϵ, where again error(h) is with respect to the true concept c and the underlying distribution 𝒟. The probability that a set of samples S is consistent with h is at most (1−ϵ)m, by the independence of the samples. By the union bound, the probability that there exists a bad hypothesis in ℋn,m is at most |ℋn,m|(1−ϵ)m, which is less than δ if log⁡|ℋn,m|≤O(ϵm)−log⁡1δ. This concludes the proof of the second theorem above. Using the second theorem, we can prove the first theorem. Since we have a (α,β)-Occam algorithm, this means that any hypothesis output by L can be represented by at most (n⋅size(c))αmβ bits, and thus log⁡|ℋn,m|≤(n⋅size(c))αmβ. This is less than O(ϵm)−log⁡1δ if we set m≥a(1ϵlog⁡1δ+((n⋅size(c))α)ϵ)11−β) for some constant a>0. Thus, by the Cardinality version Theorem, L will output a consistent hypothesis h with probability at least 1−δ. This concludes the proof of the first theorem above.

Improving sample complexity for common problems Though Occam and PAC learnability are equivalent, the Occam framework can be used to produce tighter bounds on the sample complexity of classical problems including conjunctions, conjunctions with few relevant variables, and decision lists.

Extensions Occam algorithms have also been shown to be successful for PAC learning in the presence of errors, probabilistic concepts, function learning and Markovian non-independent examples.

See also Computational learning theory Structural risk minimization

References

Further reading Blumer, A.; Ehrenfeucht, A.; Haussler, D.; Warmuth, M. K. Learnability and the Vapnik-Chervonenkis dimension. Journal of the ACM, 36(4):929–865, 1989.

Worked examples

Example 1 — a first encounter with Occam learning

Start with the simplest possible case. Write down what Occam learning claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Occam learning before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Occam learning ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Occam learning

In research
Occam learning appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Occam learning in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Occam learning is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computational learning theory, Theoretical computer science, so understanding it makes those chapters shorter.
In everyday life
Look for Occam learning outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Occam learning” →

How to study Occam learning in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Occam learning means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Occam learning out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Occam learning in simple terms?

In computational learning theory, Occam learning is a model of algorithmic learning where the objective of the learner is to output a succinct representation of received training data. This is closely related to probably approximately correct (PAC) learning, where the learner is evaluated on its pr…

Why does Occam learning matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Occam learning?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Occam learning.

Tags

  • Computational learning theory
  • Theoretical computer science

Keep exploring