cgb indiana university lunchtime talk january 22 2008 geoffrey fox discussing work with:

52
1 Robust High Performance Optimization for Clustering, Multi-Dimensional Scaling and Mixture Models CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox discussing work with: Seung-Hee Bae, Neil Devadasan, Rajarshi Guha, Marlon Pierce, Xiaohong Qiu, David Wild, Huapeng Yuan Community Grids Laboratory, Research Computing UITS, School of informatics and POLIS Center Indiana University George Chrysanthakopoulos, Henrik Frystyk Nielsen Microsoft Research, Redmond WA http://www.infomall.org/multicore [email protected], http://www.infomall.org

Upload: ursa

Post on 18-Mar-2016

26 views

Category:

Documents


0 download

DESCRIPTION

Robust High Performance Optimization for Clustering, Multi-Dimensional Scaling and Mixture Models. CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox discussing work with: Seung-Hee Bae, Neil Devadasan, Rajarshi Guha, Marlon Pierce, Xiaohong Qiu, David Wild, Huapeng Yuan - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

11

Robust High Performance Optimization for Clustering, Multi-Dimensional Scaling

and Mixture Models

CGB Indiana University Lunchtime TalkJanuary 22 2008

Geoffrey Fox discussing work with:Seung-Hee Bae, Neil Devadasan, Rajarshi Guha, Marlon Pierce,

Xiaohong Qiu, David Wild, Huapeng YuanCommunity Grids Laboratory, Research Computing UITS, School of informatics and POLIS Center Indiana University

George Chrysanthakopoulos, Henrik Frystyk NielsenMicrosoft Research, Redmond WA

http://www.infomall.org/multicore [email protected], http://www.infomall.org

Page 2: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Abstract We first review the pros and cons of various approaches to non linear

optimization in the presence of local minima, ill conditioned matrices and ambiguous choice of appropriate number of degrees of freedom (over and under fitting).

We define constraints on approaches from need to run well in parallel on systems of multicore CPU's.

We present a uniform approach to data clustering and Gaussian mixture model ling that uses deterministic (not Monte Carlo) annealing to mitigate the local minima problem and naturally relates the appropriate number of parameters (clusters or mixture components) to the scale at which problem is examined.

New clusters (mixtures) are introduced at phase transitions as the annealing temperature is lowered and second derivative matrix becomes singular.

We contrast three ways of visualizing this structure in low (2) dimensions with Principal Component Analysis PCA, Generative Topographic Mapping GTM and Multi-Dimensional Scaling MDS using annealing to regularize GTM and MDS.

Currently we have implemented in preliminary fashion deterministic annealing clustering and GTM in a fashion that runs well on multicore systems.

We have applied these techniques to Geographical Information Systems (clustering demographic data in 2D) and Cheminformatics in 1052 and lower dimensions.

We would like to understand other applications that can constrain and test these techniques.

Page 3: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Too much Computing? Historically both grids and parallel computing have tried to

increase computing capabilities by• Optimizing performance of codes at cost of re-usability• Exploiting all possible CPU’s such as Graphics co-processors

and “idle cycles” (across administrative domains)• Linking central computers together such as NSF/DoE/DoD

supercomputer networks without clear user requirements Next Crisis in technology area will be the opposite problem –

commodity chips will be 32-128way parallel in 5 years time and we currently have no idea how to use them on commodity systems – especially on clients• Only 2 releases of standard software (e.g. Office) in this time

span so need solutions that can be implemented in next 3-5 years

Intel RMS analysis: Gaming and Generalized decision support (data mining) are ways of using these cycles

Page 4: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Intel’s Projection

Page 5: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Too much Data to the Rescue? Multicore servers have clear “universal parallelism” as many

users can access and use machines simultaneously Maybe also need application parallelism (e.g. datamining) as

needed on client machines Over next years, we will be submerged of course in data

deluge• Scientific observations for e-Science• Local (video, environmental) sensors• Data fetched from Internet defining users interests

Maybe data-mining of this “too much data” will use up the “too much computing” both for science and commodity PC’s• PC will use this data(-mining) to be intelligent user

assistant?• Must have highly parallel algorithms

Page 6: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Intel’s Application Stack

Page 7: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

30 Clusters

Renters

Asian

Hispanic

Total

30 Clusters

10 Clusters

