Learning Similarity Metrics for Numerical Simulations Georg Kohl - - PowerPoint PPT Presentation

learning similarity metrics for numerical simulations
SMART_READER_LITE
LIVE PREVIEW

Learning Similarity Metrics for Numerical Simulations Georg Kohl - - PowerPoint PPT Presentation

Learning Similarity Metrics for Numerical Simulations Georg Kohl Kiwon Um Nils Thuerey Technical University of Munich Overview Motivation Similarity assessment of scalar 2D simulation data from PDEs Overview Motivation Similarity


slide-1
SLIDE 1

Learning Similarity Metrics for Numerical Simulations

Georg Kohl Kiwon Um Nils Thuerey

Technical University of Munich

slide-2
SLIDE 2

Overview – Motivation

Similarity assessment of scalar 2D simulation data from PDEs

slide-3
SLIDE 3

Overview – Motivation

→ → → Similarity assessment of scalar 2D simulation data from PDEs

slide-4
SLIDE 4

Overview – Motivation

Typical metrics like L¹ or L² operate locally → structures and patterns are ignored Recognition of spatial contexts with CNNs Mathematical metric properties should be considered

0.1 0.1 0.1 0.2

slide-5
SLIDE 5

Overview – Method

Numerical Simulation

Initial condition varied in isolation Ground truth distances Simulation with PDE Solver Data sequence

[ pi

pi+1 Δi pi+2Δi ⋯ pi+10 Δi]

[0.0

0.1 0.2 ⋯ 1.0] ⋯

Variation defines

slide-6
SLIDE 6

Overview – Method

Numerical Simulation

Initial condition varied in isolation Ground truth distances Simulation with PDE Solver Data sequence

[ pi

pi+1 Δi pi+2Δi ⋯ pi+10 Δi]

[0.0

0.1 0.2 ⋯ 1.0] ⋯

Variation defines

Learning

Learned distances CNN CNN

[0.01

0.12 0.24 ⋯ 0.99]

Pairing Feature normalization Shared weights Feature comparison

slide-7
SLIDE 7

Overview – Method

Numerical Simulation

Initial condition varied in isolation Ground truth distances Simulation with PDE Solver Data sequence

[ pi

pi+1 Δi pi+2Δi ⋯ pi+10 Δi]

[0.0

0.1 0.2 ⋯ 1.0] ⋯

Variation defines

Learning

Learned distances CNN CNN

[0.01

0.12 0.24 ⋯ 0.99]

Pairing Feature normalization Shared weights Feature comparison Loss Optimization

slide-8
SLIDE 8

Overview – Method

Numerical Simulation

Initial condition varied in isolation Ground truth distances Simulation with PDE Solver Data sequence

[ pi

pi+1 Δi pi+2Δi ⋯ pi+10 Δi]

[0.0

0.1 0.2 ⋯ 1.0] ⋯

Variation defines

Learning

Learned distances CNN CNN

[0.01

0.12 0.24 ⋯ 0.99]

Pairing Feature normalization Shared weights Feature comparison

Evaluation

Spearman’s ranking correlation

[0.95 ]

Loss Optimization

slide-9
SLIDE 9

Overview – Results

Single example: distance comparison

Plume (a) Reference Plume (b)

LSiM (ours) L² Ground Truth

1 Distance to Reference Plume (a) Plume (b)

slide-10
SLIDE 10

Overview – Results

Single example: distance comparison Combined test data: correlation evaluation

Plume (a) Reference Plume (b)

LSiM (ours) L² Ground Truth

1 Distance to Reference Plume (a) Plume (b) L² SSIM LPIPS LSiM (ours) 0.40 0.50 0.60 0.70 0.80 Spearman's rank correlation

slide-11
SLIDE 11

Related Work

“Shallow” vector space metrics

– Metrics induced by Lp-norms, peak signal-to-noise ratio (PSNR) – Structural similarity index (SSIM) [Wang04]

Evaluation with user studies for PDE data

– Liquid simulations [Um17] – Non-oscillatory discretization schemes [Um19]

Image-based deep metrics with CNNs

– E.g. learned perceptual image patch similarity (LPIPS) [Zhang18]

[Wang04] Wang, Bovik, Sheikh, and Simoncelli. Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 2004 [Um17] Um, Hu, and Thuerey. Perceptual Evaluation of Liquid Simulation Methods. ACM Transactions on Graphics, 2017 [Um19] Um, Hu, Wang, and Thuerey. Spot the Difference: Accuracy of Numerical Simulations via the Human Visual System. CoRR, abs/1907.04179, 2019 [Zhang18] Zhang, Isola, Efros, Shechtman, and Wang. The Unreasonable Effectiveness of Deep Features as a Perceptual Metric. CVPR, 2018

slide-12
SLIDE 12

Data Generation

Time depended, motion-based PDE with one varied initial condition

Initial conditions Output Finite difference solver with time discretization

[ p0

p1 ⋯ pi] t1 t2 tt

slide-13
SLIDE 13

Data Generation

Time depended, motion-based PDE with one varied initial condition

[ p0

p1 ⋯ pi+n⋅Δi] t1 t2 tt

  • n

Increasing parameter change Decreasing output similarity

  • 1

[ p0

p1 ⋯ pi+Δi] t1 t2 tt

Initial conditions Output Finite difference solver with time discretization

[ p0

p1 ⋯ pi] t1 t2 tt

slide-14
SLIDE 14

