티스토리 뷰
Paper/Neural Codec
[Paper 리뷰] FlowDec: A Flow-Based Full-Band General Audio Codec with High Perceptual Quality
feVeRin 2025. 4. 12. 12:12반응형
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) 저하 문제가 있음
- BUT, 기존 codec은 ad-hoc design과 extensive manual effort가 필요하므로 12kbit/s 이하의 lower bitrate에서 high-fidelity audio coding을 위한 end-to-end optimization이 어려움
-> 그래서 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
가 주어진 clean audioc:=E(x∗) 의 estimatex∗∈RL 을 reconstruct 하는 stochastic inference problem을 고려함ˆx∈RL - 이때 model은 distribution에서 sampling을 통해 clean audio estimate
를 제공하는 것을 목표로 함:ˆx
(Eq. 1)ˆx∼pdata(ˆx|c),c=E(x∗)∈Zℓ,ℓ≪L
- : codepdata(⋅|c) 가 주어졌을 때 clean audio의 conditional distributionc 을 lower-dimensional discrete representationx∗∈RL 로 mapping 하는 모든 encoderc 는 many-to-one mapping이므로 multipleE 은 same codex∗ 를 가짐c - 따라서
가 one-to-one mapping인 경우 ideal propertyD 를 fullfilling 하는 것이 formally impossible 함D(E(x∗))=x∗ - 대신 (Eq. 2)를 minimizing 하여
를 optimal estimator로 구성할 수 있음:D
(Eq. 2)minDEx∗[dist(D(E(x∗)),x∗)]
- :dist distance와 같은 pairwise distanceL2,L1 - BUT, 해당 방식으로 training 되는 경우 domain-specific loss가 있더라도 perceptually pleasing signal을 생성하지 못함
- 따라서
- 이를 해결하기 위해 SoundStream, EnCodec, DAC 등은 adversarial training loss를 도입하여 decoded signal distribution을 natural signal에 close 하도록 유도함
- BUT, adversarial training은 interpretability가 부족하고 간의 distance를 properly minimize 하지 못함p(ˆx),p(x∗) - 따라서 논문은 ScoreDec과 같이
를 one-to-many mapping으로 구성함D - 즉, FlowDec은 deterministic pre-trained initial decoder
와 stochastic postfilterD0 를 combining 한 stochastic decoderΩ 의 형태로 구성됨Ds(c)=Ω(D0(c)) - 여기서
라고 하면y:=D0(c) 는 learned distributionΩ 로부터 conditional samplepΩ(⋅|y) 를 생성함ˆx∼pΩ(ˆx|y)
- 해당 sample은 statistical divergence 를 mimimize 하여 intractable distributionD 를 approximate 함pdata(⋅|y)
- 즉, FlowDec은 deterministic pre-trained initial decoder
- 이때 model은 distribution에서 sampling을 통해 clean audio estimate