Page 8: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Clustering algorithm annealing by decreasing distance scale and gradually finds more clusters as resolution improvedHere we see 10 clusters increasing to 30 as algorithm progresses

Page 9: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Parallel MulticoreDeterministic Annealing Clustering

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0 0.5 1 1.5 2 2.5 3 3.5 4

10000/(Grain Size n = points per core)

Overhead = Constant1 + Constant2/n

Constant1 = 0.05 to 0.1 (Windows) due to threadruntime fluctuations

10 Clusters

20 Clusters

Parallel Overheadon 8 Threads on Intel 8 core

Speedup = 8/(1+Overhead)= 7.6 if Overhead is 0.05

Page 10: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Basic Nonlinear Optimization I Nonlinear optimization (in either 2 or maximum likilihood) is

subject to well known problems including diverging or converging but to non optimal solution (local minima)

If we have n parameters i and need to minimize F = 2 or – ln L

Then naively one expands F = F(0) + k=1

n k F(0) /i + k,l=1n k l 2F(0) /kl

• with = - 0

As long as number of observables N is large in sum2 = i=1

N qi2() or – ln L = i=1

N ln qi() One can approximate

2F(0) /kl i=1N (1/ qi)qi(0) /k qi(0) /l

dropping term proportional to 2qi(0) /k l

This shows that second derivative matrix is positive (semi-) definite

Page 11: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Basic Nonlinear Optimization II Taylor expansion of F (Newton’s method) is just

This formula can rarely be used as in practice matrix A is poorly conditioned corresponding to linear combination of being (ill/un) determined

This easy to understand by transforming basis to those of eigenvectors of A which is a symmetric positive (semi) definite matrix

bAΔ

AbΔθAΔθbθFF TT

1

0

bygiven minimawith derivative second and derivativefirst is where

5.0)()(

Page 12: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Basic Nonlinear Optimization III

In my experience, the lowest eigenvalues k of A are zero to rounding error, so corresponding shifts k are unreliable and incrementing

= 0 + gives a nonsense point and F rapidly diverges as one iterates There are several approaches and they actually work and with

modification, Newton’s method is very reliable and one can expect to get good results • Unless n is very large (tens of thousands?) when it can be

computationally unattractive

s.order term second includedn larger tha areexpansion in termsneglected as unreliable is then small, when and /

get we,eigenbasis torefered ifThen

......with 00

0000

Suppose 212

1

kkkkk

n

n

bb

A

…….

….

Page 13: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Reliable Newton’s Method I WNPF (Well Nigh Perfect Fit – code lost): Here one

diagonalizes A and modifies equation k = bk/k, by zeroing shifts k if k < cut where is cut is dynamically adjusted and I typically started with cut = max with initially ~ 0.1 adjusted up or down depending on success of fit• Only shift in well determined directions but do many directions

at once Converges in 10-20 iterations

See my first paper65 Citations

Page 14: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Reliable Newton’s Method II Manxcat.f (Code still exists): This can be too expensive

so when I needed millions of such optimizations I used Marquardt’s method which corresponds to k k + Q accomplished by • Replacing A Q Identity matrix + A • so removes effect of 1/k for small k without expense of

determining eigenvalues/vectors• Has nonzero but small shifts in ill determined directions• Q is dynamically changed in a complicated fashion on a

logarithmic scale Similar performance to WNPF but less flexible Code ran million optimizations without aborting once!

Page 15: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Gradient Descent Many optimizations do not use second order Taylor expansion but

rather look at a shift = G(0) so estimate of minimum is

= 0 + G(0)

Where may be varied and G has a more or less fancy way of determining it However usually G is related to steepest descent direction i.e. G = - F which is direction F decreases fastest along One can often find a rigorous bound so that one can show F definitely decreases However essentially always a local minima as only explore directions of largest

eigenvalues (still could be a good minima) Note unlikely to be a minimum in “other directions” so really a “partial” not a

“local” minima Convergence tends to be slow as error lower order in F than for Newton’s

method but derivatives do not need to be calculated Computation n N for n parameters and N data points Newton’s method computation n2 N (compute A) plus n3 (Solve for )

Page 16: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Simulated Annealing Here we consider function F() to be minimized as an

Energy E() and randomly choose points in a neighborhood of 0

One accepts a new value of with a probability P depending on temperature T and energies E() and E(0)

Typical choice is P=1 if E() < E(0), and P = exp([E(0) − E()]/T) if E() > E(0)

Temperatures are decreased gradually This method avoids local minima due to allowing upward

fluctuations at high temperature but execution time is huge although each iteration has time proportional to n N

Page 17: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

CICC Chemical Informatics and Cyberinfrastructure Collaboratory Web Service Infrastructure

Portal ServicesRSS FeedsUser ProfilesCollaboration as in Sakai

Core Grid ServicesService RegistryJob Submission and Management

Local ClustersIU Big Red, TeraGrid, Open Science Grid

Varuna.netQuantum Chemistry

Statistics Services Database Services

Core functionality Computation functionality 3D structures byFingerprints Regression CIDSimilarity Classification SMARTSDescriptors Clustering 3D Similarity2D diagrams Sampling distributionsFile format conversion

Docking scores/poses byApplications Applications CID

Docking Predictive models SMARTSFiltering Feature selection Protein

2D plots Docking scoresToxicity predictions

Anti-cancer activity predictionsCID, SMARTS

Cheminformatics Services

DruglikenessArbitrary R code (PkCell)

Mutagenecity predictionsPubChem related data by

Pharmacokinetic parametersOSCAR Document AnalysisInChI Generation/SearchComputational Chemistry (Gamess, Jaguar etc.)

Need to make all this parallel

Page 18: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Deterministic Annealing for Data Mining We are looking at deterministic annealing algorithms because although

heuristic• They have clear scalable parallelism (e.g. use parallel BLAS)• They avoid (some) local minima and regularize ill defined problems in

an intuitively clear fashion• They are fast (no Monte Carlo)• They determine number of clusters automatically (Most important?)• Support iterative visualization approaches as increment number of

clusters systematically Developed first by Durbin as Elastic Net for TSP Extended by Rose (my student then; now at UCSB)) and Gurewitz

