AI Glossary / Graphs and symbolic AI / Intermediate

Factor

Definition

A factor, in probabilistic graphical-model inference, is a function that assigns a numerical value to each combination of values of some variables. Factors provide manageable pieces from which larger probability calculations can be assembled. A factor used in probability inference typically has nonnegative entries, but it need not itself be a normalized probability distribution.

What it means

Suppose a model concerns weather, road conditions and travel delays. Instead of storing one enormous table for every possible combination, it can represent relationships through smaller functions involving selected variables. Each such function is a factor, and its participating variables form its scope.

The word has other meanings in statistics, mathematics and business. Here it means the table or function manipulated during inference, particularly variable elimination. It does not mean a latent factor from factor analysis, a multiplication divisor, or simply anything that influences an outcome. A factor can encode a probability, a likelihood contribution or an intermediate result.

How it works

Three operations do much of the work. Conditioning fixes an observed variable and retains the entries consistent with its value. Multiplication combines factors by multiplying entries that agree on shared variables, producing a factor over the union of their scopes. Summing out removes a variable by adding entries across its possible values.

For a query, an inference algorithm restricts factors using evidence, combines relevant factors and eliminates variables that are not needed in the final answer. The resulting nonnegative values may require normalization: divide each by their total, provided that total is positive.

A small starting factorization does not guarantee cheap inference. Intermediate factors can involve many variables, making their tables large. The elimination order affects these intermediate scopes even though correct exact computation gives the same query answer. Factor representation and algorithm design therefore matter alongside the model's initial appearance.

Three practical examples

1. A fault-diagnosis model combines a prior over equipment states with factors describing possible sensor observations. Evidence changes the relative support for the states without requiring the sensor likelihood itself to sum to one across states.

2. A language model based on a graphical structure uses local compatibility factors between neighboring labels. Their product scores an overall labeling before appropriate normalization or optimization.

3. A planning support system combines conditional probability tables for disruptions and delays. Summing out an unobserved intermediate variable leaves a factor over the variables relevant to the user's question.

Think of it this way

Think of transparent sheets containing scores for different combinations of choices. Align matching labels, multiply the aligned scores, then add across choices you no longer need to distinguish. The analogy emphasizes matching labels, not physical layout. Real factors have explicit variable domains and mathematical operations; blindly multiplying numbers in corresponding spreadsheet cells can combine incompatible assignments.

Worked example

Let X be a binary hidden condition with prior factor f(X): f(0) = 0.7 and f(1) = 0.3. Let E be a binary observation, with P(E = 1 given X = 0) = 0.2 and P(E = 1 given X = 1) = 0.8. The complementary probabilities for E = 0 are 0.8 and 0.2 respectively.

Observe E = 1. Restricting the observation table produces factor g(X) with entries 0.2 and 0.8. Multiply: h(0) = 0.7 × 0.2 = 0.14, and h(1) = 0.3 × 0.8 = 0.24. Summing out X gives 0.38, the probability of this evidence under the model.

Normalize h to answer the posterior query: P(X = 1 given E = 1) = 0.24/0.38 = 12/19, approximately 0.632. The other value is 7/19, approximately 0.368. The unnormalized factor h is useful despite summing to 0.38 rather than one. This is an invented arithmetic example, not a calibrated diagnostic system.

Illustrative case study

Fictional case study: Rowan Analytics builds a small equipment-state model. An engineer mistakenly normalizes every intermediate factor separately across a convenient table axis, without checking the variable meaning. The resulting calculation changes the relative support for states.

The team labels each factor with its scope and documents whether its entries are conditional probabilities, likelihoods or intermediate products. It verifies the tiny example by direct enumeration before scaling up. The case illustrates why factor semantics matter; it reports no measured accuracy improvement and does not claim that arbitrary normalization is always harmless.

Common misconceptions and mistakes

Not every factor is a standalone probability distribution. A conditional table is normalized over its child variable for each parent assignment, whereas an intermediate factor may have no such row-sum requirement.

Multiplication is not matrix multiplication unless a separately defined encoding makes it so; the operation matches assignments to shared variables. Also, summing out a variable is different from setting it to its most likely value. If the evidence has zero probability under the model, the usual posterior normalization is undefined rather than a valid division by zero. That situation needs investigation, not an invented probability.

Business use

Factors make probabilistic models easier to inspect and reuse when different parts of a problem involve different variables. Business teams can separate evidence models, prior assumptions and derived results instead of hiding everything in one large table.

For implementation review, check variable names, domains, ordering and units of interpretation. Estimate the largest intermediate table, not merely the size of the input tables. Compare exact results with small enumerated cases and examine numerical stability for long products. A transparent factor calculation remains only as useful as the assumptions and data behind it.

People also ask

Must a factor be stored as a table?

No. A formula or structured representation can define its values, particularly for large or continuous domains.

Can a factor contain only a constant?

Yes. After all its variables are fixed or eliminated, it can have an empty scope and a single value.

Does a factor prove that variables are independent?

No. Independence depends on the complete model and its semantics. A factor involving several variables often represents their interaction.

Check your understanding

Why is h(1) = 0.24 not the posterior probability in the worked example?

Answer: It is the joint weight for X = 1 and the observed evidence. Dividing by the total evidence probability 0.38 gives the posterior 12/19.

Related terms

  • Variable elimination
  • Factor graph
  • Conditional probability table
  • Marginalization
  • Normalization
  • Likelihood
  • scope
  • graphical model
  • treewidth

Learn next

Practice conditioning, multiplying and summing out on two small labeled factors. Then change the elimination order in a three-variable example and compare intermediate scopes while checking that the final normalized answer remains the same.

More in Graphs and symbolic AI

  • Extendible hashing - Extendible hashing is a dynamic indexing method that uses selected bits of a key's hash value to locate a storage bucket through a directory.
  • Extensive form - Extensive form is a way of representing a game that explicitly describes the sequence of decisions, who makes them, what each player knows when choosing...
  • Fact - A fact, in a symbolic knowledge system, is an assertion treated as true for the purposes of reasoning.
  • Factored frontier - Factored frontier is an approximate inference algorithm for dynamic Bayesian networks.
  • Factored representation - A factored representation describes a state using a set of variables or features and their values.
  • Factorial HMM - A factorial hidden Markov model, or factorial HMM, represents a time-varying hidden state as several component state variables rather than one categorical...

Sources

Primary source: Poole and Mackworth, “Variable Elimination for Belief Networks,” including its factor definitions and operations: https://artint.info/2e/html2e/ArtInt2e.Ch8.S4.SS1.html . The worked probabilities and fictional case are original teaching material. This entry deliberately uses the graphical-model inference sense of factor.

Previous: Factoid questions Next: Factor analysis

  • 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