Data Generation

Time depended, motion-based PDE with one varied initial condition Chaotic behavior in controlled environment → added noise to adjust data difficulty

noise1,1(s) noise1,2(s) noise1,t(s)

[ p0

p1 ⋯ pi+n⋅Δi] t1 t2 tt

  • n

noisen,1(s) noisen,2(s) noisen,t(s)

Increasing parameter change Decreasing output similarity

noise2,1(s) noise2,2(s) noise2,t(s)

  • 1

[ p0

p1 ⋯ pi+Δi] t1 t2 tt

Initial conditions Output Finite difference solver with time discretization

[ p0

p1 ⋯ pi] t1 t2 tt

slide-15
SLIDE 15

Training Data

Eulerian smoke plume Liquid via FLIP [Zhu05] Advection-diffusion transport Burger’s equation

[Zhu05] Zhu and Bridson. Animating sand as a fluid. ACM SIGGRAPH, 2005

slide-16
SLIDE 16

Test Data

Liquid (background noise) Advection-diffusion transport (density) Shape data Video data TID2013 [Ponomarenko15]

[Ponomarenko15] Ponomarenko, Jin, Ieremeiev, et al. Image database TID2013: Peculiarities, results and perspectives. Signal Processing-Image Communication, 2015

slide-17
SLIDE 17

Method – Base Network

Siamese architecture (shared weights) → Convolution + ReLU layers Feature extraction from both inputs Existing network possible → specialized model works better

Base Network Base Network Feature maps: sets of 3rd order tensors

slide-18
SLIDE 18

Method – Feature Normalization

Adjust value range of feature vectors along channel dimension

– Unit length normalization → cosine distance (only angle comparison) – Element-wise std. normal distribution → angle and length in global length distribution

Base Network Base Network Feature maps: sets of 3rd order tensors Feature map normalization Feature map normalization

slide-19
SLIDE 19

Method – Latent Space Difference

Actual comparison of feature maps → element-wise distance Must be a metric w.r.t. the latent space → ensure metric properties

  • r are useful options

Base Network Base Network Feature maps: sets of 3rd order tensors Element-wise latent space difference Difference maps: set of 3rd order tensors

|~

x−~ y| (~ x−~ y)

2

Feature map normalization Feature map normalization

slide-20
SLIDE 20

Method – Aggregations

Compression of difference maps to scalar distance prediction Learned channel aggregation via weighted average Simple aggregations with sum or average

Base Network Base Network Feature maps: sets of 3rd order tensors Feature map normalization Feature map normalization Element-wise latent space difference Difference maps: set of 3rd order tensors Channel aggregation: weighted avg. 1 Learned weight per feature map Average maps: set of 2nd order tensors Spatial aggregation: average Layer aggregation: summation Distance

  • utput

d

Result: scalar Layer distances: set of scalars

d1 d2 d3

slide-21
SLIDE 21

Loss Function

Ground truth distances c and predicted distances d Mean squared error term → minimize distance deviation directly Inverted correlation term → maximize linear distance relationship

L(c ,d) = λ1(c−d)

2 + λ2(1− (c−¯

c)⋅ (d−¯ d) ‖c−¯ c‖

2 ‖d−¯

d‖

2)

slide-22
SLIDE 22

Results

Evaluation with Spearman’s rank correlation Ground truth against predicted distances

Metric Validation data sets Test data sets Smo Liq Adv Bur TID LiqN AdvD Sha Vid All L2 0.66 0.80 0.74 0.62 0.82 0.73 0.57 0.58 0.79 0.61 SSIM 0.69 0.74 0.77 0.71 0.77 0.26 0.69 0.46 0.75 0.53 LPIPS 0.63 0.68 0.68 0.72 0.86 0.50 0.62 0.84 0.83 0.66 LSiM 0.78 0.82 0.79 0.75 0.86 0.79 0.58 0.88 0.81 0.73

slide-23
SLIDE 23

Real-world Evaluation

ScalarFlow [Eckert19] WeatherBench [Rasp20] Johns Hopkins Turbulence Database (JHTDB) [Perlman07]

[Eckert19] Eckert, Um, and Thuerey. Scalarflow: A large-scale volumetric data set of real-world scalar transport flows [...]. ACM Transactions on Graphics, 2019 [Rasp20] Rasp, Dueben, Scher, Weyn, Mouatadid, and Thuerey. Weatherbench: A benchmark dataset for data-driven weather forecasting. CoRR, abs/2002.00469, 2020 [Perlman07] Perlman, Burns, Li, and Meneveau. Data exploration of turbulence simulations using a database cluster. ACM/IEEE Conference on Supercomputing, 2007

slide-24
SLIDE 24

Real-world Evaluation

Retrieve order of spatial and temporal frame translations Six interval spacings per data repository 180-240 sequences each Mean and standard deviation over correlation of each spacing

L² SSIM LPIPS LSiM (ours) 0.6 0.7 0.8 0.9 1.0 ScalarFlow JHTDB WeatherBench Average Spearman correlation

slide-25
SLIDE 25

Future Work

Accuracy assessment of new simulation methods Parameter reconstructions of observed behavior Guiding generative models of physical systems Extensions to other data

– 3D flows and further PDEs – Multi-channel turbulence data

slide-26
SLIDE 26

Thank you for your attention!

Join the live-sessions for questions and discussion Source code available at https://github.com/tum-pbs/LSIM