Sub topic 10
Testing where the analogy holds and breaks
An analogy gives you candidate claims about your target problem. It does not give you answers. This chapter covers how to test those claims so you keep the ones that hold and discard the ones that don't.
This chapter assumes you have read the earlier chapters on structure mapping and on carrying inferences from source to target. You should be able to write a mapping between a source domain and a target problem. You should also be able to list the claims that the mapping produces. Basic Python reading ability helps with the code example, but the ideas do not depend on it.
Why evaluation is a separate step
A mapping lets you rewrite source relations in terms of target entities. The rewriting is mechanical. It works whether or not the target actually behaves that way. A mapping from planets to electrons will happily produce the claim "electrons orbit a nucleus on fixed paths." Whether that claim is true is a separate question, and the mapping cannot answer it.
So treat every transferred inference as a hypothesis. Evaluation is the work of checking each hypothesis against evidence from the target. Skipping it is the most common way an analogy turns into a mistake.
Three questions for every transferred claim
For each claim that the mapping produces, ask three questions in order.
- Does the mapping support it? Check that every entity and relation in the claim has a counterpart in the target. If an entity in the source has no match, the claim has nothing to attach to.
- Is there evidence for it in the target? Look for observations, data, or a small experiment in the target domain. The source being true is not evidence.
- Does it matter for the decision? A relation can hold and still be irrelevant to the goal. Spend your checking effort on claims that would change what you do.
The order matters. Question 1 is cheap and removes claims early. Question 2 is expensive, so you only run it on the claims that survive.
Sorting claims into three groups
After checking, every transferred claim lands in one of three groups.
| Group | Meaning | What you do |
|---|---|---|
| Holds | The target has the matching relation and evidence supports it | Use it in your design |
| Breaks | The target contradicts it or lacks the needed entity | Drop it, and record why |
| Unknown | You have no evidence either way | Test it cheaply, or treat it as a risk |
The "unknown" group is the one people forget. An analogy often feels convincing because many claims are unknown, and the mind fills them in with the source's behavior. Naming a claim "unknown" stops that.
A worked check on the atom analogy
Take the planets-to-atom mapping from the earlier chapter. The mapping sends sun to nucleus and planet to electron. It produced three candidate claims.
- The nucleus attracts the electron. This holds. Opposite charges attract, so the relation is present in the target, though the force is electric and not gravitational.
- The nucleus is more massive than the electron. This holds. A proton is roughly 1,800 times heavier than an electron.
- The electron orbits the nucleus. This is partly true and partly broken. Electrons are bound to the nucleus, but they do not follow fixed paths like planets. Their positions are described by probability distributions called orbitals.
The third claim shows why a yes/no verdict is often too coarse. The relation "is bound to" holds. The relation "follows a fixed path" breaks. Record the part that holds and the part that breaks separately.
Checking relations, not just entities
Testing the entities one at a time is not enough. Analogies live in the relations, so the relations need testing too. For each relation, check these properties.
- Direction. Does the relation point the same way in the target? "A depends on B" is different from "B depends on A".
- Strength. Is the effect as large? A relation that is dominant in the source may be negligible in the target.
- Cardinality. Is it one-to-one, one-to-many, or many-to-many? A source with one supplier and many buyers does not match a target with many suppliers.
- Time scale. Does the effect happen in the same time frame? A slow process in the source may be instant in the target, or the reverse.
- Higher-order links. Does one relation cause another in both domains? Structure mapping treats these linked systems of relations as the most valuable part of an analogy. If the links between relations break, the whole system is suspect.
Looking for the disanalogies
A disanalogy is a place where the source and target differ in a way that matters. Searching for them on purpose is the best protection against being fooled by a good-feeling analogy.
Use two prompts.
- What is in the source that has no match in the target? These are unmapped source features. Each one is either irrelevant, or it is a part of the solution you cannot borrow.
- What is in the target that has no match in the source? These are unmapped target features. Each one is a constraint the source solution never had to meet, so it may fail on it.
Write both lists down. A short list of disanalogies that you judge irrelevant is a good sign. A long list, or a list with items that affect the goal, tells you the analogy is weak.
Testing with a small program
When the source solution is an algorithm, you can test the analogy by running it. The simulated annealing idea borrowed from metallurgy is an example. The analogy says that slow cooling helps a search avoid bad local minima. You can test whether the borrowed behavior holds in your target by comparing a cooling schedule with a version that has no cooling.
import math
import random
def search(cost, neighbor, x, temp, cooling, steps=3000):
"""Return the best point found, with a given cooling rate."""
best = x
for _ in range(steps):
candidate = neighbor(x)
delta = cost(candidate) - cost(x)
if delta <= 0 or random.random() < math.exp(-delta / temp):
x = candidate
if cost(x) < cost(best):
best = x
temp = max(temp * cooling, 1e-9)
return best
# A bumpy cost curve with a global minimum near x = 3 and many local ones.
def cost(x):
return (x - 3) ** 2 + 2 * math.sin(5 * x) ** 2
def neighbor(x):
return x + random.uniform(-0.5, 0.5)
def success_rate(cooling, trials=200):
hits = 0
for _ in range(trials):
result = search(cost, neighbor, x=-4.0, temp=2.0, cooling=cooling)
if abs(result - 3) < 0.3:
hits += 1
return hits / trials
random.seed(1)
print("slow cooling:", success_rate(0.995))
print("no cooling: ", success_rate(1.0))Here cooling=1.0 keeps the temperature fixed, so it removes the borrowed idea. If the success rate with slow cooling is clearly higher than with no cooling, the analogy's key claim holds in this target. If the rates are close, the claim does not hold here, whatever the metallurgy says. Exact numbers vary with the random seed and the cost curve, so judge the gap between the two runs and not the individual values.
This is a general pattern. Remove the borrowed element, measure the difference, and let the target decide.
A diagram of the evaluation flow
Common errors in evaluation
- Checking only the claims you like. Test the claims your design depends on most, especially the ones you hope are true.
- Treating source success as evidence. The solution worked in the source. That says nothing about the target until you have target evidence.
- Counting matches instead of weighing them. Ten trivial matches do not outweigh one broken relation at the core of the solution.
- Stopping at the first break. A broken claim may only need an adjustment. Find out whether the break is fatal or fixable before discarding the analogy.
- Not recording the result. Without notes on what held and what broke, you will repeat the same checks next time, or trust the analogy more than it deserves.
Deciding what to do with the result
Use the sorted claims to make a decision.
- Most core claims hold, few break. Proceed. Adapt the solution to the unmapped target constraints.
- Core claims hold but several are unknown. Run cheap tests on the unknowns before committing.
- A core relation breaks. Look for a different source domain, or use this one only for a narrow part of the problem.
- Many small breaks. Use the analogy as a prompt for ideas, and design the solution directly from the target's own requirements.
An analogy that is partly wrong can still be useful. It becomes harmful only when you forget which parts are wrong.
Summary of the method
- List the claims the mapping produces.
- Check each claim for a counterpart in the target.
- Look for target evidence, or run a small test with the borrowed element removed.
- Check direction, strength, cardinality, time scale, and higher-order links of each relation.
- List disanalogies in both directions.
- Sort claims into holds, breaks, and unknown, and decide.
Exercise
You borrow "traffic flow" as a source for a website's checkout process. The mapping sends cars to shoppers and roads to pages. The source says that adding lanes (capacity) reduces congestion. List one way to check the claim "adding capacity reduces waiting" in the target, and name one disanalogy that could break it.
Show answer
One check is to measure waiting time at the checkout step, add capacity (for example faster servers or a simpler form), and compare waiting time before and after. A real test needs target data, not the traffic result. One possible disanalogy is that shoppers can leave and not return, while cars on a road usually continue to their destination, so abandonment may fall or rise for reasons capacity does not explain. Another is that the real bottleneck may be a payment provider, which has no counterpart to a lane. If waiting is caused by something with no mapped entity, the claim breaks.
Exercise
In the annealing test, the success rate with slow cooling is 0.62 and with no cooling is 0.60 across 200 trials. What do you conclude about the analogy's key claim in this target, and what would you do next?
Show answer
The gap is small, so the claim that slow cooling helps does not clearly hold for this cost curve. With 200 trials, a difference of 0.02 is within normal random variation. Next, check whether the cost curve has the local minima that the analogy assumes, since the borrowed idea only helps on bumpy curves. You could also rerun with more trials or different seeds, and try different starting temperatures. If the gap stays small, record the claim as "breaks in this target" and do not rely on cooling.
Exercise
A claim from your analogy has no evidence in the target, but it affects an important design choice. Which group is it in, and what should you do?
Show answer
It is in the "unknown" group. Because it affects an important decision, test it cheaply before committing, for example with a small experiment or a review of target data. If you cannot test it, log it as a risk and design so that the choice can be changed later.