<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Jaekyeong-J.log</title>
        <link>https://velog.io/</link>
        <description>Ph.D. candidate in Data Science</description>
        <lastBuildDate>Sun, 02 Feb 2025 05:02:58 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>Jaekyeong-J.log</title>
            <url>https://velog.velcdn.com/images/jaekyeong-j/profile/44c9a571-cb91-4e4b-aa68-16e9012665aa/image.jpg</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. Jaekyeong-J.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/jaekyeong-j" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[Legendre memory units: Continuous-time representation in recurrent neural networks]]></title>
            <link>https://velog.io/@jaekyeong-j/1.-Legendre-memory-units-Continuous-time-representation-in-recurrent-neural-networks</link>
            <guid>https://velog.io/@jaekyeong-j/1.-Legendre-memory-units-Continuous-time-representation-in-recurrent-neural-networks</guid>
            <pubDate>Sun, 02 Feb 2025 05:02:58 GMT</pubDate>
            <description><![CDATA[<hr>
<ul>
<li><strong>Reference paper :</strong> <a href="https://proceedings.neurips.cc/paper_files/paper/2019/file/952285b9b7e7a1be5aa7849f32ffff05-Paper.pdf">proceedings.neurips.cc/paper_files/paper/2019/Paper.pdf</a></li>
</ul>
<hr>
<h1 id="1-why">1. WHY?</h1>
<p>시퀀스 데이터에 대해 이전 정보를 기억하는 RNN, LSTM, GRU는 데이터를 순차적으로 처리해야 해서 병렬화가 어려움</p>
<p>이상적인 모델 구조의 발전 방향은 CNN과 같이 병렬화 연산이 가능한 구조, RNN과 같이 상태 추론 과정을 통한 장기 기억 정보 처리가 가능한 구조여야 함</p>
<p><strong>이전 정보를 기억하면서 병렬로 처리하고 싶다!</strong></p>
<h1 id="2-what">2. WHAT?</h1>
<p>LMU는 딜레이 구조(Delay network)를 사용해 과거 정보를 효율적으로 유지하려고 함</p>
<p>딜레이 구조는 입력 신호 $u(t)$의 과거 값  $u(t-\theta)$를 활용해 현재와 미래의 연산을 도움</p>
<p>하지만 딜레이 구조를 직접 사용하려면  $G(s) = e^{-\theta s}$처럼 무한 차원의 시스템을 계산해야 하며, 이는 계산이 불가능하거나 너무 비효율적이라 근사가 필요함</p>
<p><strong>LMU는 딜레이 구조를 LTI 시스템으로 근사해서 문제를 해결!</strong></p>
<ul>
<li>LTI 시스템은 유한 차원이라 계산이 효율적</li>
<li>행렬 A, B, C, D로 딜레이 시스템을 표현하면 딥러닝 모델과도 자연스럽게 연동 가능</li>
</ul>
<h1 id="3-how">3. HOW?</h1>
<h3 id="1-memory-cell-dynamics">1) Memory cell dynamics</h3>
<ul>
<li>LMU는 입력 신호 $u(t)$의 시간 이력을 기억하고 이를 선형적인 방식으로 다루기 위해 설계된 메모리 셀</li>
<li>입력 신호는 일정한 윈도우 크기 $\theta$로 나누어지고 legendre polynomial을 기반으로 상태 벡터 $m(t)$를 계산함</li>
</ul>
<h3 id="2-무한차원딜레이-시스템-→-유한차원선형-시스템">2) 무한차원(딜레이 시스템) → 유한차원(선형 시스템)</h3>
<ul>
<li>$F(s)=e^{−θs}$는 시간 지연(delay)을 나타내는 transfer function</li>
<li>시간 영역에서 보면 입력 $u(t)$가 출력 $y(t)$에 영향을 미치기까지 $\theta$만큼의 지연이 발생한다는 뜻</li>
<li><em>(즉, 출력 $y(t)$가 현재 입력 $u(t)$가 아닌 과거 입력 $u(t-\theta)$의 영향을 받는다는 뜻)*</em><ul>
<li>$y(t)=u(t−θ)$</li>
</ul>
</li>
<li>딜레이 시스템은 무한 차원이라 근사가 어려우므로 유한 차원 d-차원의 미분 방정식으로 근사 필요</li>
<li><strong>상태 벡터 $m(t) \in \mathbb{R}^d$를 사용해 딜레이 시스템 근사</strong><ul>
<li>$\dot{m}(t) = A m(t) + B u(t)$</li>
<li>$m(t)$: 입력 신호 $u(t)$의 시간적 연속성을 직접 저장하는 상태 벡터 … <strong>시간적으로 연속된 특징을 직접 표현하는 주요 메모리 공간</strong></li>
<li>A, B: 딜레이 시스템을 유한 차원으로 근사하기 위해 정의된 행렬 … <strong>변환 규칙</strong></li>
</ul>
</li>
</ul>
<h3 id="3--상태-벡터-mt"><strong>3)  상태 벡터 $m(t)$</strong></h3>
<ul>
<li><strong>Shifted Legendre Polynomial</strong></li>
<li>상태 벡터 $m(t)$는 입력 신호  $u(t)$의 시간적으로 연속된 상태를 표현하며, 과거 신호의 중요한 특징들을 Legendre 다항식의 직교 기저(orthogonal basis) 계수로 압축<ul>
<li>$u(t - \theta&#39;) \approx \sum_{i=0}^{d-1} P_i\left(\frac{\theta&#39;}{\theta}\right) m_i(t)$</li>
<li>$P_i(r)$는 i-차 Legendre 다항식</li>
<li>$m_i(t)$는 각 Legendre 다항식의 계수로서, 입력 신호의 시간적 패턴을 나타냄</li>
</ul>
</li>
</ul>
<p><strong><strong><strong><strong><strong>*****</strong></strong></strong></strong></strong>왜  $\theta&#39;$을 근사하는가!<strong><strong><strong><strong><strong><strong>**</strong></strong></strong></strong></strong></strong></p>
<p>$y(t) = u(t-\theta)$를 근사하려고 할때  $\theta$는 고정된 딜레이를 의미</p>
<p>LMU는 $\theta$ 길이($[t-\theta, t]$)의 전체 구간에서 입력 신호의 다양한 시점 정보를 처리하려고 함!</p>
<p> $\theta&#39;$ 는 고정 된 $\theta$ 길이 내에서의 상대적인 딜레이 위치를 나타냄</p>
<ul>
<li>$\theta&#39;$ = 0: 현재 시점 t</li>
<li>$\theta&#39;$ = $\theta$: 가장 오래된 시점  $t-\theta$</li>
<li>$\theta&#39; \in [0, \theta]$: 현재에서 과거 사이의 특정 시점을 의미</li>
</ul>
<hr>
<h3 id="4-행렬-a와-b"><strong>4) 행렬 A와 B</strong></h3>
<ul>
<li>행렬 A와 B는 입력 신호 $u(t)$의 시간적 연속성을 ‘반영’하는 변환 규칙으로 상태 벡터 $m(t)$가 시간적으로 어떻게 변화하는지 정의<ul>
<li>$A_{i,j} =
\begin{cases}
\frac{2i + 1}{\theta} (-1)^{j-i+1}, &amp; \text{if } i \geq j \
\frac{2i + 1}{\theta}, &amp; \text{if } i &lt; j
\end{cases}B_i = \frac{2i + 1}{\theta} (-1)^i$</li>
<li>A: 이전 상태 $m(t)$가 다음 상태 $m(t+\Delta t)$로 어떻게 전이되는지 나타냄</li>
<li>B: 입력 신호 $u(t)$가 상태 $m(t)$에 미치는 영향을 나타냄</li>
</ul>
</li>
</ul>
<h3 id="5-이산화-discretization"><strong>5) 이산화 (Discretization)</strong></h3>
<ul>
<li>실제 계산에서 연속적인 미분 방정식 대신 이산화(discretized)된 형태 사용<ul>
<li>$m_{t+1} = \tilde{A} m_t + \tilde{B} u_t$</li>
<li>$\tilde{A}, \tilde{B}$는 A,B를 이산화한 행렬</li>
</ul>
</li>
</ul>
]]></description>
        </item>
    </channel>
</rss>