- Flow Matching
- Flow Matching은 tractable dsitribution
에서 intractable data distributionq0(x0) 로 sample을 transport 하는 model을 학습하는 것을 목표로 함q1(x1)=pdata - 이때 Flow Matching은 sample
에서 시작하여 다음의 Ordinary Differential Equation (ODE)를 solve 함:x0∼q0
(Eq. 4)ddtϕt(x)=ut(ϕt(x)),ϕ0(x)=x0 - 여기서
를 flow라 하고, time-dependent vector fieldϕt:[0,1]×RN→RN 를 통해ut:[0,1]×RN→RN 인 probability density pathpt=0=q0,pt=1=q1 을 생성함pt:RN→R>0 - 그러면
는 다음의 CFM training loss를 통해 학습됨:vθ
(Eq. 5)LCFM:=Ex,t,pt(x|x1)[||vθ(x,t)−ut(x|x1)||22]
-x1∼q1
- 특히 conditional (Eq. 5)는 intractable unconditional flow matching objective와 동일한 gradient를 가지고 correct unconditional probability path 와 flow fieldpt(x) 를 marginalize 함ut(x)
- 이때 Flow Matching은 sample
- Joint Flow Matching for Signal Enhancement
- Original flow matching formulation에서
은 zero-mean Gaussianx0,x1 에서 independently sampling 됨q0=N(0,σ2I) 가 standard Gaussian인 경우 conditional pathq0 은pt(x|x1) 에서q0 으로의 Optimal Transport (OT)를 fulfill 하지만 modeled marginal probabilitiy pathq1 는 OT를 fulfill 하지 않음pt(x) - 결과적으로 learned marginal flow field
에서 high-variance training과 lower-straightness가 발생하므로 inefficient inference와 suboptimal sample quality가 나타남vθ - 이를 해결하기 위해 각 training batch
에서 pairing을 reorder 하고 각 batch에서 OT algorithm을 통해 optimal coupling을 결정하는 per-batch approximation을 도입할 수 있음{(xb,0,xb,1)}Bb=1
- 즉, 을 independently sample 하지 않고 jointly sampling 함(x0,x1)∼q(x0,x1)
- 특히 를 jointly sampling 하면 OT solver나 extra computation이 필요하지 않음(x0,x1)
- 결과적으로 learned marginal flow field
- 이때 initial estimate
에 access 할 수 있으므로, 논문은 다음의 probability path를 choice 함:y=D0(c)=D0(E(x∗))
(Eq. 6)pt(xt|x1,y)=N(xt;μt,σt):=N(xt;y+t(x1−y),(1−t)2Σy)
- : diagonal covariance matrixΣy=diag(σ2y) - 해당 probability path는
간의 linear interpolation에 해당하고, noise는y,x1 에서σy 으로 linearly decrease 하므로0 간에x0,x1 를 통한 coupling이 나타남y - 즉,
인 경우q0(x0|x1,y)=N(x;y,Σy) 의 mean은x0 에서0 로 shift 됨y - 그러면 marginalized
는 아래 그림과 같이 variance가q0(x0) 이고 training data에 centered 된 Gaussian mixture로 볼 수 있음σ2y - 이때
가 well-chosen 되어 Gaussian이 negligible overlap 되면 per-batch coupling을 통해 optimal 하다고 가정할 수 있으므로, mini-batch OT가 필요하지 않음σy
- 따라서 의 choice는 output quality에 큰 영향을 미침σy
- 즉,

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

- FlowDec은
를 invertible feature extractorx∗,y 의 feature representationΦ 로 replace 하여 feature domain의 flow를 학습함X∗,Y - 이때
는 compression exponentΦ 의 amplitude-compressed complex STFT를 채택함α=0.3
- 추가적으로 input에서 channel-wise concatenate를 통해 에Y 의 conditioning을 제공함vθ - Training 이후 flow model
는 (Eq. 4)의 ODE와 함께 conditional distributionvθ 를 modeling 함pΩ(X∗|Y) - 이때 clean feature estimate
를 생성하기 위해, initial state (latent)ˆX∼pΩ 를 sample 함X0∼q0(X0|Y) - 이후
에서t=0 까지t=1 를 사용하여 numerical ODE solver를 통해 flow (Eq. 4)를 solve 하여vθ 을 구함ˆX1
- 논문은 3-step Mid-point Solver ( )를 사용NFE=6 - 최종적으로 feature extractor
의 inverse를 사용하여 waveform estimateΦ 을 생성함ˆx=Φ−1(ˆX1)
- 이때 clean feature estimate
- 이때
- 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를 도입함
- 즉, adversarial loss 없이 deterministic neural codec을 initial decoder
로 training 하고 stochastic postfilerD0 를 통해 output audio와 clean audio의 distribution을 matching 함Ω - 구조적으로는 DAC와 같은 neural codec을
로 채택하고 adversarial loss term과 관련된 모든 component를 제거하여 사용함D0
- 즉, adversarial loss 없이 deterministic neural codec을 initial decoder
- 이때 adversarial training을 도입하면 해당 문제를 해결하고 natural-sounding audio를 얻을 수 있음
- 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 할 때
의 Scale-Invariant Signal-to-Distortion Ratio (SI-SDR) value가 발생하는 경우가 있음−30dB - 이는 low-frequency (
)가 badly modeling 되기 때문으로, 논문은 Multiscale Constant-Q Transform (CQT) loss를 도입하여 해당 문제를 해결함≤2kHz - 추가적으로 DAC의 multiscale Mel loss와 같이 amplitude와 log-amplitude의 difference를 모두 사용하고, SI-SDR과 phase error를 반영하는
waveform-domain loss를 추가함L1
- 이는 low-frequency (
- 이때 다른 sampling rate, bitrate에 대한 adaptibility가 우수한 DAC를 underlying codec의 basis로 채택함

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

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

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

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

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

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

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

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