논문번역

Particle Filter Recurrent Neural Networks

ksyke 2025. 1. 16. 13:37

목차

    저자: Xiao Ma, Peter Karkus, David Hsu, Wee Sun Lee (National University of Singapore)

    키워드: particle, RNN

    출처: Proceedings of the AAAI Conference on Artificial Intelligence

    https://ojs.aaai.org/index.php/AAAI/article/view/5952

     

    0. 초록

    더보기

    Recurrent neural networks (RNNS) have been extraordinarily successful for prediction with sequential data. To tackle highly variable and multi-modal real-world data, we introduce Particle Filter Recurrent Neural Networks (PF-RNNs), a new RNN family that explicitly model uncertainty in its internal structure: while an RNN relies on a long, deterministic latent state vector, a PF-RNN maintains a latent state distribution, approximated as a set of particles. For effective learning, we provide a fully differentiable particle filter algorithm that updates the PF-RNN latent state distribution according to the Bayes rule. Experiments demonstrate that the proposed PF-RNNs outperform the corresponding standard gated RNNs on a synthetic robot localization dataset and 10 real-world sequence prediction datasets for text classification, stock price prediction, etc. 

    순환 신경망(RNN)은 순차적인 데이터의 예측에서 매우 성공적인 사례를 보여 왔다. 하지만, 높은 변동성과 다중 모달(muli-modal)의 실세계 데이터를 다루기 위해, 본 연구에서는 내부 구조에서 불확실성을 명시적으로 모델링하는 새로운 RNN 계열인 파티클 필터 순환 신경망(PF-RNN)을 소개한다. 기존의 RNN이 길고 결정론적인 잠재 상태 벡터에 의존하는 반면, PF-RNN은 파티클로 근사된 잠재 상태 분포를 유지한다. 효과적인 학습을 위해, 이 연구에선 베이즈 규칙에 따라 PF-RNN 밤재 상태 분포를 갱신하는 완전 미분 가능한 파티클 필터 알고리즘을 제공한다. 실험 결과는 제안된 PF-RNN이  텍스트 분류, 주식 예측과 같은 10개의 실세계 순차 예측 데이터셋 및 합성 로봇 위치 추적 데이터셋에서 기존의 표준 게이트 RNN을 능가한다는 것을 보여준다.

     

    1. 서론

    더보기

    Prediction with sequential data is a long-standing challenge in machine learning. It has many applications, e.g., object tracking (Blake and Isard 1997), speech recognition (Xiong et al. 2018), and decision making under uncertainty (Somani et al. 2013). For effective prediction, predictors require "memory", which summarize and tracks information in the input sequence. The memory state is generally not observable, hence the need for a belief, i.e., a posterior state distribution that captures the sufficient statistic of the input for making predictions. Modeling the belief manually is often difficult. Consider the task of classifying news text─treated as a sequence of words─into categories, such as politics, education, economy, etc. It is difficult to handcraft the belief representation and dynamics for accurate classification. 

    State-of-the-art sequence predictors often use recurrent neural networks (RNNs), which learn a vector h of deterministic time-dependent latent variables as an approximation to the belief. Real-world data, however, are highly variable and often multi-modal. To cope with the complexity of uncertain real-world data and achieve better belief approximation, one could increase the length of latent vector h, thus increasing the number of network parameters and the amount of data required for training. 

    We introduce Particle Filter Recurrent Neural Networks (PF-RNN), a new family of RNNs that seeks to improve belief approximation without lengthening the latent vector h, thus reducing the data required for learning. Particle filtering (Del Moral 1996) is a model-based belief tracking algorithm. It approximates the belief as a set of sampled state that typically have well-understood meaning. PF-RNNs borrow from particle filtering the idea of approximating the belief as a set of weighted particles, and combine it with the powerful approximation capacity of RNNs. PF-RNN approximates the variable and multi-modal belief as a set of weighted latent vectors ${h^1,h^2, ... }$ sampled from the same distribution. Like standard RNNs, PF-RNN follow a model-free approach: PF-RNNs' latent vectors are learned distributed representations, which are not necessarily interpretable. As an alternative to the Gaussian based filters, e.gg., Kalman filters, partivle filtering is a non-parametric approximator that offers a more flexible belief representation (Del Moral 1996); it is also proven to give a tighter evidence lower bound (ELBO) in the data generation domain (Burda, Grosse, and Salakhutdinov 2015). In our case, the approximate representation is trained from data to optimize the prediction performance. For effective training with gradien methods, we employ a fully differntiable particle filter algorithm that maintains the latent belief. See Fig. 1 for a comparison of RNN and PF-RNN.

    We apply the underlying idea of PF-RNN to gated RNNs, which are easy to implement and have shown string performance in many sequence prediction tasks. Specifically, we propose PF-LSTM and PF-GRU, the particle filter extensions of Long Short Term Memory (LSTM) (Hochreiter and Schmidhuber 1997) and Gated Recurrent Unit (GRU) (Cho et al. 2014). PF-LSTM and PF-GRU serves as drop-in replacements for LSTM and GRU, respectively. The aim to learn a better belief representation from the same data, though at a greater computational cost. 

    We evaluate PF-LSTM and PF-GRU on 13 data sets: 3 synthetic dataset for systematic understanding and 10 real-world datasets with different sample sizes for performance comparison. The experiment show that our PF-RNNs outperform the corresponding standard RNNs with a comparable number of parameters. FUrther, the PF-RNNs achieve the best results on almost all datasets when there is no restriction on the number of  model parameters used. 

    순차적인 데이터를 가지고 예측을 하는 것은 머신러닝에서 오래된 도전 과제중 하나이다. 이는 물체 추적이나 음성 인식, 그리고 불확실한 상황에서의 의사 결정 등 여러 분야에 적용 가능성이 많다. 효과적인 예측을 위해서는 입력 시퀀스의 정보를 요약하고 추적하는 "메모리"를 필요로 한다. 그러나 메모리의 상태는 대체로 관측이 불가능함으로, 예측을 위해 입력의 충분 통계량을 포착하는 후행 상태 분포(belief)를 모델링해야 한다. 이러한 belief를 수작업으로 설계하는것은 어렵다. 예를 들어, 단어 시퀀스로 처리되는 뉴스 텍스트를 정치, 교육, 경제 등과 같은 카테고리로 나누는 작업을 고려한다면, 정확한 분류를 위해 belief 표현과 동역학을 설게하는 것은 매우 어렵다. 

     

    최신 시퀀스 예측기는 주로 RNN을 사용하며, 이는 결정론적이고 시간에 읜존하는 잠재 변수 벡터 $h$를 학습해 belief의 근사치를 제공한다. 그러나 실세계의 데이터는 변동이 매우 크고 때로는 다중 모달이다. 이러한 불확실한 실세계 데이터의 복잡성을 처리하고 더 나은 belief 근사치를 얻기 위해 잠재 벡터 h의 길이를 늘리는 방법이 있는데, 이렇게 하면 네트워크 매개변수의 수와 학습에 필요한 데이터의 양을 증가시키게 된다. 

     

    이 연구에서는 잠재 벡터 h의 길이를 늘리지 않고도 belief 근사치를 개선할 수 있는 새로운 RNN 계열인 파티클 필터 순환 신경망(PF-RNN)을 소개한다. 파티클 필터링은 1996년 Del Moral이 발표한 모델 기반의 belief 추적 알고리즘이로, 잘 이해되는 상태의 샘플의 집합으로 belief를 근사한다. PF-RNN은 파티클 필터링에서 가중치가 부여된 입자의 집합으로 belief를 근사하는 아이디어를 차용하고, 이를 RNN의 강력한 근사 능력과 결합한다. PF-RNN은 가중치가 부여된 잠재 벡터 $h^1,h^2,... $의 집합으로 가변적이고 다중 모달인 belief를 근사한다. 

     

    표준 RNN과 마찬가지로, PF-RNN은 모델 비의존적(model-free) 접근 방식을 따른다. PF-RNN의 잠재 벡터는 학습된 분산 표현으로, 반드시 해석 가능한 것은 아니다. 가우시안 기반의 필터의 대안으로 나온 Kalman 필터처럼, 파티클 필터링은 보다 유연한 belief 표현을 제공하는 비모수적(non-parametric) 근사 방법이다. 데이터 생성 도메인에서는 더욱 강력한 증거 하한(evidence lower bound, ELBO)을 제공하는 것으로 알려져 있다. 본 연구의 경우, 근사 표현은 예측 성능을 최적화하도록 데이터에서 학습된다. 그래디언트 기반 방식을 사용해 효과적인 학습을 하기 위해서, 이 연구에서는 잠재 belief를 유지하는 완전 미분 가능한 파티클 필터 알고리즘을 사용하였다. RNN과 PF-RNN의 비교를 위해선 Fig. 1을 참고하길 바란다. 

     

    본 연구는 PF-RNN의 기본 아이디어를 구현이 용이하고 많은 시퀀스 예측 작업에서 강력한 성능을 보여준 게이트 기반 RNN에 적용한다. 특히, 장단기 메모리(LSTM)과 게이트 기반 순환 유닛(GRU)의 파티클 필터링 확장 버전인 PF-LSTM이나 PF-GRU을 제안한다. PF-LSTM과 PF-GRU는 각각 LSTM과 GRU의 대체제 역학을 한다.이들은 동일한 데이터에서 더 나은 belief 표현을 학습하는 것을 목표로 하지만, 더 높은 계산 비용이 소모된다.

     

    PF-LSTM과 PF-GRU를 체계적 이해를 위한 3개의 힙성 데이터셋과 다른 성능 비교를 위한 다양한 샘플 사이즈를 가진 10개의 실세계 데이터셋을 가지고 총 13개의 데이터셋을 평가해 보았다. 실험 결과, PF-RNN은 유사한 매개변수 수를 가진 기존 표준 RNN보다 뛰어난 성능을 보였다. 나아가, 모델 매개변수의 수에 제한이 없을 경우, PF-RNN 은 거의 모든 데이터셋에서 최상의 결과를 달성하였다.

    2. 관련 연구

    더보기

    There are two general categories for prediction with sequential data: model-based and model-free. The model-based approach includes, e.g., the well-known hidden Markov models (HMMs) and the dynamic Bayesian networks (DMNs) (Murphy 2002). They rely on handcrafted state representations with well-defined semantics, e.g., phonemes in speech recognition. Given a model, one may perform belief tracking according to the Bayes' rule. The main difficulty here is the state space and the computational complexity of belief tracking grow exponentially with the number of state dimensions. To cope with this difficulty, particle filters represent the belief as a set of samples states and perform approximate inference. Alternatively, the model-free approach, such as RNNs, approximate the belief as a latent state vector, learned directly from data, and updates it through a deterministic nonlinear function, also learned from data.

    The proposed PF-RNNs, build upon RNNs and combine their powerful data-driven approximation capabilities with the sample-based belief representation and approximate Bayesian inference used in particle filters. Related sample-based methods have been applied to generative models. Importance sampling is used to improve variational auto-encoders (Burda, Grosse, and Salakhutdinov 2015). This is extended to sequence generation (Le et al. 2018) and to reinforcement learning(Igl et al. 2018). Unlike the earlier works that focus on generation, we combine RNNs and particle filtering for sequence prediction. PF-RNNs are trained discriminatively, instead of generatively, with the target loss function on the model output. As a result, PF-RNN training prioritizes target prediction over data generation which may be irrelevant to the prediction task. 

    PF-RNNs, exploit the general idea of embedding algorithmic priors, in this case, filtering algorithms, in neural networks and train them discriminatively (Jonschkowski and Brock 2016; Jonschkpwski, Rastogi, and Brock 2018; Karkus, Hsu, and Lee 2018). Earlier work embeds a particle filter in an RNN for learning belief tracking, but follows a model-based approach and relies on handcrafted belief representation (Jonschkowski, Rastogi, and Brock 2018; Karkus, Hsu, and Lee 2018). PF-RNNs retain the model-free nature of RNNs, and exploit thier powerful approximation capabilities to learn belief representation directly from data. Other work explicitly addresses belief representation learning with RNNs (Gregor and Besse 2018; Guo et al. 2018); however, they do not involve Bayesian belief update or particle filtering. 

    순차 데이터를 가지고 예측하는것에는 모델 기반과 모델이 의존적이지 않은 총 두 가지의 일반적인 범주가 있다. 모델 기반의 접근법은 대표적으로 히든 마르코프 모델(HMM)이나 동적 베이즈 네트워크(DMN)이 있다. 이들은 음성 인식에서의 음소와 같은 잘 정의된 의미론적 상태 표현을 수작업으로 설계하는 방식에 의존한다. 주어진 모델이 있을 때, 베이즈 규칙에 따라 belief 추적을 수행할 수 있다. 여기에서 가장 어려운 것은 상태 공간과 belief 추적의 계산 복합도가 상태 차원의 수에 따라 기하급수적으로 증가한다는 것이다. 이러한 묹[를 해결하기 위해 파티클 필터는 belief를 샘플 상태의 집합으로 나타내고 근사적 추론을 진행한다. 이와 대치되게, RNN과 같은 모델에 의존하지 않는 접근법은 belief를 데이터에서 직접적으로 학습된 잠재 상태 벡터로 근사하며, 데이터에서 학습된 결정론적 비선형 함수를 통해 갱신한다.

     

    이 논문에서 제안하는 PF-RNN은 RNN을 기반으로 하며, 데이터 기반의 강력한 근사 능력을 파티클 필터에서 사용하는 샘플 기반 belief 표현 및 근사 베이즈 추론과 결합한다. 관련 샘플 기반의 방법은 생산 모델에 적용되어져 왔다. 예를 들어, 중요도 샘플링은 변분 오토인코더(VAE)의 성능을 개선하는 데 사용었오며, 이는 시퀀스 생성 및 강화 학습으로 확장되었다. 생산에만 중점을 둔 이전의 연구들과 달리 본 연구에서는 RNN과 파티클 필터링을 결합해 시퀀스 예측에 적용하였다. PF-RNN은 생성적으로가 아는 판벽적으로(discriminatively) 학습되며, 모델의 출력에 대한 목표 손실 함수(target loss function를 기반으로 학습된다. 그 결과, PF-RNN의 학습은 데이터 생성보다 예측 목표에 우선순위를 둔다. 

     

    PF-RNN은 필터링 알고리즘과 같은 알고리즘적 우선순위(algorithmic priots)를 신경망에 내장하고, 이를 판별적으로 학습한다. 이전의 연구에서는 belief 추적 학습을 위해 필터를 RNN에 내장했으나, 이는 모델 기반의 접근법을 따르며 수작업으로 설계된 belief 표현에 의존한다. PF-RNN은 RNN의 모델에 의존하지 않는 특성을 유지하면서, 데이터로부터 belief 표현을 직접 학습할 수 있는 강력한 근사 능력을 이용한다. 다른 연구에서도 RNN을 사용해 belief 표현 학습을 명시적으로 다루었으나, 이들은 베이즈 belief 갱신이나 파티클 필터링을 포함하지 않았다. 

    '논문번역' 카테고리의 다른 글

    Machine Learning for Fluid Mechanics  (2) 2024.11.23