A Small Mathematical Object Worth Testing; E-Guard Operator

Explore the E-Guard Operator, a simple metric-space operator with provable results on guarded dynamics, fixed points, composition, and optimization. A simple mathematical operator with unexpectedly rich behavior.

Share

The E-Guard Operator is a simple threshold operator on metric spaces that reveals surprising behavior in discrete dynamical systems, optimization, and guarded iteration.

A Small Mathematical Object Worth Testing

Not every mathematical contribution has to be large. Sometimes a single definition is enough to uncover interesting behavior. The E-Guard Operator came from a simple question: what happens if a transformation is allowed to act only when it moves the current state by no more than a chosen tolerance?

That rule is almost trivial to state, but it immediately produces a collection of surprisingly clean mathematical questions. What kinds of dynamics survive? Which disappear? What new equilibria are created? How does guarding interact with composition? What can be proved exactly, and what remains open?

Over the past several days I reduced the idea to its simplest form, tested it computationally, discarded claims that turned out to be false, and kept only results that are either directly provable or reproducible from code. I also compared the construction against nearby areas including hybrid systems, event-triggered control, trust-region methods, viability theory, and related literature. I found many neighboring ideas, but I have not found this exact operator or this particular collection of structural results. That may simply mean I have not yet found the right paper.

So rather than let it sit on my hard drive, I'm publishing it.

Think of what follows as a research note, not a finished theory. Perhaps someone working in dynamical systems, optimization, control theory, numerical analysis, or another field will find it useful, extend it, or break it. LMK.

The note begins below.

E-Guard Operator

The ε-guard: one rule, what it provably does, what it provably costs, and what's still open.


Everything below is either proved in a few lines or reproducible from the code at the bottom.

The rule

Take any space X with a distance d. Take any transformation T. Fix a tolerance ε > 0. The guarded version of T is:

G(T)(x) = T(x)   if d(T(x), x) ≤ ε
      = x     otherwise

Apply the transformation only if it moves the state a small distance. Otherwise do nothing. That's the whole thing. The object of study is the quadruple (X, d, ε, T).

What it provably does

1. It bounds speed, not position. After n guarded steps you can be up to n·ε away from where you started, and that bound is tight, a patient sequence of small steps reaches it exactly.

2. The freezing theorem. For one fixed map T, call A = {x : d(T(x), x) ≤ ε} the slow region. Every guarded orbit does exactly one of two things: it follows T inside A forever, or it follows T until the first moment it would leave A, and then freezes at that point permanently. Rejection is forever, because the same test on the same state gives the same answer every time.

3. Fixed points. The equilibria of G(T) are the equilibria of T, plus the entire rejection region. These guard-induced equilibria come in frozen continua: a whole neighborhood stops together. They are stable (nothing nearby moves) but never attracting (nothing converges to them, things just stop at them).

4. Symmetry, and its limits. The guard respects isometries of (X, d): distance-preserving changes of coordinates commute with guarding. It does not respect anything else. Rescale your units by 100 and an operation that was accepted becomes rejected. So this is not a universal law of anything; it is a theory relative to a chosen metric and tolerance.

5. Guarding doesn't commute with composition. Guarding two steps separately allows a net move of 2ε that guarding the composition rejects. Guarding the composition accepts a huge excursion that returns to within ε of the start, which the separate guards reject. Neither refines the other.

6. Knife-edge sensitivity. A perturbation of T as small as 10⁻⁶ can flip an orbit's entire fate, from converging to frozen-from-step-one, if it sits at the boundary of the slow region. Guarded systems are stable in state and unstable in structure.

What it's good for, and what it costs

Example: rejecting corrupted updates. In stochastic optimization where 5% of updates are corrupted (hardware fault, adversarial client, bad sensor), with everything else equal:

defensefinal errorworst excursion
nothing34,331198,244
clip large updates to ε0.2044.5
reject large updates (the guard)0.0754.5

In this experiment, rejection outperformed clipping because clipping still permits an ε-sized step in the corrupted direction, while rejection eliminates the update entirely.

The cost: you cannot buy retention without giving up learning. Train a model on task A, then on the exact opposite task B. On perfectly contradictory tasks, retention of A plus accuracy on B sums to ~100% in every configuration, guarded or not. The guard picks a point on that line; so does a plain small learning rate, and the two land on the same points (guard ε = 0.1: 87.2% / 12.9%; no guard, small learning rate: 87.2% / 12.8%). Any claim of high retention on contradictory tasks is, equally, a claim of not learning the new task.

Open, this is where to play

  • Rotation unfreezes. The freezing theorem dies the moment you cycle between different operators: a state frozen for T₁ may be movable by T₂. What do rotating or random guarded compositions do in the long run? Invariant sets? Invariant measures?
  • The boundary. The slow region A is a sub-level set of the displacement function δ(x) = d(T(x), x). As ε varies, A is a filtration, and its topology changes exactly at critical values of δ. What does the persistence of that filtration tell you about the guarded dynamics?
  • Adaptive ε, history-dependent acceptance, probabilistic acceptance. All different operators; none covered by the theorems above. (Warning: probabilistic acceptance walks straight into Metropolis–Hastings territory. Know that literature before claiming anything.)
  • Prior art. Nearby fields: event-triggered control, hybrid systems, dead-zone adaptation, norm-threshold rejection in Byzantine-robust learning. If you find these theorems already stated there, tell us, we'll cite and shrink further.

Play with it

Zero dependencies. Copy, run, break.

import random

def G(eps, T):
   return lambda x: T(x) if abs(T(x) - x) <= eps else x

eps = 0.01

# 1) drift: small steps go anywhere (bound is n*eps, not eps)
x = 0.0
for _ in range(100_000):
   x = G(eps, lambda v: v + 0.0099)(x)
print("drift:", round(x, 1), "(bound is n*eps — there is no eps-sized cage)")

# 2) freezing: evolve while slow, freeze forever at first fast point
T = lambda v: v + (0.008 if v < 0.05 else 1.0)
x, seen = 0.0, []
for _ in range(15):
   x = G(eps, T)(x); seen.append(round(x, 3))
print("freeze:", seen)

# 3) composition doesn't commute with guarding
T1, T2 = (lambda v: v + 10), (lambda v: v - 10 + 0.005)
print("guard(T2∘T1):", G(eps, lambda v: T2(T1(v)))(0.0),
     " guard(T2)∘guard(T1):", G(eps, T2)(G(eps, T1)(0.0)))

# 4) rejecting corrupted updates vs doing nothing
def run(guarded):
   x, target = 0.0, 5.0
   for _ in range(3000):
       step = -0.1 * (x - target) + random.gauss(0, 0.01)
       if random.random() < 0.05:                 # corrupted update
           step = random.choice([-1, 1]) * 1e6
       x = G(0.6, lambda v: v + step)(x) if guarded else x + step
   return abs(x - target)
print("error unguarded:", round(run(False), 1), " guarded:", round(run(True), 4))

Read more