Stochastic Search for Signal Processing Algorithm Optimization - - PowerPoint PPT Presentation
Stochastic Search for Signal Processing Algorithm Optimization - - PowerPoint PPT Presentation
Stochastic Search for Signal Processing Algorithm Optimization Bryan Singer and Manuela Veloso Computer Science Department Carnegie Mellon University, Pittsburgh Liat Ben-Haim, November 16th 2011 Overview Genetic algorithm Signal
Overview
- Genetic algorithm
- Signal processing
- Walsh-Hadamard Transform
- STEER: Split Tree Evolution for Efficient Runtimes
- For Walsh-Hadamard Transform
- Results Walsh-Hadamard Transform
- For Arbitrary Transform
- Results Arbitrary Transform
- Conclusion: Strengths and Weaknesses
Genetic Algorithm
Complete Search space (very large) Base Population
Genetic Algorithm
Crossover (only parts of the population) Mutation (only parts of the population)
Survival of the fittest Repeat Base Population
General β STEER
4 3 1 1 1 1 5 1 3 1 1 1 5 2 1 1 5 2 1 1 3 1 2 1 1 3 1 2 1 1 4 1 5 1 3 1 2 1 1 4 1 5 1
β
- Population consists of algorithms
- Algorithms modeled as trees
- Fitness is measured in runtime on given device
- Genetic algorithm
- Signal processing
- Walsh-Hadamard Transform
- STEER: Split Tree Evolution for Efficient Runtimes
- For Walsh-Hadamard Transform
- Results Walsh-Hadamard Transform
- For Arbitrary Transform
- Results Arbitrary Transform
- Conclusion: Strengths and Weaknesses
Signal Processing: y = Ax
Ax
Pictures (JPEG) Audio (MP3)
http://commons.wikimedia.org/wiki/File:ALC_orig.png http://de.wikipedia.org/w/index.php?title=Datei:Mp3.svg&filetimestamp=20091118142210 http://de.wikipedia.org/w/index.php?title=Datei:Phalaenopsis_JPEG.png&filetimestamp=20110430130839
Walsh-Hadamard Transform (WHT)
π§ = ππΌπ 2π β π¦ ππΌπ 2π = 1 1 1 β1 β¨ β― β¨ 1 1 1 β1 n factors
π§ = 1 1 1 β1 β π¦ π§ = 1 1 1 β1 β¨ 1 1 1 β1 β¨ 1 1 1 β1 β π¦ = 1 1 1 1 1 1 1 1 1 β1 1 β1 1 β1 1 β1 1 1 β1 β1 1 1 β1 β1 1 β1 β1 1 1 β1 β1 1 1 1 1 1 β1 β1 β1 β1 1 β1 1 β1 β1 1 β1 1 1 1 β1 β1 β1 β1 1 1 1 β1 β1 1 β1 1 1 β1 β π¦ π§ = 1 1 1 β1 β¨ 1 1 1 β1 β π¦ = 1 1 1 1 1 β1 1 β1 1 1 β1 β1 1 β1 β1 1 β π¦
n = 1: n = 2: n = 3:
Fast Walsh-Hadamard Transform
n = 2: π§ = ππΌπ 22 β π¦ = π½21 β¨ ππΌπ(21) β ππΌπ 21 β¨ π½21 β π¦ = = 1 1 1 β1 1 1 1 β1 β 1 1 1 1 1 β1 1 β1 β π¦ Opcount: 4 Opcount: 4+4 = 8 Opcount: 12 2 1 1
Fast Walsh-Hadamard Transform
3 1 2 1 1 3 2 1 1 1 3 1 1 1
Opcount: 24 24 24 Opcount WHT(23): 56
n = 3:
4
3
1 1 1 1 5 1 4
3
1 1 1 1 5 1 4
3
1 1 1 1 5 1 4
3
1 1 1 1 5 1
2
1 1 2 1 1 4 5 1 3
1 1 1 5 2 1 1
3
1 1 1 5 2 1 1
1 1 2 1 1 4 5 1 2 5 2 1 1 3 1 2 1 1 5 2 1 1 3 1 2 1 1 5 2 1 1 3 1 2 1 1 5 2 1 1 3 1 2 1 1
3 1 2 1 1 4 1
5
1
3 1 2 1 1 4 1
5
1
3 1 2 1 1 4 1
5
1
3 1 2 1 1 4 1
5
1 4 5 1 1 1 1 1 4 5 1 1 1 1 1 5 1 1 1 1 1
General Break Down Rule
ππΌπ 2π = (π½2π1+β―+ππβ1 β¨ ππΌπ 2ππ β¨
π’ π=1
π½2ππ+1+β―+ππ’) π = π1 + β― + ππ’ (ππ: positive integers) n nt n1 ... ... ni
WHT Example
ππΌπ 2π = (π½2π1+β―+ππβ1 β¨ ππΌπ 2ππ β¨
π’ π=1
π½2ππ+1+β―+ππ’) π½20 β¨ π΅ = A π΅ β¨ π½20 = A
Stochastic Search for Signal Processing Algorithm Optimization
- Genetic algorithm
- Signal processing
- Walsh-Hadamard Transform
- STEER: Split Tree Evolution for Efficient Runtimes
- For Walsh-Hadamard Transform
- Results Walsh-Hadamard Transform
- For Arbitrary Transform
- Results Arbitrary Transform
- Conclusion: Strengths and Weaknesses
Given input signal x of size 2n and specific device, find fastest program for this signal size and device
Goal x
25
3 1 1 1 5 2 1 1
http://de.wikipedia.org/w/index.php?title=Datei:IBM_PC_5150.jpg&filetimestamp=20060811115558
- Exhaustive Search
- Does not scale
- Dynamic Programming
- Assumption: Β«combination of optimal solutions for
subproblems leads to optimal solutionΒ»
- K-Best DP
- Search space restriction: Binary trees
- Bad choices lead to inferior solution
- Split Tree Evolution for Efficient Runtimes: STEER
Search Techniques
- Split Tree Evolution for Efficient Runtimes
- Genetic Algorithm
- Part of the SPIRAL research group
- Β«Can we teach computers to write fast libraries?Β»
- Adapted to the system used by the research group
STEER
http://www.spiral.net
STEER: Genetic Algorithm
Crossover Mutation Survival of the fittest (runtime) Repeat Base Population
WHT: Crossover
Stochastic Search for Signal Processing Algorithm Optimization
WHT: Mutation
Stochastic Search for Signal Processing Algorithm Optimization
- Pentium III 450 MHz (32-Bit Architecture)
- Linux 2.2.5-15
- WHT Package from Johnson and PΓΌschel
- Β«In search of the optimal Walsh-Hadamard transformΒ»,
2000
- Leaves of sizes 21 to 28
- Unrolled straight-line code
Results: WHT
Stochastic Search for Signal Processing Algorithm Optimization
- Random tree generation:
- Randomly choose an applicable break down rule
- Apply to node, to generate a random set of children
- Recursively apply to each child
- Crossover
- Equivalent nodes: same size and transform
- New mutations
Arbitrary Signal Transform
Arbitrary Transform: Mutation
Stochastic Search for Signal Processing Algorithm Optimization
Stochastic Search for Signal Processing Algorithm Optimization
Results: Arbitrary Transform
Stochastic Search for Signal Processing Algorithm Optimization
Strengths & Weaknesses
- STEER can be used for
arbitrary transforms using SPIRAL
- Finds good if not
necessarily optimal solutions
- Found solutions are
generally better than DP
- Times significantly less
formulas than exhaustive search
- Missing parameters of
the evolutionary algorithm
- No guarantee for a
Β«goodΒ» solution
- Times more formulas
than DP
- No mention of how long
STEER usually runs
- How much better than