티스토리 뷰

반응형

FlowDec: A Flow-Based Full-Band General Audio Codec with High Perceptual Quality


  • Lower bitrate에서도 동작하는 general full-band audio codec이 필요함
  • FlowDec
    • Non-adversarial codec training과 conditional flow matching에 기반한 stochastic postfilter를 활용
    • Fine-tuning이나 distillation 없이 required postfilter evaluation을 절감
  • 논문 (ICLR 2025) : Paper Link

1. Introduction

  • Audio codec은 audio waveform을 compact, quantized representation으로 compress 하고, 해당 representation을 기반으로 audio waveform을 faithfully reconstruct 하는 것을 목표로 함
    • BUT, 기존 codec은 ad-hoc design과 extensive manual effort가 필요하므로 12kbit/s 이하의 lower bitrate에서 high-fidelity audio coding을 위한 end-to-end optimization이 어려움
      - 한편으로 SoundStream, DAC, AudioDec, EnCodec과 같은 End-to-End (E2E) Neural Codec은 8kbit의 lower bitrate에서도 우수한 audio quality를 달성함
    • 특히 ScoreDec과 같이 score-based diffusion이나 flow-based generative model을 도입하여 reconstruction quality를 개선할 수 있음
      - BUT, ScoreDec은 high-bitrate인 24kbit/s에서만 동작 가능하고 DNN evaluation으로 인한 Real-Time-Factor (RTF) 저하 문제가 있음

-> 그래서 lower bitrate에서도 효과적으로 동작하는 flow-based neural codec인 FlowDec을 제안

 

  • FlowDec
    • 기존 score-based method를 Conditional Flow Matching (CFM) method로 확장
    • Fine-tuning, distillation 없이 DNN evaluation을 줄여 lower-bitrate, general full-band audio coding을 지원

< Overall of FlowDec >

  • CFM에 기반한 full-band neural auido codec
  • 결과적으로 RTF를 크게 개선하고 lower-bitrate에서 high-fidelity perceptual quality를 달성

2. Method

  • 논문은 code c:=E(x)가 주어진 clean audio xRL의 estimate ˆxRL을 reconstruct 하는 stochastic inference problem을 고려함 
    • 이때 model은 distribution에서 sampling을 통해 clean audio estimate ˆx를 제공하는 것을 목표로 함:
      (Eq. 1) ˆxpdata(ˆx|c),c=E(x)Z,L

      - pdata(|c) : code c가 주어졌을 때 clean audio의 conditional distribution 
    • xRL을 lower-dimensional discrete representation c로 mapping 하는 모든 encoder E는 many-to-one mapping이므로 multiple x은 same code c를 가짐
      1. 따라서 D가 one-to-one mapping인 경우 ideal property D(E(x))=x를 fullfilling 하는 것이 formally impossible 함 
      2. 대신 (Eq. 2)를 minimizing 하여 D를 optimal estimator로 구성할 수 있음:
        (Eq. 2) minDEx[dist(D(E(x)),x)]

        - dist : L2,L1 distance와 같은 pairwise distance
      3. BUT, 해당 방식으로 training 되는 경우 domain-specific loss가 있더라도 perceptually pleasing signal을 생성하지 못함
    • 이를 해결하기 위해 SoundStreamEnCodecDAC 등은 adversarial training loss를 도입하여 decoded signal distribution을 natural signal에 close 하도록 유도함
      - BUT, adversarial training은 interpretability가 부족하고 p(ˆx),p(x) 간의 distance를 properly minimize 하지 못함
    • 따라서 논문은 ScoreDec과 같이 D를 one-to-many mapping으로 구성함
      1. 즉, FlowDec은 deterministic pre-trained initial decoder D0와 stochastic postfilter Ω를 combining 한 stochastic decoder Ds(c)=Ω(D0(c))의 형태로 구성됨 
      2. 여기서 y:=D0(c)라고 하면 Ω는 learned distribution pΩ(|y)로부터 conditional sample ˆxpΩ(ˆx|y)를 생성함
        - 해당 sample은 statistical divergence D를 mimimize 하여 intractable distribution pdata(|y)를 approximate 함

Overall of FlowDec

- Flow Matching

  • Flow Matching은 tractable dsitribution q0(x0)에서 intractable data distribution q1(x1)=pdata로 sample을 transport 하는 model을 학습하는 것을 목표로 함
    • 이때 Flow Matching은 sample x0q0에서 시작하여 다음의 Ordinary Differential Equation (ODE)를 solve 함:
      (Eq. 4) ddtϕt(x)=ut(ϕt(x)),ϕ0(x)=x0
    • 여기서 ϕt:[0,1]×RNRN를 flow라 하고, time-dependent vector field ut:[0,1]×RNRN를 통해 pt=0=q0,pt=1=q1인 probability density path pt:RNR>0을 생성함
    • 그러면 vθ는 다음의 CFM training loss를 통해 학습됨:
      (Eq. 5) LCFM:=Ex,t,pt(x|x1)[||vθ(x,t)ut(x|x1)||22]
      - x1q1
      - 특히 conditional (Eq. 5)는 intractable unconditional flow matching objective와 동일한 gradient를 가지고 correct unconditional probability path pt(x)와 flow field ut(x)를 marginalize 함

