최신 ML 활용하기
A guide to putting recent ML models to work for HCI researchersHCI 연구자를 위한 최신 ML 모델 활용 가이드
Contents목차
- 제목의 의미
- 학교 강의의 한계
- 2016년 이후 달라진 세상
- 성역 없는 침범
- 최신 모델을 실전에 활용하려면 배워야 할 것
- 자연어 처리의 전이 학습에 대하여
- 그래프 데이터에 대하여
- XAI에 대하여
- 할당 문제에 대하여
- 차원 축소와 신경망으로 인코딩한 특징을 시각화에 활용하는 법
- 시계열 데이터 처리에 관해
- What the title means
- The Limits of University Courses
- What Changed in the World After 2016
- Invasion Without Sanctuary
- What to Learn in Order to Exploit
- On Transfer Learning in NLP
- On Graph Data
- On XAI
- On Assignment Problems
- On Dimensionality Reduction and Using Neural-Encoded Features Visually
- On Handling Time-Series Data
제가 졸업한 HCI 연구실에서 최신 머신러닝 모델을 HCI 연구에 응용만 하려 할 때 무엇을 공부해야 하는지 알려 달라는 요청을 받았습니다. 그래서 기본 배경지식과 응용하고 싶은 분야를 묻는 간단한 설문을 먼저 돌린 뒤, 거기에 모인 응답을 토대로 이 안내 글을 썼습니다.
제목의 의미
- Exploiting: 비전공자가 모델을 가져다 쓸 때는 원론적인 이해까지 챙기지 않아도 괜찮다는 뜻입니다.
- Contemporary: 어제 아카이브에 올라온 논문이라도 곧장 써먹을 수 있어야 한다는 의미를 담았습니다.
학교 강의의 한계
학교 수업은 지식을 어느 선까지 가르쳐야 할까요? 학문을 가지가 사방으로 뻗은 나무 한 그루로 떠올려 보면, 모든 가지가 함께 딛고 선 밑동 지식을 가르치는 편이 맞습니다. 그렇다면 머신러닝이라는 나무의 밑동에는 무엇이 놓여 있을까요? 강의를 맡은 분 대부분은 실해석학과 그 응용 분야인 확률론을 꼽을 겁니다. 틀린 말은 아니지만, 그렇게 보면 밑동이 지나치게 아래쪽에 자리 잡습니다(머신러닝 < 통계학 < 확률론 < 실해석학 < 해석학 < 수학). 이제 반대로 머신러닝에서 갈라져 나온 잔가지 쪽으로 시선을 옮겨 봅시다. 가령 수많은 음악 데이터를 바탕으로 새 음악을 만들어 내고, 더 정확히는 샘플링하고 싶다고 해 보지요. 굵직한 단계만 추려 보아도 이 분야의 위계는 대략 음악 생성 < 소리 생성 < 시계열 생성 < 시퀀스 생성 < 생성 모델 < 머신러닝 순으로 이어집니다. 실용적인 응용에 가까운 가지로 올라갈수록 밑동 지식과 거리가 멀어지니, 그 밑동을 빠짐없이 알 필요도 자연스레 없어집니다.
시퀀스 생성이 어째서 생성 모델 아래에 놓이는지부터 보지요. 생성 모델에서 자주 쓰이는 기법만 보아도 계산 불가능한 분포를 쓰느냐 계산 가능한 변분 분포를 쓰느냐로 갈리고, 분포 값을 데이터로 사상할 때도 가역적인 부피 보존 방식을 고르거나 밀도를 보존하지 않는 방식을 택하는 등 갈래가 여럿입니다. 이 가운데 순차 데이터에 잘 맞는 방법과 비순차 데이터에 잘 맞는 방법도 서로 다릅니다. 물론 어느 기법이 어느 세부 과제에 어울리는지는 수많은 경험적 연구가 쌓인 끝에 드러난 사실이지요. 지금 시퀀스 생성 분야에서 대세를 잡은 생성 모델이 Normalizing Flows처럼 대각 가우시안 분포에서 출발하는 부피 보존 사상 모델이라고 가정해 봅시다. 그렇다면 음악이나 소리, 시계열 생성을 응용하려는 사람에게는 사실 Normalizing Flows 하나만 알아도 됩니다. 만약 이런 대세를 거슬러 다른 계열의 생성 모델, 예컨대 GAN처럼 가우시안 분포에서 적대적 손실로 자유 형식 사상을 학습하는 모델을 꺼내 들어 Normalizing Flows의 성능을 넘어서려 한다면(어디까지나 예시일 뿐 실제로는 둘 다 대세입니다. 제가 오디오 처리를 주력으로 삼지 않아 진짜 비주류 기법까지는 모르기 때문에 어쩔 수 없이 이 둘을 들었습니다) 다른 생성 모델들까지 두루 깊이 알아야겠지요. 하지만 거듭 말씀드리듯 지금 시점의 최고 성능 모델을 응용만 하려는 분이라면 굳이 그럴 필요가 없습니다.
생성 모델도 수많은 머신러닝 방법론 가운데(요즘 대세이긴 하지만) 한 갈래에 지나지 않습니다. 그런데 머신러닝이라는 이름을 단 강의를 통째로 듣는다고 해서, 정작 응용하려는 분야와 맞닿는 내용을 얼마나 건질 수 있을까요? 어제 막 나온 최고 성능 모델 논문을 펼쳐 든다고 생각해 보면, 학교 수업에서 배운 내용을 곧바로 가져다 쓸 대목은 거의 없을 겁니다. 여기서 제가 말하는 머신러닝 강의의 대표 격으로 앤드루 응의 강의와 머피의 책을 꼽고 싶습니다. 이런 명강의와 명저를 붙잡고 수십 시간을 파고들어도 어제 나온 최고 성능 논문을 읽고 구현하기는 어렵습니다. 앞서 말씀드렸듯 이런 과정은 기존의 대세를 뛰어넘는 새 아이디어로 논문을 쓰려는 연구자가 다지는 기초로 훌륭할 뿐이지요. 본격적으로 머신러닝을 연구하려면 이런 기초 위에 실해석학과 미분기하학까지 더 익히고, 자신이 파고들 좁은 연구 분야의 굵직한 선행 문헌을 어제 나온 연구까지 두루 꿰고 있어야 합니다.
그렇다면 원론을 파고들기보다 최신 모델을 실전에 활용하려는 사람은 이런 기초 강의 대신 무엇을 들어야 할까요? 불과 4년 전까지만 해도 CS231n 정도만 들으면 최신 연구를 읽고 구현해서 곧바로 써먹는 데 별 무리가 없었지요. 물론 그때에도 CS231n 하나만으로 새 방법론을 내놓을 역량까지 기르기는 어려웠다는 점은 다시 한번 분명히 해 두겠습니다. 그런 흐름 속에서 여러 대학이 CS231n을 본뜬 대학원이나 학부 고학년 대상 머신러닝 응용 과목을 열었고, 지금까지 이어 오고 있습니다. 하지만 아쉽게도 CS231n이 처음 문을 연 2015년 겨울 이후 머신러닝 분야는 2012년부터 2015년 사이보다 훨씬 거세게 발전했는데, 쏟아부은 연구 인력과 자원이 기하급수적으로 불어났으니 당연한 결과이지요. 이제는 CS231n이 주력으로 다루는 컴퓨터 비전 영역에서조차 이 강의 하나만으로 어제 나온 논문을 읽고 구현하기가 버거워졌습니다. 적어도 최근 연구를 반영한 새 강의가 나오기 전까지는 학교 수업의 이런 뚜렷한 한계가 그대로 남습니다.
2016년 이후 달라진 세상
(2021-01-23 수정: 이 절에서 순열 불변성을 설명한 부분을 조금 더 자세히 고쳐 썼습니다.)
2016년 딥마인드가 알파고 리를 선보인 뒤, 구글은 머신러닝 기업으로 거듭날 길을 본격적으로 찾기 시작했습니다. 머신러닝 기업이 남들과 다른 독점 경쟁력을 확보하려면 무엇을 손에 쥐어야 할까요? 요즘 머신러닝 학계에서는 동료 연구자들이 논문의 재현성을 두고 무척 거세게 압박하며, 논문에 쓴 데이터와 소스 코드를 온전히 공개하라고 요구합니다. 기업 처지에서는 “이 분야에서 아무리 1등을 해 봐야 기껏 만든 훌륭한 모델을 세상에 다 풀어야 한다면 어떡하지?” 하는 고민에 빠질 수밖에 없었을 겁니다. 여기서 가장 손쉬운 해법은 학술용 데이터셋과 별도로 사내 데이터셋을 따로 구축하는 일입니다. 누구나 떠올릴 만한 발상이고, 이미 데이터 자본(주의)이라는 이름으로 널리 알려진 전략이기도 하지요. 실제로 구글과 페이스북은 각자 운영 중인 거대한 데이터 파이프라인으로 JFT-300M이나 Instagram-1B 같은 비공개 데이터셋을 쌓아 올렸습니다. 물론 학계에 논문을 낼 때는 ImageNet처럼 비교적 작은 학술 데이터셋에서 거둔 성능 수치를 주요 결과로 반드시 함께 싣습니다.
이제 이 데이터 자본을 밑천 삼아 남들이 넘볼 수 없는 강력한 모델을 만들어 낼 차례입니다. 바로 이 대목에서 기업들은 커다란 걸림돌 하나를 치워야겠다고 느낍니다. 다름 아닌 합성곱과 순환 구조이지요. 혹시 아직도 이 두 구조가 딥러닝을 떠받치는 기둥이라고 생각하시나요? 안타깝게도 이제는 그렇지 않습니다. 두 구조는 자본이 넉넉하지 않은 연구자에게 반가운 장점을 갖추고 있는데, 데이터 효율적이라는 점입니다. 말 그대로 데이터가 적어도 다른 모델보다 과적합이 덜 일어난다는 뜻이지요. 이런 성질은 데이터의 특성에 맞는 사람의 귀납 편향을 모델에 심어 줄 때 생겨납니다. 가령 합성곱은 ‘공간적으로 가까운 값끼리는 서로 연관되어 있다’는 가정을 품고 있는데, 실제로 이미지 데이터의 성질과 꽤 잘 맞아떨어지지 않나요? (2021-02-08 수정: 이 아래로 귀납 편향을 설명한 내용에 틀린 부분이 있어 지금 옳다고 여기는 방향으로 다시 썼습니다. 순열 가변성과 불변성에 관한 대목은 글의 흐름상 불필요하다고 판단해 지웠습니다.)
Relational inductive biases, deep learning, and graph networks 논문은 이런 관계형 귀납 편향을 체계적으로 분류하고, 자주 쓰이는 네 가지 신경망 층인 완전 연결, 합성곱, 순환, 그래프 구조가 각기 어떤 귀납 편향을 갖는지 예로 보여 줍니다. 입력 데이터를 일렬로 펼쳐 길이 L과 채널 C로 이루어진 (L, C) 모양으로 만든다고 할 때, 이 논문이 다루는 관계형 귀납 편향은 결국 L개의 C차원 벡터 사이에 어떤 연결 편향을 두느냐의 문제이지요. 앞서 짚었듯 합성곱은 공간적으로 가까운, 곧 국소적인 벡터들 사이에 양방향 연결을 두고, 순환 구조는 국소적인 벡터들 사이에 단방향 연결을 둡니다. 반면 완전 연결 구조는 아무런 연결도 맺지 않아 귀납 편향이 없다고 보며, 그래프 구조는 모든 벡터 쌍을 양방향으로 잇는 만큼 가장 강한 귀납 편향이 걸려 있다고 볼 수 있습니다.
이 논문은 The interaction of nature and nurture in development: A parallel distributed processing perspective를 인용하며 귀납 편향이 높을수록 과적합을 막아 준다고 설명합니다. 뒤집어 보면 귀납 편향을 줄일수록 과적합 위험은 커지는 대신 빠르게 수렴하는 모델을 얻을 수 있지요. 합성곱과 순환 구조가 데이터 효율을 챙길 수 있었던 것도 이 상충 관계 속에서 귀납 편향을 적당한 선으로 맞춘 덕분입니다. 완전 연결 구조와 그래프 구조 사이에는 합성곱이나 순환 말고도 사람이 특정 분야의 성질에 맞춰 손수 설계한 귀납 편향이 얼마든지 자리할 수 있는데, 실제로 지난 여러 해 동안 이처럼 ‘모델 구조에 귀납 편향을 어떻게 녹여 낼까’를 다루는 연구가 딥러닝 연구의 한 주축을 이루어 왔습니다.
하지만 막대한 데이터를 거머쥔 기업에는 최고 수준의 정규화가 필요해집니다. 결국 모든 벡터를 서로 잇는 임의 연결성 귀납 편향을 넣은 모델을 고를 수밖에 없지요. 그렇게 나온 모델이 바로 2017년 NIPS에서 발표된 Attention Is All You Need의 트랜스포머입니다. 트랜스포머는 그래프 신경망과 동치 관계에 놓여 있으며, 모든 벡터 사이의 연결 자체가 귀납 편향으로 들어가 있습니다.
글의 이 절을 사이트가 그린 도식입니다. 층마다 잇는 모양은 이 절의 문장을 따랐고, 이웃은 바로 옆 벡터 하나로 그렸습니다.
귀납 편향이 높은 모델을 학습시키려면 방대한 데이터가 필요합니다. 그만큼 데이터 효율이 낮다는 뜻이지요. 실제로 “Attention Is All You Need” 논문에서도 데이터가 적을 때는 기존 순환 구조 방법론과 비슷하거나 오히려 못한 성적을 냈습니다. 많은 이들이 논문의 숫자만 보고 “Attention Is All You Need라더니 성능은 그냥 RNN이랑 별 차이가 없네”라고 여기던 2018년 상반기, 앨런 AI가 그해 2월에 LSTM 구조를 토대로 ELMo라 불리는 Deep contextualized word representations 논문을 발표했습니다. 이 ELMo 덕분에 사전 학습과 미세 조정 파이프라인이 학계에 성공적으로 뿌리내렸고, 뒤이어 2018년 4월에는 GLUE 벤치마크인 GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding도 세상에 나왔지요. 이 논문에서 기준 모델로 들어간 ELMo 역시 뛰어난 성적을 거두면서 사전 학습과 미세 조정 파이프라인의 성능이 다시 한번 입증되었습니다.
사전 학습과 미세 조정 파이프라인에서는 사전 학습 단계에 각 하위 과제보다 훨씬 많은 데이터를 쏟아부어야 하는데, 데이터 효율이 좋은 LSTM은 이런 방식에 썩 어울리지 않았습니다. 얼마 지나지 않은 2018년 10월, 그 유명한 BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding, 곧 BERT가 나오면서 이제는 정말 “attention is all you need”가 맞다는 사실을 모두가 실감하게 되었지요. 물론 “if you have data to fit them all”이라는 단서는 숨겨진 채로 말입니다. 데이터 자본과 컴퓨팅 자본의 맛을 본 기업들은 그 뒤로 데이터 효율이 높은 모델을 적극적으로 연구하지 않고 있습니다. 엄청난 데이터와 거대한 트랜스포머로 사전 학습을 마친 모델을 작은 하위 과제에 미세 조정해 놓고는 ‘데이터 효율적’이라고 주장하는 눈속임 연구만 빼고요. 2015년 겨울 CS231n이 나온 뒤로 벌어진 일들이 바로 이렇습니다.
성역 없는 침범
BERT 이후 2019년은 자연어 처리 분야에서 그야말로 숙청의 해였습니다. 기존 방법론이 모조리 사라지고 그 자리를 사전 학습한 트랜스포머가 차지했지요. 정교한 언어학적 구문 분석 트리를 구조적 편향으로 심어 놓은 모델마저 많은 데이터로 사전 학습한 트랜스포머 앞에서는 초라한 성적밖에 내지 못했습니다. 자연어 처리 판도가 정리된 뒤에는 2019년 말부터 2020년 초 사이 이미지 분야에서도 언어 모델링처럼 데이터만 주어지면 그 안에서 구조를 끌어내 지도 신호로 삼는 자기 지도 학습 연구가 활발해졌습니다. 2019년 11월 나온 Momentum Contrast for Unsupervised Visual Representation Learning, 곧 MoCo와 2020년 2월 발표된 A Simple Framework for Contrastive Learning of Visual Representations, 곧 SimCLR이 대표적이지요. 두 모델 모두 ELMo가 선보인 사전 학습과 미세 조정 방식을 이미지 영역으로 옮겨 적용하는 데 목표를 두었습니다. 예컨대 MoCo는 페이스북의 독점 데이터셋인 Instagram-1B의 이미지 10억 장을 레이블 없이 학습한 CNN 가중치를 그대로 R-CNN의 백본으로 가져다 쓰면, ImageNet을 레이블과 함께 학습한 CNN보다 객체 탐지 같은 하위 과제에서 오히려 더 높은 성능을 낼 수 있다는 점을 보여 주었습니다.
그렇다면 막대한 데이터를 쥔 기업 처지에서는 모델 구조에서도 합성곱이 설 자리를 없애는 쪽이 자연스러운 수순일 겁니다. 2020년 5월 발표된 End-to-End Object Detection with Transformers, 곧 DETR은 탐지와 영역 분할에서 트랜스포머가 R-CNN 구조보다 뛰어난 성능을 낼 수 있다는 점을 입증했습니다. 이어 2020년 10월 나온 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale, 곧 ViT는 픽셀에서 특징에 이르는 인코더 자리까지, 줄곧 CNN이 독점해 오던 영역을 마침내 트랜스포머로 대체하며 더 나은 성능까지 거두었지요. 2021년 1월 현재 이미지 분야에는 아직 GLUE 같은 대표 벤치마크 데이터셋이 자리 잡지 못했습니다. 하지만 머지않아 ViT 구조로 초대형 데이터셋에서 자기 지도 학습으로 사전 학습을 마친 뒤, BERT처럼 탐지나 분할용 헤드를 얹어 모든 과제를 압도하는 모델이 등장하고, 이를 수치로 증명해 보일 벤치마크까지 함께 나오리라는 건 불을 보듯 뻔한 일입니다.
최신 모델을 실전에 활용하려면 배워야 할 것
기업들이 데이터는 여전히 공개하지 않으면서도 사전 학습 가중치만큼은 풀어 준다는 점은 참 다행입니다. 다만 그 와중에도 가장 크고 성능이 뛰어난 모델의 가중치는 공개하지 않는 쪽이 어느새 관행처럼 굳어 가고 있습니다. 물론 그만한 가중치는 일반적인 연산 가속기로 돌리기 꽤 버겁기도 하지만요. 그리고 앞서 말씀드렸듯 지금의 최고 성능 모델은 사람이 복잡하고 정교한 귀납 편향을 녹여 넣은 구조가 아닙니다. 그저 거대한 트랜스포머를 해당 과제에 맞춰 미세 조정한 결과물이지요. 설령 지금 당장 목표로 삼은 응용 분야에서 다른 개별 모델이 주류를 이루고 있더라도, 제 생각에는 2023년 안으로 트랜스포머로 대체될 가능성이 매우 높습니다.
이런 흐름을 두고 모델의 다양성이 사라진다고 볼 수도 있습니다. 하지만 널리 인용되는 미첼의 머신러닝 학습 정의, 곧 ‘프로그램이 과제 T에 대해 경험 E를 써서 계량값 P로 측정한 성능을 높여 가는 것을 학습이라 한다’에서도 드러나듯, 학습의 관점에서 모델 구조는 어디까지나 부차적인 요소일 뿐이지요. 어떤 경우에도 데이터를 소화할 수 있을 만큼 모델의 표현 용량만 넉넉하면 문제될 게 없습니다. 결국 본질은 과제 T와 경험 데이터 E, 평가 지표에 해당하는 계량값 P를 더 타당하게 정의하고 개선하는 데 있으며, 모델 자체는 트랜스포머로 충분하다는 뜻입니다.
그렇다면 실제로 공부해야 할 내용은 아래 다섯 가지로 추려 볼 수 있습니다.
- 연산 가속기를 다루는 방법
- CS231n 같은 강의: 앞에서 대략 훑은 2016년부터 2020년까지의 흐름보다는 앞선 시기이지만, 앤드루 응이나 머피의 강의가 다루는 내용보다 뒤에 나온 지식을 익혀 둘 필요가 있습니다.
- 위에서 제가 짚어 드린 논문들과 그 바탕이 되는 배경지식
- 내가 응용하려는 분야의 과제 이름과 그 과제를 학습시키는 목적 함수의 구조, 그리고 대표적인 학술용 데이터셋과 평가 지표
- 빅테크 기업들이 내가 응용하려는 분야에 이미 트랜스포머를 적용했는가, 또 적용했다면 그 모델의 가중치가 공개되어 있는가
앞의 세 가지는 누구나 공통으로 익혀야 할 몫이고, 뒤의 두 가지는 각자 세부 분야에 맞춰 공부해야 할 부분입니다. 1번인 연산 가속기를 다루는 방법에는 딱히 정해진 정답이 없습니다. 직접 부딪히며 몸으로 익히거나 PyTorch Lightning 같은 도구가 구현 부담을 덜어 주기를 바랄 수밖에요. 4번은 아래에서 대략적인 길잡이를 드리겠지만, Papers With Code를 살펴보는 동시에 해당 분야의 서베이 논문을 읽고 출발하시기를 강력히 권합니다. 또 5번의 경우 가중치가 공개되어 있지 않다면 사전 학습부터 직접 돌려야 하는 난관에 부딪히게 되지요. 학술용 데이터셋이라 해도 기업 밖에서 사전 학습을 감당하기는 몹시 어려우니, 가중치가 공개된 분야 쪽으로 방향을 트시기를 추천해 드립니다.
자연어 처리의 전이 학습에 대하여
앞서 말씀드렸듯 예전에는 ImageNet 분류처럼 그 자체로 뜻이 분명한 과제에서 학습한 모델을 가져와 전이 학습을 적용했습니다. 반면 이제는 레이블 없는 방대한 데이터를, 단독으로는 별 의미가 없는 자기 지도 과제로 먼저 학습한 뒤 전이해 쓰는 모델들이 압도적인 성능을 보여 줍니다. 앞서 언급한 논문들에 더해 구글이 전이 학습을 한층 더 깊이 탐구한 T5 논문 Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer와 그 배경 연구도 함께 읽어 보시기를 추천합니다. 허깅페이스의 사전 학습 가중치와 라이브러리 코드도 익혀 두시면 좋겠습니다.
그래프 데이터에 대하여
그래프는 요즘 널리 주목받는 주제이지만 막상 실전에 응용하기는 만만치 않습니다. 우선 GNN이 트랜스포머와 어느 정도 동치 관계라는 점부터 알고 넘어가시면 좋겠습니다. 메시지 전달이나 다중 홉 같은 그래프 분야 특유의 용어도 트랜스포머 안에서 흔히 이뤄지는 연산과 크게 다르지 않습니다. GNN을 응용하려면 그 연구 커뮤니티에서 쓰는 용어의 쓰임새를 정확히 익힌 뒤, 인코딩하려는 데이터가 그래프 구조 자체인지, 노드인지, 간선인지, 아니면 이들의 조합인지부터 분명히 구분해야 합니다. 먼저 이 서베이 논문을 읽고 시작해 보시기를 권합니다.
XAI에 대하여
XAI는 매우 방대한 영역을 다루며, 학계 안에서도 아직 하나로 모인 합의가 없습니다. 2017년 HCI 연구실과 국보연이 함께한 산학 연구에서 저와 연구실 구성원들이 자료를 정리할 때는 스샤 류의 논문을 따라 머신러닝 모델 시각화 방법론을 ‘점 기반’과 ‘네트워크 기반’으로 나누었습니다. 그 뒤로는 시각화를 넘어 훨씬 다양한 방식으로 모델을 분석할 수 있게 되었고, 오늘날에는 이러한 접근법을 모두 통틀어 XAI라고 부릅니다.
해석 가능성과 설명 가능성의 차이를 놓고도 여러 의견이 엇갈릴 뿐 정립된 기준은 없습니다. 저는 해석 가능성이 인과성과 거의 같은 의미라고 봅니다. 모델이 추론할 때 어느 부분이 출력의 원인이 되었는지 사람이 가려낼 수 있는 정도가 바로 해석 가능성입니다. 반면 설명 가능성은 모델의 추론 결과에 대한 설명을 사람이나 모델 스스로 만들어 내는 일을 뜻합니다. 해석 가능성이 모델 내부 값을 있는 그대로 드러내어 원인의 신뢰도를 사람이 직접 따져 보게 한다면, 설명 가능성은 이를테면 “내가 본 이미지가 멋져서요” 같은 설명을 내놓더라도 사람이 그 말에 수긍하기만 하면 설명 가능하다고 보는 식입니다. XAI가 설명하는 방식 가운데 하나로 인과적 해석을 제시할 수도 있으니 두 개념 사이에 교집합은 생기지만, 어느 한쪽이 다른 쪽의 부분집합은 아니라고 생각합니다. 어디까지나 제 개인적인 견해입니다. 요즘 학계에서는 두 개념을 굳이 나누지 않고 “explainable and interpretable”처럼 한데 묶어 쓰는 흐름이 대세이기는 합니다. 다만 서베이 논문 Opportunities and Challenges in Explainable Artificial Intelligence (XAI): A Survey에서는 저와 거의 비슷하게 정의했습니다.
개인적으로는 시각화 기법 자체가 XAI 안에서 제 역할을 다하는 사례를 아직 보지 못해 아쉽습니다. 예를 들어 인스턴스 기반 XAI 기법인 Grad-CAM을 쓸 때 결과를 무지개 히트맵으로 보여 주는 방식이 지금 대세입니다. 정작 시각화를 전공한 우리 입장에서는 그리 좋지 않은 표현이라는 점을 잘 아는데도, 어떤 시각화를 써야 사람들이 인과성을 더 잘 느끼는지 따져 본 연구는 아직 없습니다. 우리 연구실의 전공을 살려 도전해 보기에 참 좋은 주제가 아닐까요?
할당 문제에 대하여
할당 문제에는 다중 에이전트 강화 학습으로 접근할 수도 있지만, 최적 수송을 적용하는 편이 훨씬 효과적이고 실제로도 널리 쓰입니다. 싱크혼 알고리즘의 저자인 마르코 쿠투리가 2018년에 쓴 교재 Computational Optimal Transport의 앞부분을 읽어 보시면 어떻게 활용할지 감이 잡히실 겁니다. 최적 수송은 모든 연산을 미분할 수 있어 최근 딥러닝과도 잘 어우러지며, 할당할 특징을 신경망으로 뽑아냈다면 인코더까지 동시에 학습시킬 수 있습니다.
차원 축소와 신경망으로 인코딩한 특징을 시각화에 활용하는 법
차원 축소는 이름만 들으면 단순해 보이지만 실제로는 여러 과제가 함께 들어 있습니다. 예를 들어 ResNet으로 이미지를 분류할 때 224x224x3 크기의 이미지를 2048차원 벡터로 인코딩하니 차원이 줄었다고 볼 수도 있겠지만, 보통 이런 인코딩을 차원 축소라고 부르지는 않습니다. 그렇다면 2048차원 대신 3차원 벡터로 인코딩해 보면 어떨까요? 이미지 분류용 특징은 의미상 비슷한 이미지끼리 특징 공간에서도 가까이 모이는 경향이 있으니, 이쪽은 차원 축소의 취지에 맞습니다. 하지만 3차원 벡터를 쓰면 이미지 분류에 필요한 랭크보다 차원이 모자라 분류 과제 자체가 제대로 학습되지 않고, 결국 그 특징마저 의미를 잃습니다. 따라서 원시 데이터의 차원을 줄이려면 먼저 데이터를 특정 특징으로 변환해 주는 학습된 인코더가 있어야 하고, 그 특징을 저차원으로 옮겨 주는 임베딩이 따로 필요합니다.
응용할 때는 다음 두 가지를 함께 고민해 보셨으면 합니다.
- 데이터를 n차원 특징으로 인코딩할 때 어떤 인코더를 쓸 것인가?
- 뽑아낸 특징을 그대로 쓸 수 있는 상황인가, 아니면 꼭 2차원이나 3차원으로 줄여야 하는가?
분류 과제로 얻은 특징은 서로 어느 정도 가까울 거라고 기대할 수는 있지만 거리가 확실히 보장되지는 않습니다. 반면 특징 사이의 거리를 직접 보장해 주는 학습법도 있는데, 바로 심층 거리 학습입니다. DML은 클래스 레이블 대신 데이터 사이의 유사도를 바탕으로 인코더를 학습시킵니다. 이때 유사도 정보를 지도 신호로 직접 넣어 주어야 하는데, 자기 자신하고만 가깝다는 식으로 신호를 주면 레이블 없이도 자기 지도 학습을 구성할 수 있습니다. 다만 앞서 말씀드렸듯 이 경우 데이터가 적으면 학습이 불가능합니다.
DML로 얻은 특징은 분류 과제에서 나온 특징보다 훨씬 깔끔하게, 가까운 것끼리는 가까이, 먼 것끼리는 멀리 떨어지도록 인코딩됩니다. 어떤 인코더를 쓸지는 자유롭게 정할 수 있습니다. 연구가 주로 이미지를 다루다 보니 흔히 CNN을 쓰지만, 그래프 구조를 인코딩할 때는 GNN을, 텍스트를 인코딩할 때는 RNN을 쓰면 되고, 트랜스포머가 자리 잡은 영역이라면 트랜스포머를 쓰면 됩니다.
DML 관련 논문과 구현 코드는 이 저장소를 참고해 보세요. 이 저장소에 담긴 과제는 대부분 시각 임베딩을 얻으려는 것이지만, 언어나 다른 모달리티 분야에서도 DML 기법을 대조 학습이라는 이름으로 흔히 볼 수 있습니다. 예를 들어 문장 임베딩 논문 Improving Multilingual Sentence Embedding using Bi-directional Dual Encoder with Additive Margin Softmax는 본문에 DML을 언급하지 않으면서도, 얼굴 이미지 DML 논문 Additive margin softmax for face verification을 주요 문헌으로 인용합니다.
또 추출한 특징을 곧바로 시각적 마크로 삼아 시각적 부호화하는 방식이 언제나 정답은 아닐 수 있습니다. 데이터 포인트가 가진 여러 정보 가운데 GPS처럼 공간적 의미가 더 뚜렷한 정보가 있다면, 공간 배치용 마크는 그 정보에 맡기고 신경망으로 뽑아낸 특징은 세부 정보 같은 다른 층위에서 활용하는 쪽을 생각해 보시는 건 어떨까요?
시계열 데이터 처리에 관해
시계열 데이터는 시퀀스 데이터에 속합니다. 시계열의 두드러진 성질은 단조 증가하는 독립변수 t의 값이 연속적이고, 데이터마다 t의 간격이 일정하지 않다는 점입니다. 2012년 이후 본격화된 딥러닝 시대에 들어 이런 불규칙 샘플링 시계열을 그대로 다루는 일은 극히 최근까지도 불가능하다고 여겨졌고, 많은 경우 데이터를 보간해 자연어 문장처럼 간격이 균일한 데이터를 처리하는 모델에 넣곤 했습니다. 변수 t가 개입된 데이터를 효과적으로 다루는 기법은 2018년에야 논문으로 나왔는데, 바로 t를 모델 자체에 내재시키는 방식입니다. 아주 간단히 설명하자면 기존 신경망의 층 깊이가 N 같은 자연수였다면, 그 깊이를 연속적인 시간 자체로 활용합니다.
현재 최고 성능 모델들은 모두 이런 Neural ODEs, 더 넓게는 Deep Implicit Layers 구조를 따르며, 벡터 연구소에서 관련 연구를 활발히 이어 가는 중입니다. 대표 논문으로는 Neural Ordinary Differential Equations, Dissecting Neural ODEs, Latent ODEs for Irregularly-Sampled Time Series가 있습니다. Neural ODE를 인코더로 활용한 ODE-RNN 구현 코드는 이 저장소에서 살펴보세요.
This is a guideline I wrote after the HCI lab I graduated from asked me what they would need to learn if they only wanted to apply recent ML models to HCI research. I first sent around a questionnaire asking about their basic background and the areas they want to apply ML to, and then wrote this based on the responses.
What the title means
- Exploiting: it carries the meaning that, as a non-specialist, you can skip the fundamental understanding of ML models when you use them.
- Contemporary: it carries the meaning that you should be able to exploit even a paper that was posted to arXiv yesterday.
The Limits of University Courses
Where should we draw the line on what a university course can cover? If we think of a discipline as a tree with many branches, the right thing for a course to cover is the knowledge at the trunk, which all the branches share. What is the trunk that all the branches of machine learning share? Most lecturers would agree that it is real analysis and its application, probability theory. That is true, of course, but it is too much of a trunk (machine learning < statistics < probability theory < real analysis < analysis < mathematics). Now look at the opposite end, the specific fields that are branches of machine learning. Say you want to generate new music (more precisely, to sample it) from a large amount of music data. Naming only the important parts, the hierarchy of this field is probably: music generation < sound generation < time-series generation < sequence generation < generative models < machine learning. The more applied a branch is, the further it sits from the knowledge at the trunk, and the less you need to know all of that trunk knowledge.
For example, why is sequence generation < generative models? Even if we only look at the commonly used kinds of generative models, there are many approaches: methods that use a non-tractable distribution, methods that use a tractable variational distribution, and, in how the values of that distribution are mapped to data, invertible methods (volume-preserving) and methods that do not preserve density. Among these, some methods fit sequential data well and others fit non-sequential data well. Of course, which method suits which specific task is something we know only because many empirical studies have been done. Suppose the generative model that currently dominates sequence generation is a volume-preserving mapping from a diagonal gaussian distribution (e.g., normalizing flows). Then anyone who wants to apply music generation, sound generation, or time-series generation only needs to know normalizing flows. If you go against that mainstream (I gave these two only as examples, and both are mainstream. I write two because I do not work mainly on audio processing, so I do not know the truly minor approaches outside the mainstream and cannot list them) and try to beat the performance of normalizing flows with another type of generative model, for example a free-form mapping from a gaussian distribution; learning the mapping via an adversarial loss (e.g., GANs), you would need to know the other generative models well too. But someone who only wants to apply the current SoTA does not need to know them, as I said again.
Generative models are, after all, only one of the many machine learning methodologies (a dominant one, but still one). So even if we take an entire course called machine learning, how much of it can overlap with the part we want to apply? When you read a SoTA model that came out just yesterday, there will hardly be any part where you use what you learned in a university course as it is. As representatives of the courses called machine learning I mean, I would like to take Andrew Ng’s course and Murphy’s book as examples. Even if you spend dozens of hours studying such famous courses and books, you will not be able to read and implement a SoTA paper that came out yesterday. As I said above, such courses are only excellent as a foundation course for researchers who will go beyond the mainstream and write new papers with new ideas. To do machine learning research, you need to build such foundations (and beyond them, up to real analysis and differential geometry), and you also need to know the literature of the major studies, up to yesterday, that make up the narrow area you want to research.
Then, since we are going to EXPLOIT, what should we take other than such courses? Until four years ago, something like CS231n was enough to read and implement (that is, to exploit) recent research without much trouble. Of course, even back then, CS231n alone was hard to build the knowledge to propose a new methodology with; I say this again. Because that was so, many universities opened graduate-level or upper-undergraduate applied machine learning courses modeled on CS231n, and they are still running. Unfortunately, though, since CS231n was first offered in Winter 2015, machine learning has seen greater progress than in 2012 to 2015, which is natural because the amount of research manpower and resources going into it has grown exponentially. Now this course alone is no longer enough to read and implement a paper from yesterday, even in computer vision, the area CS231n focuses on. This is the limit of university courses, at least until courses that reflect recent research come out.
What Changed in the World After 2016
(Edited 2021-01-23: the content on permutation invariance in this section was revised in more detail.)
After DeepMind’s AlphaGo Lee in 2016, Google began to seriously pursue a transition into a machine learning company. What exclusivity can a machine learning company have? The machine learning academic community currently puts enormous peer pressure on the reproducibility of papers. That is, it demands full disclosure of the data and source code used in a paper. They must then have wondered: “Even if we come first in this field, we end up sharing our excellent model with the world, so what do we do?” The simplest idea is to build an in-house dataset separate from the academic datasets. Anyone can think of it, and it is a method many people already know under the keyword data capital(ism). In fact, Google and Facebook each built private datasets such as JFT-300M and Instagram-1B through the huge data pipelines they own. Of course, when they publish a paper to the academic community, they necessarily attach reports on (small) academic datasets such as ImageNet as the main results.
Next they must build a truly exclusive and powerful model with this data capital. At this point, companies feel that one big obstacle has to be removed: convolution and recurrence. Do you perhaps think these two structures are the pillars that support deep learning? Unfortunately, they no longer are. These two structures have a trait that is good (for those with small capital): they are data efficient. Literally, this means they overfit less than other models even with little data. This trait is obtained by injecting into the model a human inductive bias that suits the nature of the data reasonably well. For example, convolution assumes things like “values that are spatially close are related to each other”; this does match the nature of image data to some extent, doesn’t it? (Edited 2021-02-08: below this point I had described inductive bias incorrectly, so I rewrote it in the direction I now think is correct. I deleted the content about permutation (in)variance because I judged it unnecessary for the argument.)
The paper Relational inductive biases, deep learning, and graph networks organizes a classification of such (relational) inductive biases (IB). As examples, it shows what IB each of four frequently used NN layers has: FC, Convolutional, Recurrent, and Graph. If we flatten the shape of the input data into (L (length), C (channel)), the relational IB that this paper deals with is about what bias is injected into the relations among the L C-dim vectors. As I said earlier, convolution creates bidirectional links among spatially close = local vectors, and recurrent creates unidirectional links among local vectors. FC creates no links at all, so it is interpreted as having no IB. Graph creates bidirectional links among all vectors, so we can say it has the highest IB applied.
The paper cites The interaction of nature and nurture in development: A parallel distributed processing perspective to say that a high IB prevents overfitting. Thinking the other way around, though, if you inject less IB, you can obtain a model that is more likely to overfit and that converges quickly. The convolution and recurrence structures found a good balance of IB injection in this trade-off and so could be data efficient. Between FC and graph, besides convolution and recurrent, there can also be IBs that people design by hand to fit a domain very well. In fact, for several years, this kind of research on “how about melting the IB into the model structure” has been a mainstay of deep learning research.
But a company with an enormous amount of data needs the highest level of regularization, and in the end it has no choice but to pick a model injected with the arbitrary-connectivity IB, where all vectors are connected to all others. The resulting model is the Transformer of Attention Is All You Need, presented at NIPS 2017. The Transformer and the Graph NN are equivalent, and the connections among all vectors are injected as the IB.
A diagram the site drew from this section. How each layer links the vectors follows this section's sentences; each neighbor is drawn as the single adjacent vector.
Fitting a model with a high IB requires a large amount of data. In other words, it is not data efficient. In fact, even in “Attention is All You Need,” when the amount of data is small, it performs on par with or worse than the existing recurrent methodologies. In the first half of 2018, the public looked only at the numerical results of the paper and thought, “They said attention is all you need, but the performance is not much different from an RNN.” In February 2018, Allen AI released the paper Deep contextualized word representations (ELMo), built on an LSTM structure. ELMo successfully presented the pretrain-finetune pipeline to the academic community, and right after that, in April 2018, GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding, the GLUE benchmark, was released. ELMo, used as a baseline in that paper, again showed outstanding performance and proved the performance of the pretrain-finetune pipeline once more.
The pretrain-finetune pipeline required consuming far more data in the pretraining stage than in each downstream task, which did not suit the data-efficient LSTM well. Soon after, in October 2018, the famous BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding, BERT, was released, and the public finally learned that it really is “attention is all you need.” The condition “if you have data to fit them all” stayed hidden, though. Companies that have tasted data capital and computing capital have not actively researched data efficient models since then. I leave out the deceptive studies that finetune a model pretrained with an enormous amount of data and a big transformer on a small downstream dataset and then call it data efficient. This is what has happened since CS231n came out in the winter of 2015.
Invasion Without Sanctuary
After BERT, 2019 was the year of the purge in NLP. All the methodologies were wiped out, and the pretrained transformer took their place. Even a model given a very elaborate linguistic parse tree as a structural bias could only deliver a shabby performance in front of a transformer pretrained on a lot of data. Once NLP was sorted out, in late 2019 to early 2020, research on applying Self-supervised Learning to images became active. Like Language Modeling, it extracts structure from the data alone, as long as data is given, and uses it as supervision. Representative examples are Momentum Contrast for Unsupervised Visual Representation Learning (MoCo) in November 2019 and A Simple Framework for Contrastive Learning of Visual Representations (SimCLR) in February 2020, and these models aim to apply the pretrain-finetune method that ELMo presented to images as well. For example, MoCo shows that if you use only the images, without labels, of Instagram-1B, Facebook’s proprietary dataset of one billion images, and use that CNN’s weights as is as the backbone of an R-CNN, you can reach higher performance on downstream tasks such as object detection than a CNN trained on ImageNet with labels.
Then, for a company with a large-scale dataset, removing the place where convolution stands in the structure too would be a natural next step. In May 2020, End-to-End Object Detection with Transformers, DETR, showed that a transformer can deliver better performance than the R-CNN structure in detection and segmentation. In October 2020, An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale, ViT, finally showed that a transformer can replace the encoder from pixel to feature that CNNs had monopolized, and deliver better performance. As of January 2021, there is still no “representative” benchmark set like GLUE for images. But it is as clear as day that soon there will be a model that is pretrained (in a self-supervised way) on a very large dataset with the ViT structure, gets heads attached like BERT (for detection, segmentation, and so on), and overwhelms every task, together with a benchmark set that shows it numerically.
What to Learn in Order to Exploit
It is a great relief that companies still release their pretrained weights even though they do not release their data. Even so, it is becoming the norm in the meantime not to release the weights of the best and biggest model among them. Of course, those weights are quite hard to run on ordinary accelerators. And as I said earlier, the SoTA models of today are simply big transformers finetuned for the task at hand, with no complex or elaborate human inductive bias melted in. Even if an individual model dominates the application area you are aiming for right now, in my opinion it will very likely be replaced by transformers within 2023.
You could see this as a loss of model diversity. But look at Mitchell’s frequently cited definition of machine learning: “a program is said to learn when its performance at task T, as measured by performance measure P, improves with experience E.” In terms of learning, the structure of the model is only a secondary element, and it is fine as long as the capacity is large enough to fit any case. In other words, what matters is the improvement and the more valid definition of the task T, the experience (data) E, and the performance measure (metric) P, and the model can simply be a transformer.
Then what we need to know can be boiled down to the following five things.
- How to handle compute accelerators
- A course like CS231n: you need an understanding of content that comes before the 2016 to 2020 history I roughly outlined above, but is still later than what Andrew Ng’s or Murphy’s courses cover.
- The papers I have pointed out above, and the background they mention
- The names of the tasks in the area I want to apply ML to, the structure of the objective function for training on that task, and the representative academic datasets and evaluation metrics
- Have big tech companies applied transformers to the area I want to apply ML to? If so, are the weights of that model public?
The first three are what everyone must learn in common, and the last two are what each person must learn to fit their own specific area. For number 1, how to handle compute accelerators, there is no particular right answer. All you can do is learn by running into problems, or hope that add-ons like Pytorch Lightning reduce the engineering demands. For number 4, I will give a rough guide below, but I strongly recommend referring to papers with code while also starting from a survey paper of that area. For number 5, if the weights are not public, you have the problem of having to run pretraining yourself. Even with an academic dataset it is very hard to do that outside a company, so I recommend turning toward the area where they are public.
On Transfer Learning in NLP
As I said earlier, in the past the form was to transfer a model trained on a meaningful task (for example, ImageNet classification). Now, models trained on a huge amount of unlabeled data with a task that has no specific meaning (self-supervision) and then transferred perform far better. In addition to the papers mentioned above, I recommend reading Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer, T5, which covers Google’s further research on transfer learning, together with its background. I also recommend understanding Huggingface’s pretrained weights and library code.
On Graph Data
Graph is a hot topic, but it is not so easy an area to apply in practice. First, I would like you to know up front that GNNs are, to some extent, equivalent to transformers. Graph-specific terms such as message passing or multi-hop are also not much different from operations commonly done in transformers. If you want to apply a GNN, you need to know well how the terms of that community are used, and work out whether the data you want to encode is a graph structure, a node, an edge, or a combination of them. I recommend starting by reading this survey paper.
On XAI
XAI covers a very wide area. There is also no unified opinion. In the material that I and the lab members wrote for the 2017 industry-academia project between the HCI lab and the National Security Research Institute, we divided visualization methodologies for machine learning models into “point-based” and “network-based” (following Shixia Liu’s paper). Since then, it has become possible to analyze models in more diverse ways beyond visualization, and today the collective name for all these methods is XAI.
Interpretability vs Explainability: there are various opinions on the difference between the two terms, and there is no unified opinion. My opinion is that Interpretability means almost the same as causality. Interpretability is the degree to which a human can find out which part of a model’s inference is the cause of the output. Explainability, on the other hand, means that a human or the model itself produces an explanation of the output of the model’s inference. Interpretability exposes the model’s values as they are and lets a human judge how reliable the cause is. With explainability, the generated explanation says “because the image I saw was beautiful,” and if the human is satisfied with that explanation, it can be considered explainable. Since XAI can also present a causal interpretation as its way of explaining, I think the two concepts form an intersection, and neither is a subset of the other. This is my opinion. In the current academic community, the mainstream is to describe them together without much distinction, as in “explainable and interpretable.” Still, the survey paper Opportunities and Challenges in Explainable Artificial Intelligence (XAI): A Survey gives a definition almost the same as mine.
Personally, I regret that I do not think there is yet a case where a visualization technique itself has been applied precisely to XAI. For example, when an instance-based XAI technique like Grad-CAM is applied, the mainstream is to show the visualization as a rainbow heatmap (which we, as VIS majors, know is not good), and there is no research on which way of showing it makes people feel causality better. Wouldn’t this be a good topic to try, using our lab’s specialty?
On Assignment Problems
Approaches to assignment problems are also possible with multi-agent reinforcement learning, but optimal transport (OT) is a much more effective and widely used method. If you read the early part of Computational Optimal Transport, a textbook written in 2018 by Marco Cuturi, the author of the Sinkhorn algorithm, you will probably get a picture of how to use it. Since all the operations in OT are differentiable, it also combines well with recent deep learning, and if the features you want to assign are obtained with a neural network, you should be able to train the encoder at the same time.
On Dimensionality Reduction and Using Neural-Encoded Features Visually
Dimensionality reduction, though the name says dimensionality reduction, contains several tasks at once. For example, when you classify an image with a ResNet, you encode a 224x224x3 image into a 2048 vector, so you could say the dimension was reduced, but when we speak of dimensionality reduction we do not mean this kind of encoding. Then what if you encode into a 3-dimensional vector instead of the 2048 vector? Features for image classification tend to be encoded so that semantically close images have close features, so this fits the meaning of dimensionality reduction. However, if you use a 3-dimensional vector as the feature, it has fewer ranks than image classification needs, so the model cannot learn the classification task well, and in the end the feature loses its meaning too. Therefore, to reduce the dimension of raw data, an encoder that encodes the data into specific features must be ready in a trained state, and you need an embedding that pulls those features down to a low dimension.
For applications, I would like you to think about the following two things.
- Which encoder will you use to encode the data into n-dimensional features?
- Is it a situation where you can use those features as they are? Do you have to reduce them to 2 or 3 dimensions?
For the features obtained from a classification task, you can expect them to be somewhat close, but there is no guarantee. There is, however, a learning method that guarantees the distances between features. It is called Deep Metric Learning (DML). DML trains the encoder using the similarity between data points, without using the class labels. And we have to supply that similarity as supervision. By giving supervision such as close only to itself, you can form self-supervision without labels. But as I said above, in this case learning is impossible if the data is small.
Features obtained through DML are encoded much more neatly than classification features, with things that are close kept close and things that are far kept far. The encoder you use is up to you. Since research is mostly done on images, a CNN is commonly used, but if you want to encode a graph structure you can use a GNN, and if you want to encode text you can use an RNN; or in an area where transformers exist, you can use a transformer.
For DML papers and implementation code, see this repo. Most tasks in this repo aim to obtain visual embeddings, but in language and other modalities, DML methods are commonly found under the name contrastive learning. For example, the sentence embedding paper Improving Multilingual Sentence Embedding using Bi-directional Dual Encoder with Additive Margin Softmax does not mention DML, but it cites the face image DML paper Additive margin softmax for face verification as an important reference.
Also, encoding the features directly with visual marks may not be the right answer. If a data point has information that is more spatially meaningful among the many pieces of information it carries (e.g., GPS), how about giving the spatially encoded mark to that information and considering using the features obtained from the neural network at another level (detail and so on)?
On Handling Time-Series Data
Time series is a part of sequence data. Its characteristics are that the value of the monotonically increasing independent variable t is continuous, and that the intervals of t between data points are not equivalent. In the deep learning era (2012 onward), handling this irregularly-sampled time series directly was considered impossible until very recently, and in many cases the data was interpolated and processed with a model that handles regularly-sampled data (for example, natural language sentences). A way to handle data involving t effectively was published as a paper only in 2018, and that method embeds t inside the model. (Put very simply, if the layer depth of an existing neural network was a natural number like N, this is a method that uses that depth as time, and does so continuously.)
All of the current SoTA models take the structure of this kind of model = Neural ODEs (more broadly, Deep Implicit Layers), and the Vector Institute is actively doing research on it. Representative papers are the following: Neural Ordinary Differential Equations, Dissecting Neural ODEs, and Latent ODEs for Irregularly-Sampled Time Series. For the code of ODE-RNN, an encoder that uses Neural ODE, see this repo.
Comments댓글