(visitor to C3P) at Caltech for signal processing and applied later to many optimization and supervised and unsupervised learning methods.

See K. Rose, "Deterministic Annealing for Clustering, Compression, Classification, Regression, and Related Optimization Problems," Proceedings of the IEEE, vol. 80, pp. 2210-2239, November 1998 Cited by 286

A deterministic annealing approach to clustering K Rose, E Gurewwitz, G Fox - Pattern Recognition Letters, 1990 Cited by 159

Statistical mechanics and phase transitions in clustering K Rose, E Gurewitz, GC Fox - Physical Review Letters, 1990 - Cited by 276

Page 19: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

High Level Theory Deterministic Annealing can be looked at from a Physics, Statistics

and/or Information theoretic point of view In physics view, you get result by using “mean field

approximation” but simplest is information theoretic Let E be function that one wishes to minimize Then we wish to find minima that is most probable given density

of states. One minimizes Free Energy F= E-TS where S is Entropy and S is

just sum over plnp for each degree of freedom with probability p• At large T, Entropy dominates while at small T Energy dominates• Annealing lowers temperature so solution tracks continuously

Key idea is to only apply this to “missing data” i.e. to hidden degree of freedom k that labels cluster or mixture

So S is a sum over these discrete degrees of freedom and one can minimize F to find the form of p for given energy function

