Contents

Foundation Model Engineering

Manuscript updated (UTC) · Chapter source on GitHub · Cite this chapter (RIS)

On this page

1.1 Symbolism vs. Connectionism

A library keeps two catalogs. Each records whether a copy is on loan: 1 means yes, 0 means no. When one catalog says 1 and the other says 0, someone needs to check the record. How would you build that check? How would your answer change if one of the catalogs contained handwritten notes instead of flags?

Write a rule for two known facts

For two flags AA and BB, the Python expression A != B returns whether they disagree. This is exclusive OR (XOR). A rule engine could record which copy it checked, the two input values, and why it flagged them. The rule and its inputs can be inspected separately. This illustrates symbolism, the use of explicit symbols and operations on them. Newell and Simon argued that systems manipulating symbols could produce general intelligent action. They presented this as a hypothesis about intelligence. [1]

A rule can run exactly as written and still give the librarian the wrong answer. If both records say “on loan” after the copy has been returned, XOR correctly reports agreement. Did the catalogs disagree? No. Is the book on the shelf? That requires fresh evidence.

Give the same two facts to a neuron

A threshold neuron computes a score s=wAA+wBB+bs=w_A A+w_B B+b. The two weights wA,wBw_A,w_B determine each input’s contribution, and the bias bb shifts the cutoff. Our neuron returns 1 when s≥0s\geq0. With weights (1,1)(1,1) and bias −1.5-1.5, the pair (1,1)(1,1) gets a score of 0.50.5. Each of the other three scores is negative. This neuron implements AND: both catalogs say the book is on loan.

Can one neuron match all four rows?

Score = weight A × A + weight B × B + bias. The neuron returns 1 when the score is zero or greater.

Rule and neuron settings
Two outputs for the same inputs
ABScoreNeuronAND
00-1.500
01-0.500
10-0.500
110.511

The neuron matches AND on 4 of 4 inputs.

Switch the target rule to XOR. Keep both weights at 1 and set the bias to −0.5-0.5. The neuron now flags (0,1)(0,1) and (1,0)(1,0) correctly. It also flags (1,1)(1,1), where the two catalogs agree. All four possible inputs fit in the table, so we can identify the exact error hidden by the summary “three out of four.”

Why a single threshold cannot separate XOR

The input (0,0)(0,0) must give 0, so b<0b<0. The two unequal inputs must each give 1, so wA+b≥0w_A+b\geq0 and wB+b≥0w_B+b\geq0. Adding those inequalities and subtracting bb gives

wA+wB+b≥−b>0.w_A+w_B+b \geq -b > 0.

The left side is the score for (1,1)(1,1). It would have to be negative for the neuron to return the correct answer. Changing weights or running an optimizer for longer cannot resolve that contradiction for these two raw inputs. The restriction is on this particular representation and decision rule. [3]

Build a representation that separates the cases

Give the network two hidden units. The first computes h1=max⁡(0,A−B)h_1=\max(0,A-B) and the second computes h2=max⁡(0,B−A)h_2=\max(0,B-A). The first fires when only catalog A reports a loan. The second fires when only B does. Their sum is 1 for either disagreement and 0 for agreement.

This CPU PyTorch example sets the weights by hand so that you can check every intermediate value. The four rows cover the full domain of binary flags. There is no training run.

import torch

# Each row is one copy's pair of catalog flags. Each column of weights
# feeds one hidden unit. Negative differences are clipped to zero.
flags = torch.tensor([[0, 0], [0, 1], [1, 0], [1, 1]], dtype=torch.float32)
weights = torch.tensor([[1, -1], [-1, 1]], dtype=torch.float32)
hidden = torch.relu(flags @ weights)
alerts = hidden.sum(dim=1)

rule = (flags[:, 0] != flags[:, 1]).float()
torch.testing.assert_close(alerts, rule)
print(hidden.tolist())  # [[0.0, 0.0], [0.0, 1.0], [1.0, 0.0], [0.0, 0.0]]
print(alerts.tolist())  # [0.0, 1.0, 1.0, 0.0]

In a connectionist model, interconnected units transform an input through weighted computations. Their weights can be learned from examples. Here the hand-set weights demonstrate what the network can express. To demonstrate learning, you would have to start with other weights, specify an objective, and record what the updates produce. Adding a second linear map alone would leave the network linear. The clipping operation is doing real work.

What changed between the perceptron and the hidden layer?

Rosenblatt’s perceptron investigated how connections could change through experience. Minsky and Papert later analyzed mathematical limits of perceptrons, including parity problems. Rumelhart, Hinton and Williams showed how errors propagated backward through a multilayer network could adjust internal connections so that hidden units represented features useful to a task. The catalog example isolates the distinction between choosing a feature by hand and learning it. [2] [3] [4]

Where a foundation model belongs

Now suppose a note reads “back on the shelf since Tuesday.” Extracting the current loan status from many different phrasings is a different job from comparing two bits. A foundation model is trained on broad data and can be adapted to many tasks. Such a model could read these notes and propose a status. A program could then apply the explicit comparison. Combining neural and symbolic operations in one system is an active area of research. [5] [6]

Give the extractor three possible outputs: on loan, returned, or unknown. Route unknowns for review. On a held-out set of notes, count extraction mistakes and abstentions. Separately, run the comparison rule on every pair of known flags. If alerts suddenly double after a new abbreviation appears in the notes, these two checks let you investigate which step changed. The next section asks how to tell which distinctions an input representation preserves.

Quizzes

Quiz 1: Both catalogs agree that a returned copy is still on loan. What would a flawless XOR check report? It reports 0, because the records agree. Detecting the stale status requires a source of information about the return.

Quiz 2: With both weights at 1 and bias −0.5, which input defeats the neuron as an XOR detector? For (1,1) the score is 1.5, so the neuron returns 1. XOR requires 0 because the flags agree.

Quiz 3: What happens if you remove ReLU and sum the two hidden values? The signed differences cancel on every row: (A − B) + (B − A) = 0. Clipping the negative value lets the positive difference survive.

Quiz 4: Do four correct outputs show that this network learned, or that it can read a librarian’s note? They establish the behavior of these hand-set weights over all binary inputs. Learning would require evidence of parameter updates. Reading notes would require separate tests on text and a policy for ambiguous notes.

References

  1. Newell, A., and Simon, H. A. (1976). Computer Science as Empirical Inquiry: Symbols and Search.
  2. Rosenblatt, F. (1958). The Perceptron: A Probabilistic Model for Information Storage and Organization in the Brain.
  3. Minsky, M., and Papert, S. (1969). Perceptrons.
  4. Rumelhart, D. E., Hinton, G. E., and Williams, R. J. (1986). Learning Representations by Back-Propagating Errors.
  5. Garcez, A. d’A., and Lamb, L. C. (2020). Neurosymbolic AI: The 3rd Wave.
  6. Bommasani, R., et al. (2021). On the Opportunities and Risks of Foundation Models.