- Joint Flow Matching for Signal Enhancement

  • Original flow matching formulation에서 x0,x1은 zero-mean Gaussian q0=N(0,σ2I)에서 independently sampling 됨
    • q0가 standard Gaussian인 경우 conditional path pt(x|x1)q0에서 q1으로의 Optimal Transport (OT)를 fulfill 하지만 modeled marginal probabilitiy path pt(x)는 OT를 fulfill 하지 않음
      1. 결과적으로 learned marginal flow field vθ에서 high-variance training과 lower-straightness가 발생하므로 inefficient inference와 suboptimal sample quality가 나타남
      2. 이를 해결하기 위해 각 training batch {(xb,0,xb,1)}Bb=1에서 pairing을 reorder 하고 각 batch에서 OT algorithm을 통해 optimal coupling을 결정하는 per-batch approximation을 도입할 수 있음
        - 즉, (x0,x1)q(x0,x1)을 independently sample 하지 않고 jointly sampling 함
        - 특히 (x0,x1)를 jointly sampling 하면 OT solver나 extra computation이 필요하지 않음
    • 이때 initial estimate y=D0(c)=D0(E(x))에 access 할 수 있으므로, 논문은 다음의 probability path를 choice 함:
      (Eq. 6) pt(xt|x1,y)=N(xt;μt,σt):=N(xt;y+t(x1y),(1t)2Σy)
      - Σy=diag(σ2y) : diagonal covariance matrix
    • 해당 probability path는 y,x1 간의 linear interpolation에 해당하고, noise는 σy에서 0으로 linearly decrease 하므로 x0,x1 간에 y를 통한 coupling이 나타남 
      1. 즉, q0(x0|x1,y)=N(x;y,Σy)인 경우 x0의 mean은 0에서 y로 shift 됨
      2. 그러면 marginalized q0(x0)는 아래 그림과 같이 variance가 σ2y이고 training data에 centered 된 Gaussian mixture로 볼 수 있음 
      3. 이때 σy가 well-chosen 되어 Gaussian이 negligible overlap 되면 per-batch coupling을 통해 optimal 하다고 가정할 수 있으므로, mini-batch OT가 필요하지 않음 
        - 따라서 σy의 choice는 output quality에 큰 영향을 미침

q0(x0) vs. q0(x0x1)

  • 결과적으로 conditional ut는,
    • Flow Matching을 따라 다음과 같이 derive 됨:
      (Eq. 7) ut(x|x1,y)=x1xt1t
    • xtx0를 통해 나타낼 수 있으므로:
      (Eq. 8) xt=tx1+(1t)x0,x0N(x0;y,Σy)
      (Eq. 9) =tx1+(1t)y+(1t)σtϵ,ϵN(0,I)
      (Eq. 10) x0=y+σyϵ,ϵN(0,I)
    • (Eq. 6)을 따라 x1=x을 대입하면 simple joint flow matching loss를 얻을 수 있음:
      (Eq. 11) LJFM:=EtU(0,1),(x,y)D,ϵN(0,I),xtpt(xt|x0)[||vθ(xt,t,y)(x=x1(y+σyϵ)=x0)||22]
      - D : training dataset
    • 해당 loss는 x0,x1에 대해 reparameterize 함으로써 (Eq. 7)t1 주변의 numerical stability를 제거함
      1. 특히 σy>0을 choice 하면 flow field가 contractive mapping이 되도록 force 할 수 있음
        - 이를 통해 inference를 위한 ODE는 numerically stable 하고 locally converge 됨
      2. pt에 대한 choice는 trajectory가 x에 exactly reach 하도록 하여 SGMSE를 개선함
        - 기존 SGMSE는 correct q0를 modeling 하지 않으므로 fail 할 수 있음
    • 추가적으로 논문은 multiple hyperparameter를 가지는 Stochastic Differential Equation (SDE) 대신, 하나의 hyperparameter σy 만을 사용하는 data-based heuristic을 도입함:
      (Eq. 12) σy=13Q(|XY|2,0.997)
      - Q : quantile operation
    • 한편으로 independent CFM formulation을 사용하여 constant σt=σ를 얻고 sampled noise에 대해 target flow field ut가 independent 하도록 할 수 있음
      1. BUT, 해당 방식은 σ1=σ>0 이므로 아래 그림과 같이 non-contractive flow field와 estimate에 residual noise가 나타남
      2. 반면 FlowDec은 σ1=0이므로 postfiltering task에서 더 나은 quality를 달성할 수 있음

