T 3.1 Universal Approximation Theory: any continuous function can be approximated with DNN
Training:
Backpropagation:
given: training set ℓ={x(k),d(k)}k=1K, α, network with reasonble random configs
find: optimal weights to mimic training set
error signal ej(k)=dj(k)−yj(k)
error energy Ej(k)=21ej2(k)
whole network E(k)=∑jEj(k)
avg risk: Eˉ(k)=K1∑k=1KE(k)
for each weight from i to j (and next layer l) in each layer backwards: δj(k)=−∂vj(k)∂E(k)={ej(k)∑lwlj(k)δl(k)⋅⋅Φj′(vj(k))Φj′(vj(k))if j output layerif j hidden layer Δwji(k)=αδj(k)yi(k)
repeat step 1 until Eˉ(k) below specified threshold
with momentum:
combines the advantages of low and high learning rate: stablizes the trajectory in the weight space and speeds up the learning speed towards steady directions: Δwji(k)=βΔwji(k−1)+αδj(k)yi(k)
Batch learning (offline): all K samples is 1 epoch, update weights once per epoch
Online learning: update weights for each sample datapoint (stochastic)
Cross-Validation:
training set (90%):
estimation subset (90%) for actual training
validation subset (10%) for picking best model (tune hyperparameters)
test set (10%) for evaluating the final model
Binary Classifier (Rosenblatt's Perceptron):
single-layer (0 hidden layers) with only 1 binary output node
Φ(v)=hardlim(v) (1 if v>0, otherwise 0)
can only classify linearly separable patterns (i.e. there exists a hyperplane that seperates the classes)
Perceptron Training Algorithm:
given: training set D={(x(k),d(k))∣k∈[s]} (with k-th sample input x(k), desired output d(k) and x0(k)=1 for bias) and learning rate 0<α≤1
find: weights w(k) (with bias w0(k)) at time k that best mimic training set
intuition: w is perpendicular to the boundary, so if output for k is wrong, nudge w towards ℵ1 and away from ℵ0 by adding or subtracting x(k):
randomize initial weight w(0)
for k∈[1;s]:y(k):=Φ(w(t)⋅x(k))wi(k+1):=wi(k)+α(di(k)−yi(k))xi(k)
this converges always (weights won't change) if training set is linearly separable (T2.1 Perceptron Convergence Theorem)!
Radial-Basis Function Networks
Radial-basis function: real-valued function only dependent on the distance from origin c: Φ(x,c)=φ(∥x−c∥) where ∥x∥2:=∑ixi2
essentially calculates F(x)=∑i=1KwiΦ(∥x−xi∥) that universally and locally (as opposed to globally) approximate continuous function f:Rn→R given K data points (xi,di) on f
single hidden layer with n inputs and 1 output neuron, S many neurons in the hidden layer where S≤K number of clusters with the centroids on the clusters becoming the interpolation points xi
hidden layer usually non-linear activation function, output layer identity function or linear
step 1: k-means clustering algorithm to determine S
step 2: backpropagation to train weights like normal
k-means clustering:(1) choose random S centers cj(0), (2) pick random sample x, (3) the closest centroid j(x) is moved towards it: cj(k+1)+=αc(x(k)−cj(k)), (4) repeat from step (2) until centers don't move much
standard width of gaussian RBFs:σ=2Sdmax where dmax max distance between any two clusters
Recurrent Neural Networks:
dynamic neural network by giving it short/long-term memory through feedback
local feedback: single neuron inside the network
global feedback: multiple hidden layers or whole network
the internal state yt is put back into the network as input in the next timestep, thus output ht=f(yt−1,xt)
Lyapunov stability: equilibrium state xˉ is (uniformly) stable, if ∀ε>0:∃δ>0:(∥x(0)−xˉ∥<δ⟹∀t>0:∥x(t)−xˉ∥<ε), i.e. for any bound ε, there is the region of attractionδ, within which any initial state will stay bounded by ε forever
asymptotic stability: if both stable and convergent (x(t)→xˉ as t→∞) within the ROA δ
if a Lyapunov functionV(x):Rn→R is positive-definite in a small neighbourhood of xˉ, and ∂t∂V(x) is negative semidefinite in that region, then xˉ is stable (even asymptotically stable if derivative is negative definite)
positive-definite: has continuous partial derivatives of each state variable and V(xˉ)=0 and V(x)>0 if x=xˉ (semi-: ≥, negative-: <)
Hopfield Network: x(k+1)=Φ(Wx(k)+b), usually Φ=satlins linear capped in [−1;1], converges always!
2) Fuzzy Logic
Fuzzy Sets and Membership Functions:
given universe set X, its subset can be defined by its characteristic functionA:X→{0,1} which, given x∈X returns whether its in A or not
fuzzy set has characteristic function A:X→[0,1], returns the degree of membership (= membership function)
fuzzy set A is normal if supx∈XA(x)=1, otherwise subnormal
standard operators:
Ac(x)=1−A(x), does not satisfy Law of Contardiction/Excluded Middle
α-cut: fuzzy set to crisp set αA={x∣A(x)≥α} or α+A={x∣A(x)>α}
decomposition: define αA(x)=α⋅αA(x) which creates a horizontal & vertical slice at α, then A=⋃α∈[0,1]αA=supα{αA(x)}
Fuzzy Relations and Propositions:
a (crisp) relation R:X→Y can be defined by its characteristic functionR:X×Y→{0,1}, so a fuzzy relation is R:X×Y→[0,1]
proposition: given linguistic variables U,V (nouns e.g. AGE), values (=fuzzy set) A,B (adj. e.g. Young), and optionally hedges H (adv. e.g. very, not): "U is H A"
conjunction (with Ui ling. var. over domains Xi): A1×A2(x1,x2)=A1(x1)∧A2(x2) (matrix representation possible)
condition proposition/implication: "IF U is A, then V is B" Lukasiewicz(Zadeh):RZ(x,y)=min(1,1−A(x)+B(y)) Correlation min: Rcm(x,y)=min(A(x),B(y)) Correlation product: Rcp(x,y)=A(x)∗B(y)
matrix representation: express A and B as row vectors over their domains, then R=AT⋅B with operator being R(x,y)
Inference: modus ponens: (P⇒Q)∧P=Q, modus tollens: (P⇒Q)=(¬Q⇒¬P)
single inference: given: Rule "IF U is A, THEN V is B" and Fact "U is A′": conclusion:B′(y)=A′(x)∘R(x,y)=supx∈Xmin{A′(x),R(x,y)} (matr. mul. with row vector and matrix, (∗):=min and (+):=max )
n antecedents and k rules: given: Rules Ri(x1,...,xn,y) and Fact "U1 is A1′ and ... and Un is An′" k conclusions:Bi′(y)=Ai1′×...×Ain′(x1,...,xn)∘Ri(x1,...,xn,y) aggregated conclusion:B′(y)=∑iBi′(y) or maxi{Bi′(y)}
universal approximators that model a nonlinear plant → TSFM → local-linear fuzzy rules → defuzzify and control plant
Continuous FS: "IF z1(t) is Mi1 and ... and zp(t) is Mip, THEN x˙(t)=Aix(t)+Biu(t),y(t)=Cix(t)" (for DFS: x˙(t)→x(t+1))
disc. lin. system x(t+1)=Ax(t) is locally stable if ∀λ∈eig(A):∣λ∣<1 within unit circle
cont. lin. system x˙(t)=Ax(t) is locally stable if ∀λ∈eig(A):Re(λ)<0
(eigenvalues: solve det(A−λI)=(a−λ)(d−λ)−bc=0)
DFS: globally asymp. stable if a common positive definite matrix P exists such that AiTPAi−P<0,i=1,2,...,r
Evolutionary Algorithms:
iterative search prodecure that generates a population of candidate solutions (rather than 1 point like gradient), select best solutions and generates new random solutions based off of them
selection:
(μ+λ): μ parents create λ offspring and best μ from μ+λ become next parents
(μ,λ): best μ from only λ become next parents
proportional/roulette: probability of getting picked is their relative fitness
tournament: select q random, pick best, repeat until full
variation:
mutation: binary/gaussian mutation
1-point crossover: two parents x,y∈Rn at point p produce two new offsprings x′=(x1,x2,...,xp−1,yp,...,yn) y′=(y1,y2,...,yp−1,xp,...,xn)
n-point crossover: at each crossover point swap the rest
PMX: pick mappings xi↔yi for i∈{random indices}, swap values according to mappings, rest stays same