energy characterization and optimization of embedded data mining algorithms: a case study of the...

21
Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology, China University at Buffalo, the State University of New York, USA Authors: Hanqing Zhou, Lu Pu, Yu Hu, Xiaowei Xu, Huazhong University of S&T, China Aosen Wang, Wenyao Xu, SUNY Buffalo, USA Presenter: Aosen Wang

Upload: roland-bradford

Post on 17-Dec-2015

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

Energy Characterization and Optimization ofEmbedded Data Mining Algorithms: A Case Study ofthe DTW-kNN Framework

Huazhong University of Science & Technology, ChinaUniversity at Buffalo, the State University of New York, USA

Authors:Hanqing Zhou, Lu Pu, Yu Hu, Xiaowei Xu, Huazhong University of S&T, ChinaAosen Wang, Wenyao Xu, SUNY Buffalo, USA

Presenter: Aosen Wang

Page 2: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

Introduction of DTW-kNN1

Energy Measurement Testbed2

3

DTW Energy Optimization4

Conclusions5

Outline

DTW-kNN Energy Characterization

2

Overview1

Page 3: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

The DTW-kNN framework is widely applied for classification in data

mining, such as speech recognition and financial market prediction.

DTW-kNN has not been studied on mobile platform or embedded system.

Overview (1/2)

3

Page 4: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

We design an energy measurement testbed for DTW-kNN algorithms.

We analyze the energy characterization of each component in the DTW-

kNN framework based on our proposed energy measurement testbed;

Three optimization strategies are proposed and implemented on the

testbed from algorithmic level to improve energy efficiency.

Overview (2/2)

4

Our work: Energy characterization and optimization of DTW-kNN framework

Page 5: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

Introduction of DTW-kNN (1/3)

5

DTW-kNN: a widely applied classification framework.

Page 6: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

6

Dynamic Time Warping (DTW): a popular distance metric of similarity.

Introduction of DTW-kNN (2/3)

Two time series:C = c1, c2, · · · , ci, · · · , cn, (1)T = t1, t2, · · · , ti, · · · , tm.

DTW warping path: M (i, j ) = (ci − tj )*(ci − tj )

Page 7: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

7

k-Nearest Neighbors (kNN): well-investigated method for pattern classification.

Introduction of DTW-kNN (3/3)

Page 8: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

Energy Measurement Testbed (1/2)

Framework:

8

Current-sense Amplifier: MAX471

MCU: MSP430

ARM Cortex-M3:STM32F103

Page 9: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

Energy Measurement Testbed (2/2)

Framework picture:

9

Page 10: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

DTW-kNN Energy Characterization (1/2)

Characterization experiment setup:

10

5 datasets: from from a popular data warehouse;

Short sequence length: limited RAM and ROM

Memory-efficient operation method:

Memory Space requirement from 2×N×N to 2×N

Page 11: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

DTW-kNN Energy Characterization (2/2)

Energy characterization:

DTW calculation: as much as 97% !

total energy

11

Normalization

DTW

kNN

Page 12: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

DTW Energy Optimization (1/7)

Experiment setup:

12

All the selected and proposed methods have no influence on accuracy.

5 datasets, short sequence length, memory-efficient operation method;

k=1: k does not have significant influence on the energy characterization;

Training set: 10 and test set: 100;

Energy calculation:

Page 13: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

DTW Energy Optimization (2/7)

Optimization method: the squared distance

13

Page 14: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

DTW Energy Optimization (3/7)

Optimization method: early abandon of DTW

There exist at least 1 element in a row that belongs to the warping path.

14

Page 15: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

DTW Energy Optimization (4/7)

Optimization method: lower bound and indexing DTW

Lower bounding functions are used to estimate the lower bound of DTW distances.

An example of how lower bound (LB) and indexing work:

15

DTW1

DTW2

DTW3

LB1

LB2

LB3

>

>

>

Hard to calculate Easy to calculate

Calculate the 3 LBs and sort them;

Calculate the DTW with the lowest LB

LB2 is the lowest, so calculate DTW2

Compare DTW2 with LB1 and LB3

As DTW2 is smaller than LB1 and LB3,

DTW2<LB1<DTW1 and DTW2<LB3<DTW3

So calculations of DTW1 and DTW3 can be elimited

Page 16: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

DTW Energy Optimization (5/7)

Optimization method: lower bound and indexing DTW

3 LB methods are adopted.

Page 17: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

DTW Energy Optimization (6/7)

Optimization method: Put the methods all together

SD: Squared Distance; EA: Early Abandon; LB_***: Lower Bound method

Page 18: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

DTW Energy Optimization (7/7)

Frequency scaling on dynamic energy:

Page 19: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

Conclusion

In this paper, we investigate the energy characterization and optimization of

DTW-kNN framework from algorithmic level.

The bottleneck of the DTW-kNN framework is distance matrix calculation

accounting for 89.14% on average of the total energy consumption.

The energy reduction of squared distance, early abandon and lower bounding

methods are about 1%, from 29.5% to 89.9% and about 50% respectively.

When all optimization methods are implemented, the energy reduction can be

as much as 74.6%.

Page 20: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

Future Work

We will continue our work by another two aspects to improve energy efficiency:

Architecture-level: parallel computing of each template.

Microarchitecture-level: hardware accelerator, such as speeding up the distance matrix

calculation and warping path calculation.

Page 21: Energy Characterization and Optimization of Embedded Data Mining Algorithms: A Case Study of the DTW-kNN Framework Huazhong University of Science & Technology,

Thank you!

Huazhong University of Science & Technology, ChinaUniversity at Buffalo, the State University of New York, USA

21

Aosen Wang