t=0.7에서 Flow Field

  • FlowDec은 x,y를 invertible feature extractor Φ의 feature representation X,Y로 replace 하여 feature domain의 flow를 학습함
    • 이때 Φ는 compression exponent α=0.3의 amplitude-compressed complex STFT를 채택함
      - 추가적으로 input에서 channel-wise concatenate를 통해 Yvθ의 conditioning을 제공함
    • Training 이후 flow model vθ(Eq. 4)의 ODE와 함께 conditional distribution pΩ(X|Y)를 modeling 함
      1. 이때 clean feature estimate ˆXpΩ를 생성하기 위해, initial state (latent) X0q0(X0|Y)를 sample 함
      2. 이후 t=0에서 t=1 까지 vθ를 사용하여 numerical ODE solver를 통해 flow (Eq. 4)를 solve 하여 ˆX1을 구함
        - 논문은 3-step Mid-point Solver (NFE=6)를 사용
      3. 최종적으로 feature extractor Φ의 inverse를 사용하여 waveform estimate ˆx=Φ1(ˆX1)을 생성함

- Non-Adversarial Codec Training

  • Effective phase loss 없이 spectral loss 만으로 training 된 NAR audio generative model은 unsynchronized phase로 인한 buzzy noise가 발생함 
    • 이때 adversarial training을 도입하면 해당 문제를 해결하고 natural-sounding audio를 얻을 수 있음
      - BUT, unstable training, mode-collapse, handcrafted multi-discriminator design 등의 문제가 발생함
    • 따라서 논문은 adversarial training을 제거하는 대신 generative postfilter를 도입함
      1. 즉, adversarial loss 없이 deterministic neural codec을 initial decoder D0로 training 하고 stochastic postfiler Ω를 통해 output audio와 clean audio의 distribution을 matching 함  
      2. 구조적으로는 DAC와 같은 neural codec을 D0로 채택하고 adversarial loss term과 관련된 모든 component를 제거하여 사용함

- Underlying Codec: Improved Non-Adversarial DAC

  • FlowDec의 stochastic postfilter는 ScoreDec과 같이 any underlying codec에 대해 training 되어 waveform estimate를 향상함
    • 이때 다른 sampling rate, bitrate에 대한 adaptibility가 우수한 DAC를 underlying codec의 basis로 채택함
      - 추가적으로 adversarial loss를 제거하고 아래 표와 같이 configuration을 modify 함
    • 한편으로 해당 non-adversarial loss를 training 할 때 30dB의 Scale-Invariant Signal-to-Distortion Ratio (SI-SDR) value가 발생하는 경우가 있음
      1. 이는 low-frequency (2kHz)가 badly modeling 되기 때문으로, 논문은 Multiscale Constant-Q Transform (CQT) loss를 도입하여 해당 문제를 해결함
      2. 추가적으로 DAC의 multiscale Mel loss와 같이 amplitude와 log-amplitude의 difference를 모두 사용하고, SI-SDR과 phase error를 반영하는 L1 waveform-domain loss를 추가함

Underlying Codec Variant

- Frequency-Dependent Noise Levels

  • σy choice는 output quality에 큰 영향을 미침
    • 이때 single scalar σy를 사용하면 added Gausian noise가 high-frequency를 dominate 할 때 over-smoothing이 나타날 수 있음
    • 따라서 논문은 각 STFT frequency band에 대해 (Eq. 12)의 heuristic quantile calculation을 independently performing 하여 frequency-dependent curve σy(f)를 calculate 함

3. Experiments

- Settings

Dataset

- Results

  • 전체적으로 FlowDec이 가장 우수한 성능을 보임

Objective Evaluation

  • Perception-Distortion trade-off 측면에서도 FlowDec은 DAC 보다 더 robust 함

Perception-Distortion

  • ScoreDec과의 비교에서도 FlowDec이 더 뛰어남

FlowDec vs. ScoreDec

  • Spectrogram 측면에서도 FlowDec은 더 나은 reconstruction이 가능함

Spectrogram 비교

  • Listening Test
    • Subjective evaluation을 위한 listening test parameter는 아래 표와 같이 설정됨

Listening Test Parameters

  • Subjective evaluation 측면에서도 FlowDec이 가장 우수함

Subjective Evaluation

  • Real-Time-Factor (RTF)
    • NFE=6의 default setting에서 FlowDec-75의 total RTF는 0.2285, FlowDec-25는 0.2235와 같음
    • 즉, FlowDec은 ScoreDec의 1.707 RTF와 비교하여 상당한 RTF 개선을 보임

 

반응형
댓글
최근에 올라온 글
최근에 달린 댓글
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Total
Today
Yesterday