What would an AI architecture look like if we designed it around competing hypotheses, explicit tests, and error correction?
That question motivates this experiment.
Drawing inspiration from Karl Popper’s account of conjectures and criticism, I wanted to explore a computational sandbox in which candidate explanations could be represented, combined, and evaluated. In Popper’s framework, surviving a test does not establish final truth: explanations remain open to criticism and revision. plato.stanford
The mathematical tool I explore here is complex-valued interference.
The central distinction is grounding: manipulating vectors is not the same as testing explanations. A useful system needs an explicit connection between its mathematical representations, its hypotheses, and the evidence used to evaluate them.
This article presents a small NumPy prototype, explains what it actually computes, and outlines the experiments needed to evaluate the idea.
It is not an AGI architecture or evidence that quantum-inspired representations outperform conventional methods.
Why Explore Another Hypothesis-Testing Architecture?
Transformers already construct contextual representations. Their internal representations are not simply static locations assigned to words: they change with the surrounding context. web.stanford
There are also existing approaches that combine language models with feedback and iterative improvement. ReAct interleaves reasoning and actions, while Reflexion uses task feedback and textual memory to improve subsequent attempts. arxiv
So the research question is not:
Can we replace static autocomplete with a system that finally performs error correction?
A more useful question is:
Can a particular representation of competing hypotheses improve selection or revision under a fixed evaluation budget?
Complex-valued representations provide one possible experimental direction. Quantum-inspired neural networks using complex-valued operations already exist, so using complex numbers is not itself a novelty claim. arxiv
The interesting question is whether a specific mechanism provides measurable value.
The Proposed Sandbox
The conceptual architecture has three components:
+--------------------------------------------------------+
| 1. Hypothesis Generator |
| Produces explicit candidate explanations |
+--------------------------------------------------------+
|
v
+--------------------------------------------------------+
| 2. Complex-Valued Representation and Combination |
| Encodes candidates and explores phase-dependent mixes |
+--------------------------------------------------------+
|
v
+--------------------------------------------------------+
| 3. External Critic |
| Tests predictions or constraints against evidence |
+--------------------------------------------------------+
|
v
Revise, retain, or reject
The third component is essential.
A critic might execute unit tests, check logical constraints, or compare predictions against observations. The appropriate test depends on the task.
The prototype below implements only a small part of the second component. It does not implement a hypothesis generator, semantic encoder, or external critic.
What Complex-Valued Interference Computes
Suppose two normalized vectors represent candidate states:
[
|\psi_1\rangle,\quad |\psi_2\rangle
]
We can combine them using a relative phase:
[
|u_\theta\rangle
|\psi_1\rangle+e^{i\theta}|\psi_2\rangle
]
When this sum is nonzero, we normalize it:
[
|\phi_\theta\rangle
\frac{|u_\theta\rangle}{|u_\theta|}
]
Changing (\theta) changes the resulting vector through reinforcement and cancellation of components.
We can then evaluate the state using a Hermitian operator (H):
[
s(\phi_\theta)
\langle\phi_\theta|H|\phi_\theta\rangle
]
This produces a real-valued score.
However, its interpretation comes from the definition of (H), not from the notation.
If (H) is random, the score is an expectation value under a random operator—not a measure of truth, logical consistency, or explanatory quality.
A Minimal NumPy Prototype
The following implementation validates dimensions, rejects near-zero states, and checks that the evaluation operator is Hermitian.
import numpy as np
class InterferenceSandbox:
def __init__(self, dimension: int, tolerance: float = 1e-12):
if dimension <= 0:
raise ValueError("dimension must be positive")
self.dimension = dimension
self.tolerance = tolerance
def _vector(self, value: np.ndarray) -> np.ndarray:
vector = np.asarray(value, dtype=np.complex128)
if vector.shape != (self.dimension,):
raise ValueError(
f"Expected shape {(self.dimension,)}, "
f"received {vector.shape}"
)
if not np.all(np.isfinite(vector)):
raise ValueError("Vector must contain finite values")
return vector
def normalize(self, value: np.ndarray) -> np.ndarray:
vector = self._vector(value)
norm = np.linalg.norm(vector)
if norm < self.tolerance:
raise ValueError("Cannot normalize a near-zero vector")
return vector / norm
def interfere(
self,
state_1: np.ndarray,
state_2: np.ndarray,
theta: float,
) -> np.ndarray:
if not np.isfinite(theta):
raise ValueError("theta must be finite")
state_1 = self.normalize(state_1)
state_2 = self.normalize(state_2)
combined = state_1 + np.exp(1j * theta) * state_2
return self.normalize(combined)
def expectation(
self,
state: np.ndarray,
operator: np.ndarray,
) -> float:
state = self.normalize(state)
operator = np.asarray(operator, dtype=np.complex128)
expected_shape = (self.dimension, self.dimension)
if operator.shape != expected_shape:
raise ValueError(
f"Expected operator shape {expected_shape}"
)
if not np.all(np.isfinite(operator)):
raise ValueError("Operator must contain finite values")
if not np.allclose(
operator,
operator.conj().T,
atol=self.tolerance,
rtol=0.0,
):
raise ValueError("Operator must be Hermitian")
value = np.vdot(state, operator @ state)
return float(value.real)
if __name__ == "__main__":
sandbox = InterferenceSandbox(dimension=4)
h1 = sandbox.normalize(
np.array([0.8 + 0.1j, 0.2, 0.1, 0.0])
)
h2 = sandbox.normalize(
np.array([0.1, 0.7 + 0.2j, 0.3, 0.1])
)
# RandomState preserves the numerical example shown below.
rng = np.random.RandomState(42)
matrix = rng.rand(4, 4)
# A random positive-semidefinite operator.
# This does not encode physical laws or semantic correctness.
operator = matrix.T @ matrix
phases = [
0.0,
np.pi / 4,
np.pi / 2,
3 * np.pi / 4,
np.pi,
]
for theta in phases:
state = sandbox.interfere(h1, h2, theta)
score = sandbox.expectation(state, operator)
print(
f"Theta: {theta:.2f} rad "
f"-> Expectation: {score:.4f}"
)
The example produces:
Theta: 0.00 rad -> Expectation: 2.9261
Theta: 0.79 rad -> Expectation: 2.7118
Theta: 1.57 rad -> Expectation: 2.0666
Theta: 2.36 rad -> Expectation: 1.0171
Theta: 3.14 rad -> Expectation: 0.4878
These numbers demonstrate phase-dependent variation for these particular vectors and this particular operator.
They do not establish a general rule that increasing phase reduces error.
Why Cancellation Is Not Falsification
Consider two identical vectors:
[
|\psi_1\rangle=|\psi_2\rangle
]
At a relative phase of (\pi):
[
|\psi_1\rangle+e^{i\pi}|\psi_2\rangle=0
]
The vectors cancel even though they are identical.
If both represented the same correct statement, cancellation would still occur. The arithmetic does not know whether the statement is true.
Likewise, introducing a phase of (\pi/2) does not make two vectors orthogonal. Orthogonality depends on their inner product; multiplying one vector by a phase does not change the magnitude of that inner product.
These examples expose the missing semantic machinery.
Before interference can function as part of a hypothesis-testing system, we must specify:
- What each vector encodes.
- How evidence determines relative phases.
- How a combined state maps back to an explicit hypothesis.
- Why the evaluation operator measures a task-relevant property.
- How external tests identify errors independently of the representation.
Without those connections, “semantic interference” is a proposed interpretation, not an implemented capability.
Why Call It Quantum-Inspired?
This prototype runs entirely on classical hardware.
Its connection to quantum mathematics is the use of complex amplitudes, relative phases, normalization, and expectation values. It does not demonstrate quantum computation or quantum advantage.
A complex vector can also be represented using two real vectors:
[
z=x+iy
\quad\longleftrightarrow\quad
(x,y)
]
Therefore, complex numbers alone are not an argument for greater intelligence.
Any benefit would need to come from the structure of the representation, the permitted operations, the learning procedure, or their interaction with the task.
What Would Make This a Meaningful Experiment?
I would start with a narrow domain where hypotheses and tests can be specified precisely.
For example, candidates could be small programs evaluated against a fixed test suite, or logical formulas checked against explicit constraints.
The experimental pipeline would need to:
- Generate explicit candidates.
- Encode them using a documented procedure.
- Select or learn phases without using held-out answers.
- Map resulting states to candidates or concrete revisions.
- Evaluate those candidates using an independent checker.
The comparison should include simpler alternatives:
| Method | Purpose |
|---|---|
| Direct candidate evaluation | Tests whether interference adds anything beyond the critic |
| Random search | Establishes a basic search baseline |
| Real-valued combination | Tests whether complex-valued structure matters |
| Fixed or random phases | Tests whether the phase-selection mechanism matters |
| Proposed learned mechanism | Measures the contribution of the full approach |
All methods should receive comparable candidate-generation and evaluation budgets.
Relevant metrics could include held-out success rate, verifier calls, runtime, and sensitivity to random seeds.
The decisive question is:
Does the interference mechanism find better candidates, or find them more efficiently, than simpler methods using the same external critic?
If it does not, the extra machinery is not justified.
Conclusion
Popper’s emphasis on criticism offers a useful design inspiration: generating a candidate and testing it are different operations, and passing a test does not make a candidate infallible. plato.stanford
Complex-valued interference offers a mathematical mechanism worth investigating, but it does not automatically supply semantic understanding or error correction.
The prototype here demonstrates vector interference—not explanatory reasoning.
The next step is to connect representations to explicit hypotheses, connect scores to independent tests, and compare the result against strong, simpler baselines.
That is how this idea can move from an appealing metaphor to a falsifiable engineering proposal.
created by :https://almodarresieh.github.io/
Top comments (0)