\( \newcommand\Der{\mathrm{D}} \newcommand\dif{\mathrm{d}} \newcommand\Pmf{\mathrm{p}}% probability mass function \newcommand\Prm{\mathrm{P}}% probability measure \)
See also the Wikipedia article on intelligent agents.
Agent input \(x : \Real → Input\).
Agent output \(y : \Real → Output\).
Constant behavior \( f \) such that \[ y(t) = f(x(t)) \]
Also called “reflex agent”?
Is the agent’s memory part of the agent or part of the environment?
State \(m\).
Constant behavior \(f\) such that \[ (m(t+\dif t),y(t)) = f(m(t),x(t)) \]
\( Input = \Real^m \)
\( Output = \Real^n \)
Given data/observations/experiments \( x_1 ∧ \ldots ∧ x_n \), infer the simplest hypothesis \( y \) such that \( y → (x_1 ∧ \ldots ∧ x_n) \).
Example of generalization: \( p(a) → ∀ x [p(x)] \).
Input: \( x(t) \).
Output: \( y(t) \).
Internal: \( y(t) = f(t,x(t)) \).
An agent has input and output.
An agent logic is a function
We assume that the world remembers the agent memory.
Let
Let
Let
Let
Let
We assume that the agent needs one time step to compute the output.
\[
\begin{aligned}
y~(t+1) &= Y~(x~t)~(m~t)~t
m~(t+1) &= M~(x~t)~(m~t)~t
\
x~(t+1) &= X~(x~t)~(y~t)~t
\end{aligned}
\]
See endo.html (The endofunction model of worlds and agents, and its philosophical implications)?
Intelligence model
Legg & Hutter AIXI
Adaptation model
Boredom model
Learning model
Knowledge/thought/reasoning model
Feeling model
Agent A feels feeling F with strength S iff …?
Do people become bored when they meditate?
We assume that you have read endo.html.
Now we define intelligence, but we have to define the required things first.
We define the /orbit/[fn::”Orbit” is a standard mono-unary algebra terminology.] of \(A\) at \(x\) as the sequence
We have a function
Now we assume that every state
The function
The agent displays an intelligent behavior if it can minimize the long-term penalty from lots of starting states. The most intelligent agent is the one that minimizes its lifelong sum of penalty?
We can think of a human as a dynamical system. Given two phase space trajectories, the most intelligent is the most homeostatic, the most stabilizing, the most controlling. (Why?)
An agent constructs its self model by correlating the output that is fed back to the input.
Self is the extent of control.
The brain is an associative machine and a pattern recognizer?
The brain finds associations across space and associations across time, and find spatial patterns and temporal patterns and spatiotemporal patterns.
What is the relationship between association and pattern?
“Together” means in a space interval under a few meters and a time interval under a few hundred milliseconds.
Each time agent X observes input E and input F having the same value, X increases its association strength of E and F.
The input is X = [x1 … xn], an \( n \)-dimensional vector; or an infinite vector with finite non-zero cells. Each cell is in [0,1].
The correlation matrix is M, an \( n × m \) matrix; or an infinite matrix with finite non-zero cells.
The output is Y = M X. Each cell is in [0,1]. The output can be interpreted classically as the output itself, or be interpreted probabilistically, in which each output cell is the probability of the firing the corresponding output actuator.
Y0 = M0 X0 W1 = f(W0,Y0) X1 = g(W1) Y1 = M1 X1 W2 = f(W1,Y1) X2 = g(W2) Y2 = M2 X2 Wk = f(Wk-1,Yk-1) Xk = g(Wk) Yk = Mk Xk ...
Some of the output feeds back into the input. Some of the input comes from the environment. This enables the agent to understand itself, that is, to build a model of itself, but not necessarily to know itself.
The agent wants to minimize its approximation error Y - M X. That is, the agent wants to build an accurate self model. The question is: How should it update its M for the next time step?
I think the key to making an AI is to make a machine that can establish association across spacetime.
The brain does not understand causality. It only understands association. The mind understands mathematics and causality.
Artificial intelligence is constrained optimization.
Generate vs discriminative.
Type type of an expert system is
A learning algorithm is stable iff its generalization error is bounded.
| domain | codomain | name |
|---|---|---|
| \(\{0,1\}^*\) | \(\{0,1\}^*\) | compression (if bijective) |
| \(\{0,1\}^*\) | \(\{0,1\}\) | decider |
| \([0,1]^n\) | \([0,1]\) | neuron |
| \(E\) | \(C\) finite | classification (if surjective) |
| \(E\) finite | \(C\) finite | discrete classification (if surjective) |
| \(E\) finite | \(C\) of size 2 | discrete binary classification (if surjective) |
| \(\Nat\) | \(E\) | sequence |
| \(E^n\) | \(E\) | stateless next-value predictor with lag \(n\) |
| \(C × E^n\) | \(C × E\) | stateful next-value predictor with lag \(n\) |
Let
Define
Soft classifier: define $m~x = tanh-1~(h~x)$.
A training point
Alternative formulation:
An upper level is a hyperplane
Define
Intelligence is an ordering (2018-04-26). This idea goes back at least to 2004 in \cite[p.2]{hutter2004universal}. Intelligence is an ordering of systems. An order is a transitive antisymmetric relation.
How do we decide which of system \(A\) and system \(B\) is more intelligent in task \(T\)?
Let
We say “$A$ is
Let
We say “$A$
We define “to be more
The
Example: Which is more intelligent, a dog or a rock? That depends on the task. It’s the rock if the task is to sit still. It’s the dog if the task is to move around.
Intelligence is function optimization (2018-04-27).
Let
Intelligence is what?
Intelligence is a spectrum. Is a human intelligent? Is a rock intelligent? A human is more intelligent than a rock. Is a human pretending to be a rock intelligent?
Can an intelligent system look non-intelligent (hide its intelligence)?
We can measure intelligence as numbers.
Adapting needs learning.
We say X adapts to Y iff Y surprises X less as time goes by. (Whose idea is this?)
Intelligence needs state. State needs time. Intelligence is control. An intelligent system is a special case of control system.
Intelligence relative to something is a real number.
Is a company, which consists of intelligent people, intelligent?
Alan Turing proposed the Turing test.
I think we use the word ‘intelligence’ to refer to a stabilizing behavior that is complex enough to elude a simple explanation.
I think we agree that we are intelligent.
We cannot know if something is intrinsically intelligent. We can only determine intelligence from what we can observe.
How do we determine how intelligent something is? An intelligent being may elude detection by pretending to be unintelligent.
What is a mathematical theory of intelligence?
(RAMBLE; DELETE)
Here I try an alternative formalization to \cite[p.12]{DefineMachIntel}.
Let
Let
The intelligence of the agent with respect to
A performance consists of an agent and an environment.
Assumption: The agent cannot modify
Behavior is a function taking an environment and outputing something.
Intelligence is relative to
If we see longevity as intelligence test, then an illiterate farmer who lives to 80 is more intelligent than a scientist who dies at 20, but a rock that has been there for 100 years would even be more intelligent than the farmer.
If we see money as intelligence test, then a corrupt politician who steals billions of dollars without getting caught is more intelligent than a honest farmer who only has tens of thousands of dollars.
Gaming the system is a sign of intelligence. It is hard to design a goal function that gives the desired outcome without undesired side effects.
IQ tests are intelligence measures with small environment set.
Lifespan may be an intelligence measure with huge environment set.
A human can optimize several goal functions across the same environment set. A human may be asked to clean a floor, to write a report, to run a company, to cook food, and to find the quickest route between home and office, and optimize them all.
Some goal functions for humans may be:
- Maximize happiness
- Minimize pain
- Optimize the level of a chemical in the brain
- Optimize the time integral of such chemical
- Maximize the chance of survival
But I don’t know the root goal function that explains all those behaviors.
The law of adaptive systems: “Every adaptive system converges to a state in which all kind of stimulation ceases.” [fn::<2019-11-27> https://en.wikipedia.org/wiki/Adaptive_system]
Corollary: All jobs eventually become boring.
If something excites us, we will eventually get used to it.
But how come we don’t get bored of sex? Do we?
Here I try to learn the minimal amount of functional analysis and approximation theory required for learning theory.
I assume that the reader is a Bachelor of Computer Science who graduated in 2011. As of 2018, functional analysis does not seem to be in any computer science curriculum [fn::https://functionalcs.github.io/curriculum/] [fn::https://www.csd.cs.cmu.edu/academic/undergraduate/bachelors-curriculum-admitted-2017] [fn::https://cs.stanford.edu/degrees/ug/Requirements.shtml]. The closest things to functional analysis in such curriculum seems to be ordinary differential equations.
\( \Real \) is the set of all real numbers. If you are a finitist, just think of a set as a predicate: think of \(\Real\) as a predicate such that \( \Real(x) \) is true iff \(x\) is a real number, and then replace the formula \( x ∈ \Real \) with the formula \( \Real(x) \) in your mind.
\( [0,1] \) is the unit interval.
It is the set of every real number between 0 and 1, including 0 and 1.
Formally, \( [0,1] = \{ x | x ∈ \Real, 0 ≤ x ≤ 1 \} \).
\( C(A) \) is the space of every continuous function whose domain is the set \(A\) and whose codomain is \(\Real\).
Formally, \( C(A) = \{ f | f : A → \Real, ~ f \text{ continuous} \} \).
Here are the easy things. We need to memorize these definitions.
Relation (a domain, a codomain, and a set of pairs). Function (a special kind of relation). Function space.[fn::https://en.wikipedia.org/wiki/Function_space] Measure.[fn::https://en.wikipedia.org/wiki/Measure_(mathematics)] Distance or metric.[fn::https://en.wikipedia.org/wiki/Metric_(mathematics)] Norm. Inner product. Do not confuse measure with metric.
Here are some rather hard things that need some thinking.
Should we think of a matrix as a rectangle containing numbers or as a linear function?
A real-valued function can be seen as a vector.[fn::https://en.wikipedia.org/wiki/Function_space#In_linear_algebra] “In modern introductory texts to functional analysis, the subject is seen as the study of vector spaces endowed with a topology”[fn::https://en.wikipedia.org/wiki/Functional_analysis]. Why do we adopt this view?
These slides[fn::https://courses.cs.washington.edu/courses/cse590a/09wi/mathfoundation.pdf] (slide 20: Lagrange multipliers are common.)
It would be nice if this Wikipedia article[fn::https://en.wikipedia.org/wiki/Function_space#Functional_analysis] relates those opaquely-named function spaces instead of just dumbly listing them.
Do we need to know these?
Functional analysis.[fn::https://en.wikipedia.org/wiki/Functional_analysis] Hilbert spaces. Banach spaces. Compact spaces. Continuity. Smoothness. Differentiability.
Reproducing kernel Hilbert space[fn::https://en.wikipedia.org/wiki/Reproducing_kernel_Hilbert_space] is an application of functional analysis to machine learning.[fn::https://www.quora.com/What-are-the-most-notable-applications-of-functional-analysis-to-computer-science]
Find the name of the space of every function from unit hypercube to unit interval.
Find the name of the space \( \{ f | f : [0,1]^n → [0,1] \} \).
I guess these keywords: embedding, projection.
I guess these areas: functional analysis, approximation theory, topology.
Cybenko 1989 \cite{cybenko1989approximation} uses the notation \(C(I_n)\) to mean the space of every continuous function from \([0,1]^n\) to . [fn::https://math.stackexchange.com/questions/84238/is-there-a-shorthand-or-symbolic-notation-for-differentiable-or-continuous] He refers to \cite{rudin1973functional} for the notations.
From \cite{cybenko1989approximation}:
- “a fundamental result in digital signal processing is the fact that digital filters made from unit delays and constant multipliers can approximate any continuous transfer function arbitrarily well.”
- “The main result of this paper is a demonstration of the fact that sums of the form (1) are dense in the space of continuous functions on the unit cube if \(σ\) is any continuous sigmoidal function.”
- “In a well-known resolution of Hilbert’s 13th problem, Kolmogorov showed” the Kolmogorov representation theorem [fn::https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Arnold_representation_theorem].
Best linear approximation\cite{khavinson1997best}?
universal approximation theorem
The phrase “x approximates y” means “x is close to y”, which implies distance, which implies metric space.
How close is the approximation?
Suppose that the function
- The “approximation error at
$x$ ” is$g(x) - f(x)$ . - The “maximum absolute error” is $maxx ∈ I \abs{g(x) - f(x)}$.
How do we measure the distance between two
- The maximum norm, in interval
$I$ is $maxx ∈ I \abs{f(x) - g(x)}$. This norm is also called uniform norm, supremum norm, Chebyshev norm, infinity norm, norm-infinity,$L_∞$ -norm. Why is it called “uniform”? WP:Uniform norm. - What is this norm called? $∫x ∈ I [f(x)-g(x)]^2 ~ dx$.
- 2017, Approximation Theory, 7.5 ECTS
- 2012, syllabus, Drexel University, Math 680-002 (Approximation Theory), pdf
- 2002, MATH 5667-001: Introduction to Approximation Theory, CU-Denver, Fall 02.
- Classical approximation theory deals with univariate real functions
$\Real → \Real$ . - Multivariate approximation theory deals with multivariate real functions
$\Real^m → \Real^n$ .
- Suppose we want to approximate the function
$f$ , but we don’t know the equation for$f$ ; we only have a few input-output samples.- Can we approximate
$f$ ? - How do approximation and curve-fitting relate?
- Can we approximate
- What is a multivariate polynomial?
- Commonly conflated concepts
- The uniform norm is …
- Best approximation is …
- Uniform approximation is best approximation in uniform norm.
- https://en.wikipedia.org/wiki/Approximation_theory#Remez’s_algorithm
- https://en.wikipedia.org/wiki/Remez_algorithm
- Inputs: a function, and an interval.
- Output: an optimal polynomial approximating the input function in the input interval.
- https://en.wikipedia.org/wiki/Remez_algorithm
- What are Bernstein polynomials? What question does the Weierstrass approximation theorem answer?
- WP:Chebyshev polynomials
- Why is it important?
How does it relate to best approximation?
- “Chebyshev polynomials are important in approximation theory because the roots of the Chebyshev polynomials of the first kind, which are also called Chebyshev nodes, are used as nodes in polynomial interpolation. The resulting interpolation polynomial minimizes the problem of Runge’s phenomenon and provides an approximation that is close to the polynomial of best approximation to a continuous function under the maximum norm.”
- Why is it important?
How does it relate to best approximation?
- Machine learning, statistical modelling, function approximation, and curve fitting are related.
- Generalize function approximation to relation approximation.
- A function can be stated as a relation.
- A relation can be stated as a function.
- Consider the least-square solution to an overdetermined system of linear equations.
Is such solution a kind of approximation?
- There is no exact solution to begin with?
- Why is it called “least-squares approximation”?
- How can we approximate something that does not exist?
- 1.2 approximates 1.23. Both 1.2 and 1.23 exist.
- Contrarily, there is no X such that AX = B.
Is it even possible to approximate arbitrary functions?
- If the function is analytic, we can truncate its Taylor series.
- Commonly-used differentiable functions are analytic.
- Chebyshev polynomials?
- If we have an approximation scheme, we may be able to improve it.
- google search: machine learning approximation theory
- Approximation Theory for Deep Learning Models: Where to Start? - Mathematics Stack Exchange
- http://www.vision.jhu.edu/tutorials/ICCV15-Tutorial-Math-Deep-Learning-Intro-Rene-Joan.pdf
- 2017, slides, “From approximation theory to machine learning: New perspectives in the theory of function spaces and their applications”, pdf
- 2018, article, “Approximation theory, Numerical Analysis and Deep Learning”, abstract
- “the problem of numerically solving a large class of (high-dimensional) PDEs (such as linear Black-Scholes or diffusion equations) can be cast into a classical supervised learning problem which can then be solved by deep learning methods”
- Because it is practically inevitable.
- Fundamental reason: Because computers are finite.
- Practical reason: Trade-off between computation time and precision.
- The more error we can afford, the faster we can run.
- May be related: 2013 monograph “Faster Algorithms via Approximation Theory” pdf
- The more error we can afford, the faster we can run.
We can approximate a series by truncating it.
Suppose that the series
Suppose that the sequence
Pick where to cut.
Pick a natural number
Then the series
Here come examples: Truncate all the series!
Below we truncate a power series.
Decimal truncation:
Polynomial truncation:
Taylor series truncation:
Below we truncate the ratio of two power series.
Rational truncation:
WP:Padé approximation is a truncation of a ratio of series.
Fourier series truncation: The Wikipedia example animates how a Fourier series converges to the sawtooth function as more terms are added.
Digression: Is a (complex) Fourier series a power series? Reminder: A Fourier series looks like $∑k=0∞ c_k eikt$.
WP:Laurent series truncation?
A function is analytic iff it can be represented by power series.
Formally, a function
See also WP:Definition of “analytic function”.
Taylor series expansion is illustrated in the 2015 slides “Taylor Series: Expansions, Approximations and Error” (pdf)
A polynomial is an algebraic expression. It is not a function.
Power series is a kind of infinite polynomial.
WP:Formal power series: “A formal power series is a generalization of a polynomial, where the number of terms is allowed to be infinite.”
- WP:Iterated function
- WP:Iterative method
- Newton’s Iteration
- WP:Methods of computing square roots, the Babylonian method
- An iteration converges to an attractive fixed point.
Example:
Let
Continued fraction truncation:
We know that $$ 1 + \frac{1}{1 + \frac{1}{1 + \ldots}} = \frac{1 + \sqrt{5}}{2} = Φ. $$
We can truncate that continued fraction to approximate
Seeing those examples makes me wonder whether all approximations are truncation.
Differences:
- Approximation is part of analysis. Estimation is part of statistics.
- Approximation does not involve sampling. Estimation involves sampling.
- Epistemology: Approximation converges to a knowable value. Estimation may converge to a possibly unknowable value (the value exists but it is impractical for us to know what it actually is). Example: we approximate pi, and we estimate the height of all living people on Earth.
- Epistemology: Approximation does not guess. Estimation does.
Similarities:
- Both has a notion of “error”. Approximation has error. Estimation has bias and uncertainty.
- Both are instances of modeling (simplification).