Page 20: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Deterministic Annealing for Clustering I

))2/(),(exp()(

with centers)(K MixtureGaussian Simple Compare

))(lnEnergy Free

)(),(

)/),(exp()(

where)(/)/),(exp()Pr( CentersCluster and Points

1

2

1

2

1

K

k kkiki

N

i i

kiki

K

k kii

ikiki

ki

YXEPXZ

XZTF

YXYXE

TYXEXZ

XZTYXECXYKXN

Page 21: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Deterministic Annealing for Clustering II

This is an extended K-means algorithm or a simplified Gaussian mixture Start with a single cluster giving as solution Y1 as centroid For some annealing schedule for T, iterate above algorithm testing

correlation matrix in Xi about each cluster center to see if “elongated” Split cluster if elongation “long enough”; splitting is a phase transition

in physics view You do not need to assume number of clusters but rather a final

resolution T or equivalent At T=0, uninteresting solution is N clusters; one at each point xi

N

i ki

N

i kiinewk

oldki

oldkiki

CXCXX

Y

YXZTYXECX

1

1

)Pr()Pr(

Calculate

),(/)/),(exp()Pr(with

Page 22: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Minimum evolving as temperature decreases Movement at fixed temperature going to local

minima if not initialized “correctly

Solve Linear Equations for each temperature

Nonlinearity effects mitigated by approximating with solution at previous higher temperature

DeterministicAnnealing

F({y}, T)

Configuration {y}

Page 23: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Views from Past on Physical

Optimization

Page 24: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

You need to Specify a minimum temperature

Page 25: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:
Page 26: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Parallelism All the methods – Deterministic Annealing, Mixture

Models, GTM, PCA and Newton’s method involve Sums over data points x=1..N to calculate values and

derivatives• One can divide points up between cores and efficiently

parallelize• A little tricky to add results from separate data sets running

in parallel (problem is Cache coherence) Matrix algebra such as finding eigenvalues

• Well known how to parallelize but need low latency i.e. parallel not distributed system

Page 27: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Where are we for Clustering? We have deterministically annealed clustering running well on 8-

core (2-processor quad core) Intel systems using C# and Microsoft Robotics Studio CCR/DSS

Could also run on multicore-based parallel machines but didn’t do this (is there a large Windows quad core cluster on TeraGrid?)• This would also be efficient on large problems

Applied to Geographical Information Systems (GIS) and census data• Could be an interesting application on future broadly deployed PC’s• Visualize nicely on Google Maps (and presumably Microsoft Virtual Earth)

Applied to several Cheminformatics problems and have parallel efficiency but visualization harder as in 150-1024 (or more) dimensions

Will develop a family of such parallel (annealing) data-mining tools where basic approach known for• Clustering and Gaussian Mixtures (Expectation Maximization)• Mapping High Dimensional Spaces – MDS and GTM• Hidden Markov Methods

Page 28: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Clustering Data Cheminformatics was tested successfully with small datasets and

compared to commercial tools Cluster on properties of chemicals from high throughput

screening results to chemical properties (structure, molecular weight etc.)

Applying to PubChem (and commercial databases) that have 6-20 million compounds• Comparing traditional fingerprint (binary properties) with real-valued

properties GIS uses publicly available Census data; in particular the 2000

Census aggregated in 200,000 Census Blocks covering Indiana• 100MB of data

Initial clustering done on simple attributes given in this data• Total population and number of Asian, Hispanic and Renters

Working with POLIS Center at Indianapolis on clustering of SAVI (Social Assets and Vulnerabilities Indicators) attributes at http://www.savi.org) for community and decision makers• Economy, Loans, Crime, Religion etc.

Page 29: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

In detail, different groups have different cluster centers

Page 30: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Age < 5 v. Age > 75 Age < 5 v. Age 25-34

Page 31: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Parallel Multicore Deterministic Annealing Clustering

0.000

0.050

0.100

0.150

0.200

0.250

0 5 10 15 20 25 30 35

#cluster

over

head

“Constant1”

Increasing number of clusters decreases communication/memory bandwidth overheads

Parallel Overhead for large (2M points) Indiana Census clustering on 8 Threads Intel 8bThis fluctuating overhead due to 5-10% runtime fluctuations between threads

Page 32: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Parallel Multicore Deterministic Annealing Clustering

“Constant1”

Increasing number of clusters decreases communication/memory bandwidth overheads

Parallel Overhead for subset of PubChem clustering on 8 Threads (Intel 8b)

The fluctuating overhead is reduced to 2% (as bits not doubles)40,000 points with 1052 binary properties (Census is 2 real valued properties)

Page 33: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Visualizing High Dimensional Spaces For GIS we have a 2D or 3D underlying space and visualization of

data correlations is clear For cheminformatics we have hundreds (continuous) to thousands

(binary) degrees of freedom and difficult to evaluate any data mining – in particular clustering

Need to map high dimensional space into lower (here two) dimensional space with some constraints

This field has been well studied and there are at least two approaches• SOM (Self Organizing Maps) and GTM (Generative Topographic Mapping)

which are really clustering algorithms with a built in 2D organization for clusters

• MDS (Multi Dimensional Scaling) which “just views this as an optimization problem”.

• Principal Component Analysis (PCA) is here viewed as a special case of MDS

Page 34: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

MDS Multi Dimensional Scaling This is rather straightforward (and perhaps good for that

reason). Consider n points Y which are vectors in a high dimensional

space that we want to map into n points X in a low dimensional space (bad notation)

Let us minimize:Stress (X) = i<j=1

n weight(i,j) (ij - d(Xi , Xj))2 ij is distance between original vectors Y in high dimensional

space but it can be any scoring of discrepancy between points i and j.

d(Xi , Xj) is distance between mapped vectors Here simplest choice is weight(i,j) = 1 but one can also look at

choices like Sammon’s mapping weight(i,j) = 1/ij which emphasizes small distances ij

Page 35: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

PCA Principal Component Analysis I This is closely related to analysis used in WNPF approach to

nonlinear fitting and DA method for determining whether to split clusters. We form DD matrix PCA which depends on vectors Yk in original space and a “mean” M about which we do the expansion

For cluster splitting the mean M is a cluster center and there is a kernel which is probability that Yk belongs to a given cluster

For MDS, the kernel is often absent and the mean M is the centroid of points Yk in original space

n

k

Tkkk MYMYMYKPCA

1

))()(,(

Page 36: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

PCA Principal Component Analysis II The PCA approach finds the eigenvalues and

eigenvectors of the DD matrix PCA and maps point point Yk into its expansion in the first 2 (or choose here lower dimensional space) PCA eigenvectors with largest eigenvalues

This is optimal solution to minimizing stress under two conditions• One only looks at mappings Yk Xk that are orthogonal

projections• Choice of stress as i<j=1

n (ij2- d(Xi , Xj)2)

For example there are “better” linear transformations that add scaling of PCA vectors

Further PCA clearly weights large discrepancies most

Page 37: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Classical MDS: SMACOFScaling by minimizing a complicated function

This is a variant of steepest descent approach to minimizing Stress. One sets two matrices V and B in nL dimensional space (L=2 is dimension of target space of mapping).• n is number of vectors Yk to be mapped

Then one can establish a rigorous bound to show that one always decreases Stress (X) by iteration labeled by t if

This presumably will always find local minima?

ji jiiiji VVjijiweightV ,,, and if ),(

ji jiii

jiijji

BB

ji)Z,Z/d(δjiweightZB

,,

,

and

if ),()(

]1[]1[1][ )(

TransformGuttman theiterates One ttt XXBVX

Page 38: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

More obvious MDS for Clustering or Mixture Model Mapping

The number of parameters in MDS is typically modest as in simple cases just 2 (dimension of target space) Number of Clusters (or Number of points to be mapped)

Thus Newton’s method should work well and it is trivial to derive first and second order derivatives for (X)

As well as “general” approaches to regularization, one can enhance convergence by• Initializing optimization with SMACOF iterations• Noting that DA clustering algorithm gives us results with

number of clusters increasing by one each time. Thus we can initialize optimization for n clusters with results from MDS with n-1 clusters (DA also tells you which cluster center split)

Page 39: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

GTM Generative Topographic Mapping This addresses a slightly different problem of mapping ALL points

in a high dimensional space. It approaches this by simultaneously clustering in high dimensional space and mapping cluster (centers) to low dimension space• We ignore clustering and view as a way to getting mapping by

looking at all points in space not just cluster centers The key idea is a nonlinear mapping

• Y(k) = m=1M Wmm(X(k))

m(X) = exp( - 0.5 (X-m)2/2 ) for fixed m and Y(k) are cluster centers in high dimensional space which map from

X(k) in lower dimensional space If largish compared to separation between basis vectors X(k)

then topology of Y(k) and X(k) match but distances will not

Page 40: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

GTM for visualizing 2 Clusters in 155 Dimensions

Here GTM just used to visualize.

Clustering done separately

Deliberately “easy” problem!

Note although formal clustering gives 2 clusters

GTM visualization uses

K=225 clusters M=64 basis functions N=335 points

Page 41: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Basic Gaussian Mixture Models Mixture models write the probability of a point X(x) as

And set the Liklihood L = x=1N p(x,) where parameters are centers Y(k),

Probability Pk that point generated by center k and covariance matrix (k)2 Expectation Maximization is (from 1977) iterative solution to minimizing –

lnL It starts

by estimating

And using this to calculate allthe using formulae like:

Note similarity to deterministic annealing cluster formulae Deterministic annealing EM algorithm - N Ueda, R Nakano - Neural Networks, 1998

Cited by 124 A different approach which does not seem general is in Deterministic annealing for density estimation by multivariate normal mixtures

M Kloppenburg, P Tavan - Physical Review E, 1997 Cited by 18

2/222

1

))(2/())(/))()((5.0exp(),( DK

kk kkkYxXPxp

),(/))(2/())(/))()((5.0exp(

)),(|(Prob2/222

xpkkkYxXP

xXkD

k

)),(|(Prob )()(1

xXkxXkY N

x

Page 42: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

DA / EM / DAEM / GTM I The General Formula for “F = - lnL” or “Free Energy” F = E-TS is:

Note x is a label and E(x) is data For Deterministic Annealing

• a(x) = 1/N or generally p(x) with p(x) =1• g(k)=1• s(k)=0.5• T is annealing temperature varied down from with final value of 1• Vary Y(k) but can calculate Pk and (k) (even for matrix (k)) using IDENTICAL formulae

for Gaussian mixtures; iteration formula identical to Expectation Maximization EM which is steepest descent

• K starts at 1 and is incremented by algorithm For traditional Gaussian mixture models simplified to spherical distributions ((k) is really a k

k symmetric correlation matrix)• a(x) = 1• g(k) = Pk/(2(k)2)D/2 where space D dimensional• s(k) = (k)2 • T = 1• Vary Y(k) Pk and (k) but fix value of K a priori

21

1

( ) ln{ ( ) exp[ 0.5( ( ) ( )) / ( ( ))]N

K

kx

F T a x g k E x Y k Ts k

Page 43: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

DA / EM / DAEM / GTM II The General Formula for “F = - lnL-TS” is:

Note x is a label and E(x) is data For Deterministic Annealing Gaussian mixture models simplified to

spherical distributions ((k) is really a DD symmetric correlation matrix)• a(x) = 1• g(k)={Pk/(2(k)2)D/2}1/T

• s(k)= (k)2 • T is annealing temperature varied down from with final value

of 1• Vary Y(k) Pk and (k) • K starts at 1 and is incremented by algorithm

))](/())()((5.0exp[)(ln{)(1

12 kTskYxEkgxaTF

N

x

K

k

Page 44: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

DA / EM / DAEM / GTM III The General Formula for “F = - lnL” is:

Note x is a label and E(x) is data For GTM Generative Topographic Mapping

• a(x) = 1• g(k) = (1/K)( /2)D/2 where space D dimensional• s(k) = 1/ • T = 1• Y(k) = m=1

M Wmm(X(k)) • Fix m(X) = exp( - 0.5 (X-m)2/2 ) but other choices possible• Vary Wm and but fix values of M and K a priori

Y(k) E(x) Wm are vectors in original high D dimensional space X(k) and m are vectors in 2 dimensional mapped space

))](/())()((5.0exp[)(ln{)(1

12 kTskYxXkgxaTF

N

x

K

k

There is presumably a version of GTM using deterministic annealing using either a pure cluster basis – anneal in orusing an annealed Gaussian mixture with temperature 1/ plus intrinsic widths

Page 45: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Some links for Parallel Computing See http://www.connotea.org/user/crmc for references --

select tag oldies for venerable links; tags like MPI Applications Compiler have obvious significance

http://www.infomall.org/salsa for recent work including publications

My tutorial on parallel computing http://grids.ucs.indiana.edu/ptliupages/presentations/PC2007/index.html

Page 46: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Parallel Programming Model If multicore technology is to succeed, mere mortals must be able to build

effective parallel programs on commodity machines There are interesting new developments – especially the new Darpa

HPCS Languages X10, Chapel and Fortress However if mortals are to program the 64-256 core chips expected in 5-7

years, then we must use near term technology and we must make it easy• This rules out radical new approaches such as new languages

Remember that the important applications are not scientific computing but most of the algorithms needed are similar to those explored in scientific parallel computing

We can divide problem into two parts:• “Micro-parallelism”: High Performance scalable (in number of

cores) parallel kernels or libraries • Macro-parallelism: Composition of kernels into complete

applications We currently assume that the kernels of the scalable parallel

algorithms/applications/libraries will be built by experts with a Broader group of programmers (mere mortals) composing library

members into complete applications.

Page 47: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Multicore SALSA at CGL Service Aggregated Linked Sequential Activities Aims to link parallel and distributed (Grid) computing by

developing parallel applications as services and not as programs or libraries• Improve traditionally poor parallel programming

development environments Developing set of services (library) of multicore parallel data

mining algorithms Looking at Intel list of algorithms (and all previous experience),

we find there are two styles of “micro-parallelism”• Dynamic search as in integer programming, Hidden Markov Methods

(and computer chess); irregular synchronization with dynamic threads• “MPI Style” i.e. several threads running typically in SPMD (Single

Program Multiple Data); collective synchronization of all threads together Most Intel RMS are “MPI Style” and very close to scientific

algorithms even if applications are not science

Page 48: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Scalable Parallel Components How do we implement micro-parallelism? There are no agreed high-level programming environments for

building library members that are broadly applicable. However lower level approaches where experts define

parallelism explicitly are available and have clear performance models.

These include MPI for messaging or just locks within a single shared memory.

There are several patterns to support here including the collective synchronization of MPI, dynamic irregular thread parallelism needed in search algorithms, and more specialized cases like discrete event simulation.

We use Microsoft CCR http://msdn.microsoft.com/robotics/ as it supports both MPI and dynamic threading style of parallelism

Page 49: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

There is MPI style messaging and .. OpenMP annotation or Automatic Parallelism of existing software

is practical way to use those pesky cores with existing code• As parallelism is typically not expressed precisely, one needs luck to get good

performance• Remember writing in Fortran, C, C#, Java … throws away information

about parallelism HPCS Languages should be able to properly express parallelism

but we do not know how efficient and reliable compilers will be• High Performance Fortran failed as language expressed a subset of

parallelism and compilers did not give predictable performance PGAS (Partitioned Global Address Space) like UPC, Co-array

Fortran, Titanium, HPJava• One decomposes application into parts and writes the code for each

component but use some form of global index • Compiler generates synchronization and messaging• PGAS approach should work but has never been widely used – presumably

because compilers not mature

Page 50: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Summary of micro-parallelism On new applications, use MPI/locks with explicit

user decomposition A subset of applications can use “data parallel”

compilers which follow in HPF footsteps• Graphics Chips and Cell processor motivate such

special compilers but not clear how many applications can be done this way

OpenMP and/or Compiler-based Automatic Parallelism for existing codes in conventional languages

Page 51: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Composition of Parallel Components The composition (macro-parallelism) step has many excellent solutions

as this does not have the same drastic synchronization and correctness constraints as one has for scalable kernels• Unlike micro-parallelism step which has no very good solutions

Task parallelism in languages such as C++, C#, Java and Fortran90; General scripting languages like PHP Perl Python Domain specific environments like Matlab and Mathematica Functional Languages like MapReduce, F# HeNCE, AVS and Khoros from the past and CCA from DoE Web Service/Grid Workflow like Taverna, Kepler, InforSense KDE,

Pipeline Pilot (from SciTegic) and the LEAD environment built at Indiana University.

Web solutions like Mash-ups and DSS Many scientific applications use MPI for the coarse grain composition

as well as fine grain parallelism but this doesn’t seem elegant The new languages from Darpa’s HPCS program support task

parallelism (composition of parallel components) decoupling composition and scalable parallelism will remain popular and must be supported.

Page 52: CGB Indiana University Lunchtime Talk January 22 2008 Geoffrey Fox  discussing work with:

Integration of Services and “MPI”/Threads Kernels and Composition must be supported both inside chips (the multicore

problem) and between machines in clusters (the traditional parallel computing problem) or Grids.

The scalable parallelism (kernel) problem is typically only interesting on true parallel computers (rather than grids) as the algorithms require low communication latency.

However composition is similar in both parallel and distributed scenarios and it seems useful to allow the use of Grid and Web composition tools for the parallel problem. • This should allow parallel computing to exploit large investment in service

programming environments Thus in SALSA we express parallel kernels not as traditional libraries but as

(some variant of) services so they can be used by non expert programmers Bottom Line: We need a runtime that supports inter-service linkage and micro-

parallelism linkage CCR and DSS have this property

• Does it work and what are performance costs of the universality of runtime?• Messaging need not be explicit for large data sets inside multicore node.

However still use small messages to synchronize