Detecting Credit Card Fraud: A Machine Learning Approach
A Fast Algorithm for Solving Scalar Wave Scattering Problem by Billions of Particles
1. Fast Algorithm for Solving Scalar Wave Scattering
Problem by Billions of Particles
Nhan Tran
Kansas State University
Nhan Tran (KSU) Wave scattering 1 / 29
2. Overview
1 Introduction
2 Scalar wave scattering by many small impedance particles
3 Solution
4 Fast algorithm for solving wave scattering problem by billions of
particles
5 Experiments
6 Conclusions
Nhan Tran (KSU) Wave scattering 2 / 29
3. Introduction
Wave scattering is a natural phenomenon, for example, light
scattering in the atmosphere, light scattering by cosmic dust and by
the dust in atmosphere, etc.
In our study, the field scattered by small impedance particles is
O(a2−κ), as a → 0, which is much larger than the field in Rayleigh
scattering, O(a3). Here, a is the radius of small particles.
Basic physical assumptions: a << d << λ, where λ is the wavelength
and d is the minimal distance between neighboring particles.
The boundary impedance of a particle is ζ = h(x)a−κ, where h(x) is
continuous and κ ∈ [0, 1). Im ζ ≤ 0.
Nhan Tran (KSU) Wave scattering 3 / 29
4. Scalar wave scattering problem
The scattering problem is formulated as follows:
( 2
+ k2
n2
0(x))u = 0 in D := R3
D, D := ∪M
m=1Dm, D ⊂ Ω (2.1)
uN = ζmu on Sm := ∂Dm, Im ζm ≤ 0, 1 ≤ m ≤ M, (2.2)
u(x) = u0(x) + v(x), (2.3)
u0(x) = eikα·x
, |α| = 1, (2.4)
vr − ikv = o(1/r), r := |x| → ∞. (2.5)
where
Dm is the mth particle
k is the wave number, k = 2π/λ, ka 1
n0(x), is the refraction coefficient, n0(x) = 1 in Ω := R3 Ω, n0(x) is
a Riemann-integrable function and Im n2
0(x) ≥ 0 in Ω
u0 is the incident plane wave and v is the scattered wave
α is the direction of the incident wave
N is the outer unit normal to Sm
Nhan Tran (KSU) Wave scattering 4 / 29
5. Solution
It was proved in [1] that if Im n2
0(x) ≥ 0 and Im h(x) ≤ 0, then the
scattering problem (2.1)-(2.5) has a unique solution and it can be found in
the form
u(x) = u0(x) +
M
m=1 Sm
G(x, t)σm(t)dt. (3.1)
G(x, y) is the Green’s function of the Helmholtz equation (2.1), G
satisfies the radiation condition (2.5) and the equation
[ 2
+ k2
n2
0(x)]G = −δ(x − y) in R3
. (3.2)
If n2
0 = 1 in R3, then
G(x, y) =
eik|x−y|
4π|x − y|
. (3.3)
σm(t) are unknown continuous functions. These functions are
uniquely defined by the boundary condition (2.2), see [2].
Nhan Tran (KSU) Wave scattering 5 / 29
6. Approximate solution
Rewrite the total field in the form
u(x) = u0(x)+
M
m=1
G(x, xm)Qm+
M
m=1 Sm
[G(x, t)−G(x, xm)]σm(t)dt,
(3.4)
where
Qm :=
Sm
σm(t)dt. (3.5)
In (3.4)
|G(x, xm)Qm|
Sm
[G(x, t) − G(x, xm)]σm(t)dt , (3.6)
as a → 0 and |x − xm| ≥ a. Therefore, the solution to the scattering
problem can be well approximated by the sum
u(x) ∼ u0(x) +
M
m=1
G(x, xm)Qm. (3.7)
Nhan Tran (KSU) Wave scattering 6 / 29
7. Find Qm
To find the numbers Qm, let us define the effective field ue(x). The effective
field acting on the jth
particle is defined as follows
ue(xj ) := u(xj ) −
Sj
G(xj , t)σj (t)dt, (3.8)
or equivalently
ue(xj ) = u0(xj ) +
M
m=1,m=j Sm
G(xj , t)σm(t)dt, (3.9)
where xj is a point in Dj .
The asymptotic formula for Qm is derived in [1]:
Qm = −cS a2−κ
h(xm)ue(xm)[1 + o(1)], a → 0, (3.10)
where cS > 0 is a constant depending on the shape of the particle,
|Sm| = cS a2
, (3.11)
|Sm| is the surface area of Sm. If Sm is a sphere of radius a, then cS = 4π.
Nhan Tran (KSU) Wave scattering 7 / 29
8. Effective field and original system (ORI)
Using formula for Qm one gets the effective field acting on the jth
particle
ue(xj ) u0(xj ) − cS
M
m=1,m=j
G(xj , xm)h(xm)ue(xm)a2−κ
, (3.12)
as a → 0 and 1 ≤ j ≤ M.
Denote uj := ue(xj ), u0j := u0(xj ), Gjm := G(xj , xm), and
hm := h(xm). Then (3.12) can be rewritten as a linear algebraic
system for the unknown numbers um:
uj = u0j − cS
M
m=1,m=j
Gjmhma2−κ
um, as a → 0, 1 ≤ j ≤ M.
(3.13)
the numbers uj , 1 ≤ j ≤ M, are unknowns. (3.13) is called the
original linear algebraic system (ORI).
Nhan Tran (KSU) Wave scattering 8 / 29
9. Distribution of particles
Assume that the distribution of particles in ∆ ⊂ Ω satisfies this law
N(∆) =
1
a2−κ
∆
N(x)dx[1 + o(1)], as a → 0. (3.14)
N(x) ≥ 0 is a given continuous function in Ω that can be chosen
desired. N(∆) is the total number of the embedded particles in ∆.
Let Ω be partitioned into P non-intersecting sub-cubes ∆p of side b
such that b d a, where b = b(a), d = d(a), and
lima→0
d(a)
b(a) = 0. Here P M, and each sub-cube contains many
particles.
If the function N(x) in (3.14) is continuous and b 1, then
N(∆p)a2−κ
= N(xp)|∆p|[1 + o(1)] = a2−κ
xm∈∆p
1, as a → 0,
(3.15)
|∆p| is the volume of ∆p and xp ∈ ∆p is an arbitrary point, for
example, the center of ∆p.
Nhan Tran (KSU) Wave scattering 9 / 29
10. Reduced order system (RED)
Thus, (ORI) can be rewritten as
uq = u0q − cS
P
p=1,p=q
GqphpNpup|∆p|, for 1 ≤ q ≤ P, (3.16)
where Np := N(xp) and xp is a point in ∆p, for example, the center
of ∆p. We call (3.16) the reduced linear algebraic system (RED).
This system is much easier to solve since P M.
Let |∆p| → 0. Then it follows from (3.16) that the limiting integral
equation for u = u(x) holds
u(x) = u0(x) − cS
Ω
G(x, y)h(y)N(y)u(y)dy, for x ∈ R3
, (3.17)
if the assumption (3.14) is satisfied. The sum in (3.16) is the
Riemannian sum for the integral in (3.17) which converges to this
integral when maxp |∆p| → 0.
Nhan Tran (KSU) Wave scattering 10 / 29
11. Integral equation (IE)
If a → 0, b(a) → 0, and b >> d >> a, then we have the uniqueness
of the solution to the limiting integral equation
u(x) = u0(x) − cS
Ω
G(x, y)h(y)N(y)u(y)dy, for x ∈ R3
. (3.18)
Let
p(x) := cS N(x)h(x). (3.19)
Then the limiting integral equation can be written as
u(x) = u0(x) −
Ω
G(x, y)p(y)u(y)dy, for x ∈ R3
. (3.20)
Here u = u(x) is the limiting field in the medium created by
embedding many small impedance particles distributed according to
equation (3.14). We call (3.20) the limiting integral equation (IE).
Nhan Tran (KSU) Wave scattering 11 / 29
12. New refraction coefficient
Now, applying the operator ( 2 + k2n2
0) to (IE)
u(x) = u0(x) −
Ω
G(x, y)p(y)u(y)dy, for x ∈ R3
. (3.21)
and using the equation ( 2 + k2n2
0)G(x, y) = −δ(x − y), one gets
( 2
+ k2
n2
0)u(x) = p(x)u(x). (3.22)
This implies
( 2
+ k2
n2
)u = 0, (3.23)
where
n2
(x) := n2
0(x) − k−2
p(x), (3.24)
and n(x) is the new refraction coefficient of the limiting medium.
Nhan Tran (KSU) Wave scattering 12 / 29
13. Creating meta-materials
Since Imh(x) ≤ 0 and Imn2
0(x) ≥ 0, one concludes that Imn2(x) ≥ 0.
From (3.24), one gets
p(x) = k2
[n2
0(x) − n2
(x)]. (3.25)
By equation (3.19), h(x) can be computed as
h(x) =
p(x)
cS N(x)
. (3.26)
This gives a method for creating new materials with a desired
refraction coefficient n(x) by embedding many small impedance
particles into a given material with the original refraction coefficient
n0 using the distribution law (3.14). These engineered materials are
called meta-materials which have not been found in nature and have
many interesting applications such as creating super-lens, cloaking
devices, etc, see [9] and [10].
Nhan Tran (KSU) Wave scattering 13 / 29
14. Fast algorithm for solving wave scattering problem by
billions of particles
Consider the following summation in the (ORI)
M
m=1,m=j
G(xj, xm)u(xm), (4.1)
G in equation (4.1) is the Green’s function of the form
G(xj, xm) =
eik|xj−xm|
4π|xj − xm|
, (4.2)
xj, xm are the positions of the jth and mth particles in R3, respectively.
If we write G(x − y) := G(x, y), the summation in (4.1) will be
M
m=1,m=j
G(xj − xm)u(xm), (4.3)
which is a discrete convolution of G and u, G ∗ u, if m = j is dropped.
Nhan Tran (KSU) Wave scattering 14 / 29
15. Fast algorithm
The convolution in (4.3) can be carried out by using Convolution
theorem as follows:
G ∗ u = F−1
(F(G ∗ u)) = F−1
(F(G) · F(u)), (4.4)
where the · stands for the component-wise multiplication of two
vectors and its result is a vector.
If particles are distributed uniformly, one can just use FFT to quickly
compute this convolution. Otherwise, one can use Nonequispaced
Fast Fourier Transform (NFFT), see [3], [4], and [5].
To illustrate the idea, let us assume for simplicity that particles are
distributed uniformly, that is, N(x) =const in (3.14).
Nhan Tran (KSU) Wave scattering 15 / 29
16. Fast algorithm
Let m = (xm, ym, zm) be the position of the mth particle in R3, where
xm, ym, and zm are real numbers.
We will assume our domain is a unit cube (different domains can be
treated similarly), this cube is placed in the first octant and the origin
is one of its vertices, then m can be rewritten as
m = d · (m1, m2, m3), (4.5)
where d is a scalar, the distance between neighboring particles, m is a
vector, and (m1, m2, m3) is a vector whose components m1, m2, and
m3 are integers in [0, b), and b = M1/3 is the number of particles on
a side of the cube.
Nhan Tran (KSU) Wave scattering 16 / 29
17. Fast algorithm
In the convolution
M
m=1,m=j
G(xj − xm)u(xm), (4.6)
suppose that xj = d · (j1, j2, j3) and xm = d · (m1, m2, m3), one can write
this convolution as
G ∗ u =
M
m=1,m=j
G(xj − xm)u(xm) (4.7)
=
b−1
m1, m2, m3 = 0
(m1, m2, m3) = (j1, j2, j3)
G(j1 − m1, j2 − m2, j3 − m3)u(m1, m2, m3).
(4.8)
This is a 3D convolution of G and u.
Nhan Tran (KSU) Wave scattering 17 / 29
18. Fast algorithm
We can store matrix G as a vector, G(xj − xm). This reduces
drastically the amount of memory for storing the original M × M
matrix to a much smaller amount for storing an M × 1 vector, which
is also denoted by G.
Since this vector depends on the three components,
G = G(j1 − m1, j2 − m2, j3 − m3) where j1, m1, j2, m2, j3, m3 are
integers in [0, b) and (j1, j2, j3) = (m1, m2, m3), we can alternatively
store it as a cube of size b × b × b.
Vector u(m1, m2, m3) is also stored as a cube of size b × b × b.
Nhan Tran (KSU) Wave scattering 18 / 29
19. Fast algorithm
Each cube is a stack of planes which will be distributed across all
machines in a cluster for parallelizing the computations and reducing
moving data around to prevent traffic jam and network latency.
Each machine will work on its local data. Information can be shared
among machines but as minimal as possible.
Matrix-vector multiplication is done via a function handle without
storing any matrix.
When implementing the 3D convolution we need to pad the cubes G and
u as follows:
Pad in x-direction
Pad in y-direction
Pad in z-direction
Pad x
−−−→
Pad y
−−−→
Pad z
−−−→
Nhan Tran (KSU) Wave scattering 19 / 29
20. Fast algorithm
For each direction, the padding is illustrated by this example
For G:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Pad
−−→
1 2 3 4 3 2
5 6 7 8 7 6
9 10 11 12 11 10
13 14 15 16 15 14
For u:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Pad
−−→
1 2 3 4 0 0
5 6 7 8 0 0
9 10 11 12 0 0
13 14 15 16 0 0
Nhan Tran (KSU) Wave scattering 20 / 29
21. Fast algorithm
The Fourier transform and inverse Fourier transform are of order
O(n log n), and vector pointwise multiplication is of order O(n) if the
vectors are n × 1. In our case the total number of operations for
computing G ∗ u = F−1(F(G) · F(u)) is
n log n + n log n + n + n log n = O(n log n), n = (2b − 2)3
, (4.9)
since the Fourier transforms F(G) and F(u) are of order O(n log n),
the vector point-wise multiplication F(G) · F(u) is of order O(n), and
the inverse Fourier transform F−1(F(G)·F(u)) is of order O(n log n).
If we compare this with the standard matrix-vector multiplication
which takes M2 operations (M = b3), this is a huge reduction of the
number of operations and computation time, when M is very large,
say M ≥ 109.
Nhan Tran (KSU) Wave scattering 21 / 29
22. Experiments
The algorithm is implemented in parallel using PETSc [6], FFTW [7]
libraries, and computed using Gordon super computer at XSEDE [8].
We assume that the domain Ω, which contains all the particles, is a
unit cube, placed in the first octant such that the origin is one of its
vertices, and particles are distributed uniformly in Ω.
Suppose we want to create a new meta-material with the refraction
coefficient n(x) = −1 in Ω given a material with the refraction
coefficient n0(x) = 1 by embedding many small particles into the
given material.
We assume the particles are spheres, so cS = 4π. The new refraction
coefficient is computed by the following formula
n(x) = [n2
0(x) − k−2
cS h(x)N(x)]1/2
, (5.1)
where N(x) and h(x) are at our choices.
Nhan Tran (KSU) Wave scattering 22 / 29
23. Experiment
The radius a of the particles and the distance d between neighboring
particles are chosen so that
d =
1
M1/3
= a
2−κ
3 , and M =
1
a2−κ
, (5.2)
Speed of wave, v = 34400 cm/sec
Frequency, f = 1000 Hz
Wave number, k = 0.182651 cm−1
Direction of plane wave, α = (1, 0, 0)
The constant κ = 0.5
Volume of the domain that contains all particles, |Ω| = 1 cm3
Distribution of particles, N = Ma2−κ/|Ω| = 1
Function h(x) = 2.65481E-09 + i5.30961E-06
Original refraction coefficient, n0 = 1+i0
Desired refraction coefficient, n = -1+i0.001
Number of small subcubes for solving (RED), P = 8000
Number of collocation points for solving (IE), C = 64000
Nhan Tran (KSU) Wave scattering 23 / 29
24. Time usage for solving the wave scattering problem
The computation time is measured by Service Unit (SU), 1 SU
corresponds to 1 hour/core.
Number of particles 1 billion 4 billions 7 billions 10 billions
Time usage (second) 103 1076 2082 1674
Node usage 8 28 49 74
Number of SUs 3.66 133.90 453.41 550.56
Nhan Tran (KSU) Wave scattering 24 / 29
25. Error estimates
Since the numbers of unknowns in (ORI), (RED), and (IE) are
different, M P and P < C, we use interpolation procedure to
compare their solutions. For example, let x and y be the solutions of
(ORI) and (RED), respectively. We find all the particles xi that lie in
the subcube ∆q corresponding to yq and then find the difference
|xi − yq|. Then, we compute
sup
yq
1
N(∆q)
xi ∈∆q
|xi − yq|, (5.3)
where N(∆q) is the number of particles in the subcube ∆q. This
gives the difference between the solutions of (ORI) and (RED).
The errors (solution differences) between (RED) vs. (IE) and (ORI)
vs. (IE) are computed similarly.
The numbers in table 26 are rounded to the nearest ten-thousandths.
Nhan Tran (KSU) Wave scattering 25 / 29
26. Error estimates
Number of particles 1 billion 4 billions 7 billions 10 billions
(ORI) vs. (RED) 0.0045 0.0045 0.0045 0.0045
(RED) vs. (IE) 0.0022 0.0022 0.0022 0.0022
(ORI) vs. (IE) 0.0022 0.0022 0.0022 0.0022
Nhan Tran (KSU) Wave scattering 26 / 29
27. Conclusions
The accuracy of our numerical method is high if a d λ.
This algorithm is applicable not only to solving scalar wave scattering
problems but also to other PDE problems, for example, aeroacoustics,
signal processing, etc.
Furthermore, it is important to note that this method is of the same
order of number of operations as that of Fast Multipole Method
(FMM), O(n log n). However, we do not use multipole expansions
and our method is easier to implement compared to FMM. In
addition, our method can give an asymptotically exact solution to the
wave scattering problem when a → 0.
Nhan Tran (KSU) Wave scattering 27 / 29
28. References
A. G. Ramm. Scattering of acoustic and electromagnetic waves by small bodies of arbitrary shapes. Applications to
creating new engineered materials. Momentum Press, New York, 2013.
A. G. Ramm. Many-body wave scattering problems in the case of small scatterers. Journal of Applied Mathematics and
Computing, 41 (1-2): 473–500, 2013.
L. Greengard and J. Y. Lee. Accelerating the nonuniform fast Fourier transform. SIAM review, 46 (3): 443–454, 2004.
J. Keiner, S. Kunis, and D. Potts. Using NFFT 3—a software library for various non-equispaced fast Fourier transforms.
ACM Transactions on Mathematical Software (TOMS), 36 (4): 19, 2009.
M. Pippig and D. Potts. Parallel three-dimensional nonequispaced fast Fourier transforms and their application to particle
simulation. SIAM Journal on Scientific Computing, 35 (4): C411–C437, 2013.
S. Balay, S. Abhyankar, M. Adams, J. Brown, P. Brune, K. Buschelman, V. Eijkhout, W. Gropp, D. Kaushik,
M. Knepley, et al. PETSc users manual revision 3.5. Technical report, Argonne National Laboratory (ANL), 2014.
M. Frigo and S. G. Johnson. Fftw: An adaptive software architecture for the FFT. In Acoustics, Speech and Signal
Processing, 1998, Proceedings of the 1998 IEEE International Conference on, volume 3, pages 1381–1384. IEEE, 1998.
S. M. Strande, P. Cicotti, R. S. Sinkovits, W. S. Young, R. Wagner, M. Tatineni, E. Hocks, A. Snavely, and M. Norman.
Gordon: design, performance, and experiences deploying and supporting a data intensive supercomputer. In Proceedings
of the 1st Conference of the Extreme Science and Engineering Discovery Environment: Bridging from the eXtreme to the
campus and beyond, page 3. ACM, 2012.
Schurig, David, et al. Metamaterial electromagnetic cloak at microwave frequencies. Science 314.5801: 977-980, 2006.
Pendry, John Brian. Negative refraction makes a perfect lens. Physical review letters 85.18: 3966, 2000.
Nhan Tran (KSU) Wave scattering 28 / 29