ArticleslgStudy

computer science

Oja's rule

Oja's rule 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 Oja's rule rather than just read about it. In short: Oja's learning rule, or simply Oja's rule, named after Finnish computer scientist Erkki Oja (Finnish pronunciation: [ˈojɑ], AW-yuh), is a model of how neurons in the brain or in artificial neural networks change connection strength, or learn, over time. It is a modification of the standard Hebb's Rule that, through multiplicative normalization, solves all stability problems and generates an algorithm for principal c…

Key takeaways

  • Oja's rule 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 Oja's rule to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Oja's rule from memory before moving on to harder problems.

Reference excerpt

Oja's learning rule, or simply Oja's rule, named after Finnish computer scientist Erkki Oja (Finnish pronunciation: [ˈojɑ], AW-yuh), is a model of how neurons in the brain or in artificial neural networks change connection strength, or learn, over time. It is a modification of the standard Hebb's Rule that, through multiplicative normalization, solves all stability problems and generates an algorithm for principal components analysis. This is a computational form of an effect which is believed to happen in biological neurons.

Theory Oja's rule requires a number of simplifications to derive, but in its final form it is demonstrably stable, unlike Hebb's rule. It is a single-neuron special case of the Generalized Hebbian Algorithm. However, Oja's rule can also be generalized in other ways to varying degrees of stability and success.

Formula Consider a simplified model of a neuron y that returns a linear combination of its inputs x using presynaptic weights w: y(𝐱) = ∑j=1mxjwj Oja's rule defines the change in presynaptic weights w given the output response y of a neuron to its inputs x to be

Δ𝐰 = 𝐰n+1−𝐰n = ηyn(𝐱n−yn𝐰n), where η is the learning rate which can also change with time. Note that the bold symbols are vectors and n defines a discrete time iteration. The rule can also be made for continuous iterations as

d𝐰dt = ηy(t)(𝐱(t)−y(t)𝐰(t)).

Derivation The simplest learning rule known is Hebb's rule, which states in conceptual terms that neurons that fire together, wire together. In component form as a difference equation, it is written

Δ𝐰 = ηy(𝐱n)𝐱n, or in scalar form with implicit n-dependence,

wi(n+1) = wi(n)+ηy(𝐱)xi, where y(xn) is again the output, this time explicitly dependent on its input vector x. Hebb's rule has synaptic weights approaching infinity with a positive learning rate. We can stop this by normalizing the weights so that each weight's magnitude is restricted between 0, corresponding to no weight, and 1, corresponding to being the only input neuron with any weight. We do this by normalizing the weight vector to be of length one:

wi(n+1) = wi(n)+ηy(𝐱)xi(∑j=1m[wj(n)+ηy(𝐱)xj]p)1/p. Note that in Oja's original paper, p=2, corresponding to quadrature (root sum of squares), which is the familiar Cartesian normalization rule. However, any type of normalization, even linear, will give the same result without loss of generality. For a small learning rate |η|≪1 the equation can be expanded as a Power series in η.

wi(n+1) = wi(n)(∑jwjp(n))1/p + η(yxi(∑jwjp(n))1/p−wi(n)∑jyxjwjp−1(n)(∑jwjp(n))(1+1/p)) + O(η2). For small η, our higher-order terms O(η2) go to zero. We again make the specification of a linear neuron, that is, the output of the neuron is equal to the sum of the product of each input and its synaptic weight to the power of p-1, which in the case of p=2 is synaptic weight itself, or

y(𝐱) = ∑j=1mxjwjp−1. We also specify that our weights normalize to 1, which will be a necessary condition for stability, so

|𝐰| = (∑j=1mwjp)1/p = 1, which, when substituted into our expansion, gives Oja's rule, or

wi(n+1) = wi(n)+ηy(xi−wi(n)y).

Stability and PCA In analyzing the convergence of a single neuron evolving by Oja's rule, one extracts the first principal component, or feature, of a data set. Furthermore, with extensions using the Generalized Hebbian Algorithm, one can create a multi-Oja neural network that can extract as many features as desired, allowing for principal components analysis. A principal component aj is extracted from a dataset x through some associated vector qj, or aj = qj⋅x, and we can restore our original dataset by taking

𝐱 = ∑jaj𝐪j. In the case of a single neuron trained by Oja's rule, we find the weight vector converges to q1, or the first principal component, as time or number of iterations approaches infinity. We can also define, given a set of input vectors Xi, that its correlation matrix Rij = XiXj has an associated eigenvector given by qj with eigenvalue λj. The variance of outputs of our Oja neuron σ2(n) = ⟨y2(n)⟩ then converges with time iterations to the principal eigenvalue, or

limn→∞σ2(n) = λ1. These results are derived using Lyapunov function analysis, and they show that Oja's neuron necessarily converges on strictly the first principal component if certain conditions are met in our original learning rule. Most importantly, our learning rate η is allowed to vary with time, but only such that its sum is divergent but its power sum is convergent, that is

∑n=1∞η(n)=∞, ∑n=1∞η(n)p<∞, p>1. Our output activation function y(x(n)) is also allowed to be nonlinear and nonstatic, but it must be continuously differentiable in both x and w and have derivatives bounded in time.

Applications Oja's rule was originally described in Oja's 1982 paper, but the principle of self-organization to which it is applied is first attributed to Alan Turing in 1952. PCA has also had a long history of use before Oja's rule formalized its use in network computation in 1989. The model can thus be applied to any problem of self-organizing mapping, in particular those in which feature extraction is of primary interest. Therefore, Oja's rule has an important place in image and speech processing. It is also useful as it expands easily to higher dimensions of processing, thus being able to integrate multiple outputs quickly. A canonical example is its use in binocular vision.

Biology and Oja's subspace rule There is clear evidence for both long-term potentiation and long-term depression in biological neural networks, along with a normalization effect in both input weights and neuron outputs. However, while there is no direct experimental evidence yet of Oja's rule active in a biological neural network, a biophysical derivation of a generalization of the rule is possible. Such a derivation requires retrograde signalling from the postsynaptic neuron, which is biologically plausible (see neural backpropagation), and takes the form of

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Oja's rule

Start with the simplest possible case. Write down what Oja's rule 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 Oja's rule 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 Oja's rule 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 Oja's rule

In research
Oja's rule 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 Oja's rule 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
Oja's rule is common in secondary-school and first-year university syllabi. It links to neighbouring topics Artificial neural networks, Biophysics, Computational neuroscience, so understanding it makes those chapters shorter.
In everyday life
Look for Oja's rule 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 “Oja's rule” →

How to study Oja's rule in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Oja's rule 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 Oja's rule out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Oja's rule in simple terms?

Oja's learning rule, or simply Oja's rule, named after Finnish computer scientist Erkki Oja (Finnish pronunciation: [ˈojɑ], AW-yuh), is a model of how neurons in the brain or in artificial neural networks change connection strength, or learn, over time. It is a modification of the standard Hebb's R…

Why does Oja's rule 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 Oja's rule?

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 Oja's rule.

Tags

  • Artificial neural networks
  • Biophysics
  • Computational neuroscience
  • Hebbian theory
  • Neural circuitry

Keep exploring