大規模データセットでの推論に便利なSVIの概要をまとめました.
SVIは確率的最適化の枠組みで行う変分ベイズ法です.
随時更新してます.
参考文献
[1]Matthew D Hoffman, David M Blei, Chong Wang, and John Paisley. Stochastic variational inference. The Journal of Machine Learning Research, Vol. 14, No. 1, pp. 1303–1347, 2013.
[2] 佐藤一誠. トピックモデルによる統計的意味解析. コロナ社, 2015.
Succinct Data Structure for Analyzing Document CollectionPreferred Networks
Invited talk at the workshop ALSIP2011. The topic includes, Rank/Select data structure, and its implementation, wavelet trees and its applications, suffix arrays, suffix trees, Burrows Wheeler's Transform, FM-index, Top-k document query.
園田翔氏の博士論文を解説しました。
Integral Representation Theory of Deep Neural Networks
深層学習を数学的に定式化して解釈します。
3行でいうと、
ーニューラルネットワーク—(連続化)→双対リッジレット変換
ー双対リッジレット変換=輸送写像
ー輸送写像でNeural Networkを定式化し、解釈する。
目次
ー深層ニューラルネットワークの数学的定式化
ーリッジレット変換について
ー輸送写像について
大規模データセットでの推論に便利なSVIの概要をまとめました.
SVIは確率的最適化の枠組みで行う変分ベイズ法です.
随時更新してます.
参考文献
[1]Matthew D Hoffman, David M Blei, Chong Wang, and John Paisley. Stochastic variational inference. The Journal of Machine Learning Research, Vol. 14, No. 1, pp. 1303–1347, 2013.
[2] 佐藤一誠. トピックモデルによる統計的意味解析. コロナ社, 2015.
Succinct Data Structure for Analyzing Document CollectionPreferred Networks
Invited talk at the workshop ALSIP2011. The topic includes, Rank/Select data structure, and its implementation, wavelet trees and its applications, suffix arrays, suffix trees, Burrows Wheeler's Transform, FM-index, Top-k document query.
園田翔氏の博士論文を解説しました。
Integral Representation Theory of Deep Neural Networks
深層学習を数学的に定式化して解釈します。
3行でいうと、
ーニューラルネットワーク—(連続化)→双対リッジレット変換
ー双対リッジレット変換=輸送写像
ー輸送写像でNeural Networkを定式化し、解釈する。
目次
ー深層ニューラルネットワークの数学的定式化
ーリッジレット変換について
ー輸送写像について
Python과 Tensorflow를 활용한 AI Chatbot 개발 및 실무 적용Susang Kim
도입
AI Chatbot 소개
Chatbot Ecosystem
Closed vs Open Domain
Rule Based vs AI
Chat IF Flow and Story Slot
AI기반의 학습을 위한 Data 구성 방법
Data를 구하는 법 / Train을 위한 Word Representation
Data의 구성 / Data Augmentation(Intent, NER)
자연어처리 위한 AI 적용 방안
Intent (Char-CNN) / QnA (Seq2Seq)
Named Entity Recognition (Bi-LSTM CRF) / Ontology (Graph DB)
Chatbot Service를 위한 Architecture 구성
Chatbot Architecture
NLP Architecture
Web Service Architecture
Bot builder / Chatbot API
Test Codes for Chatbot
실무에서 발생하는 문제와 해결 Tips
Ensemble and voting / Trigger / Synonym(N-Gram)
Tone Generator / Parallel processing / Response Speed
마무리
[설명 코드]
Text Augmentation / Slot Bot / QA Bot / Graph DB / Response Generator
DeBERTA : Decoding-Enhanced BERT with Disentangled Attentiontaeseon ryu
오늘 소개해 드릴 논문은 구글의 BERT와 페이스북 현재 메타의 RoBERTa를 기반으로 만들어진 모델입니다. RoBERTa + Disentangled Attention과 enhanced mask decode
두가지의 핵심 기술로 RoBERTa를 더욱 개선 시킨 모델이라고 이해하시면 될 것 같습니다. 추가적으로 Scale Invariant Fine Tuning을 도입하여 RoBERTa를 상당히 많은 테스크에서, NLU 테스크에서는 RoBERTa, BERT이상의 성능을 보여준 논문이기도 합니다.
논문의 자세한 리뷰부터, 백그라운드 지식까지, 자연어처리팀 진명훈님이 도와주셨습니다.
머신러닝 및 데이터 과학 연구자를 위한 python 기반 컨테이너 분산처리 플랫폼 설계 및 개발Jeongkyu Shin
머신러닝 및 데이터 과학 분야의 컴퓨팅 수요는 해가 갈수록 급증하고 있습니다. 이와 더불어 분산처리 기술, 데이터 파이프라이닝 및 개발 환경 스택 관리 등의 관련된 다양한 이슈들 또한 엄청나게 늘어나고 있습니다. 머신러닝 모델의 기하급수적인 모델 복잡도 증가 추세와 마찬가지로, 모델 학습을 위한 환경 관리 또한 갈수록 복잡도가 높아지는 추세입니다.
이 세션에서는 이러한 문제를 해결하기 위해 python 언어 기반의 분산처리 스케쥴링/오케스트레이션 미들웨어 플랫폼을 개발한 4년간의 과정에서 겪은 다양한 문제들에 대해 다룹니다. 2015년 컨테이너 기반의 고밀도 분산처리 플랫폼 설계 및 프로토타이핑 과정을 PyCon KR에서 발표한 이후, 실제 구현 및 오픈소스화, 안정화를 거치며 겪은 다양한 기술적/비기술적 문제들에 대한 경험을 공유합니다.
기술적으로는 최근 몇 년 간의 클러스터 플랫폼 관련 기술의 진보와 함께 탄생한 다양한 도구들과, 이러한 도구들을 python 기반으로 엮어내기 위해 사용하고 개발한 다양한 오픈소스들을 다룹니다. Python 기반의 컨테이너 스케쥴링 및 오케스트레이션 과정의 구현과, 다양한 프로그래밍 언어로 만든 SDK를 graphQL을 이용하여 연동하는 과정에서의 몇몇 유의점을 설명합니다. 아울러 python 기반의 SDK를 다양한 언어로 포팅했던 경험을 간단하게 안내합니다.
플랫폼을 개발하는 중 등장한 TensorFlow, PyTorch 등의 다양한 머신러닝 프레임워크들을 도입하며 겪은 문제와 해결 과정에 대해서도 나눕니다. 연구 분야에는 Python 2.7 기반의 프레임워크들이 여전히 많습니다. 이러한 프레임워크 및 라이브러리의 지원을 위하여 Python 2 기반의 프레임워크와 Python 3.7로 구현한 컨테이너 인터페이스를 단일 컨테이너 환경에 중복 빌드 및 상호 간섭 없이 공존시키기 위해 개발한 아이디어를 소개합니다.
마지막으로 Python 기반의 프레임워크를 개발, 배포 및 상용화 하는 과정에서 겪은 다양한 어려움을 소개합니다. 솔루션을 배포 및 보급할 때 겪는 다양한 런타임, 하드웨어 환경 및 개인 정보 보호를 위한 폐쇄망 대상의 디플로이 등에 대응하기 위하여 Python 응용프로그램을 단독 실행용으로 패키징하는 과정에서 겪은 팁들을 설명합니다. 또한 GUI 빌드 및 Python, Go 및 C++을 함께 사용한 드라이버 가상화 레이어 개발 등의 내용도 살짝 다룹니다.
이 슬라이드는 PyCon KR 2019의 발표 슬라이드입니다. ( https://www.pycon.kr/program/talk-detail?id=138 )
5. Presenter!
Musical Word Embedding: Bridging the Gap between Listening Contexts and Music
Seungheon Doh, Jongpil Lee, Tae Hong Park, and Juhan Nam
Machine Learning for Media Discovery Workshop, International Conference on Machine Learning (ICML), 2020
8. 발표의 중점!
• 전반적인 Audio Deep Learning Task를 알아봅니다.
• 위 Task들을 푸는데 도움을 주는 Torchaudio 모듈을 알아봅니다.
• 구체적인 논문 리뷰는 다루지 않습니다.
9. Audio Deep Learning Task?
• Sound
• Sound Classification & Auto-tagging
(Acoustic Scene / Event Identification)
• Speech
• Speech Recognition (ASR, STT)
• Speech Synthesis (TTS)
• Speech Style Transfer (STS)
Sound, Speech, Music
• Music
• Music Generation
• Source Separation
• Singing Voice Synthesis
• Instruments Transcription
• Music Classification. Auto-tagging
• Music Recommendation…
10. Audio Deep Learning Task?
• Sound
• Speech Classification
- Activation
• Speech
• Speech Recognition (STT)
- Input User Interface
• Speech Synthesis (TTS)
- Output of Interaction
With Smart Speaker!
11. Audio Deep Learning Task?
Speech Application?
https://www.youtube.com/watch?v=klnfWhPGPRs&ab_channel=naverd2
https://www.youtube.com/watch?v=aqoXFCCTfm4&ab_channel=Apple
12. Audio Deep Learning Task?
Music Application?
Dhariwal, Prafulla, et al. "Jukebox: A generative model for music.” ICLR 2020
Juheon Lee, Hyeong-Seok Choi, et al, “Adversarially Trained End-to-end Korean Singing Voice Synthesis System”,
in Proceedings of Interspeech, 2019, Best Student Paper Award
14. Audio Deep Learning Task?
Music Auto-tagging
Nam, Juhan, et al. "Deep learning for audio-based music classification and tagging: Teaching computers to
distinguish rock from bach." IEEE signal processing magazine 2018
Data Loader
WavLabel
Cross Entropy Loss
Loss
Input Feature
Label Score
Label
Model
15. Audio Deep Learning Task?
Speech Recognition
Data Loader
WavText
Attention!
Cross Entropy Loss
Loss
Input Feature
Label Score Greedy Decoder
Edit-Distance
오늘 날씨가 어때?
CER
Label
Listen, Attend and Spell
https://arxiv.org/abs/1508.01211
https://github.com/clovaai/ClovaCall/tree/master/las.pytorch
16. Audio Deep Learning Task?
Speech Synthesis
Data Loader
WavText
Mel Loss
Loss
Input Feature
Decoder
Mel Output
Encoder & Attention
Mel
Post Net
Linear Output
Linear Loss
Tacotron: Towards End-to-End Speech Synthesis:
https://arxiv.org/abs/1703.10135
https://github.com/r9y9/tacotron_pytorch
17. Audio Deep Learning Task?
Source Separation
Music Source Separation in the Waveform Domain
https://github.com/facebookresearch/demucs
Data Loader
Wav
Reconstruction Loss
Loss
Mixed Audio
Separate Audio
Label
Model
Wav Wav
18. Audio Input?
Auto-tagging
Data Loader
WavLabel
Cross Entropy Loss
Loss
Input Feature
Label Score
bel
Model
Speech Recognition
Data Loader
WavText
Attention!
Cross Entropy Loss
Loss
Input Feature
Label Score Greedy Decoder
Edit-Distance
오늘 날씨가 어때?
CER
Label
Speech Synthesis
Data Loader
WavText
Mel Loss
Loss
Input Feature
Decoder
Mel Output
Encoder & Attention
Mel
Post Net
Linear Outpu
Linear Loss
19. Audio Input?
Auto-tagging
Data Loader
WavLabel
Cross Entropy Loss
Loss
Input Feature
Label Score
bel
Model
Speech Recognition
Data Loader
WavText
Attention!
Cross Entropy Loss
Loss
Input Feature
Label Score Greedy Decoder
Edit-Distance
오늘 날씨가 어때?
CER
Label
Speech Synthesis
Data Loader
WavText
Mel Loss
Loss
Input Feature
Decoder
Mel Output
Encoder & Attention
Mel
Post Net
Linear Outpu
Linear LossWaveform or Spectrogram!
Sampling Rate STFT
24. torchaudio.load
I/O Functionality
sox : Default, 16-bit signed integer외 에는
에러가 발생할때가 있음
sox_io : Recommended, 그러나 윈도우에는 적용이 안됨…
Soundfile : PySoundFile을 별도로 설치해 주셔야 사용이
가능합니다.
25. torchaudio.load, torchaudio.save
I/O Functionality
Data load and Save 시
train-clean-100/19/198/19-198-0001.flac - 225 kB
성능은 비슷하다…
Save 시 sox_io 가 좀더 좋은 퍼포먼스를 보이는듯!
0
0.001
0.002
0.003
0.004
0.005
0.006
0.007
loader_mean saver_mean
sox sox_io soundfile
27. torchaudio.transform
Auto-tagging
Data Loader
WavLabel
Cross Entropy Loss
Loss
Input Feature
Label Score
bel
Model
Speech Recognition
Data Loader
WavText
Attention!
Cross Entropy Loss
Loss
Input Feature
Label Score Greedy Decoder
Edit-Distance
오늘 날씨가 어때?
CER
Label
Speech Synthesis
Data Loader
WavText
Mel Loss
Loss
Input Feature
DecoderEncoder & Attention Post Net
Linear Los
Mel
Mel Output
Linear Outp
35. torchaudio.transform
Transform
Resampling
Sample Rate가 그렇게 중요하지 않을 때 연산 효율성을
위해서 활용합니다. 음성의 경우 SR이 8000만 되도
인지적으로 구분이 가능합니다.
mu-law encoding
사람의 귀는 소리의 amplitude에 대해 log적으로
반응합니다. 작은값에는 높은 분별력(high resolution)을,
큰값끼리는 낮은 분별력(low resolution)을 갖도록
합니다.
36. torchaudio.Dataset
Dataset
All datasets are subclasses of torch.utils.data.Dataset i.e, they have __getitem__ and __len__ methods implemented. Hence, they
can all be passed to a torch.utils.data.DataLoader which can load multiple samples parallelly using torch.multiprocessing workers
52. CPU vs GPU
https://github.com/KinWaiCheuk/nnAudio
K. W. Cheuk, H. Anderson, K. Agres and D. Herremans,
"nnAudio: An on-the-fly GPU Audio to Spectrogram Conversion Toolbox Using 1D Convolutional Neural Networks," in IEEE Access, doi: 10.1109/ACCESS.2020.3019084.
55. Take Home message
• Torchaudio 는 tensor 연산을 지원한다는 점에서 좋다! 언제든 GPU로 보낼수 있음!, .to(device)
• Best Practice는 자신의 CPU, GPU 리소스에 따라서 다르지만
1080ti 이상의 스펙이라면 waveform 이후 STFT등 연산은 GPU에서 하는게 더 좋은 것 같다.
(조금 더 찾아보면 GPU로 바로 dataload도 가능하다)
• 물론 하드에 저장공간 많으면 feature를 npy로 가지고 있으면 편하게 실험이 가능하다.
하지만 hparams 별 feature를 뽑을 실험 설계를 할 정도의 리소스가 있을 것인가!
Encoder로서 음성 신호를 high level feature
Listener는 BLSTM을 Pyramidal 형식으로 3개를 붙여서 사용하고 있다.
Speller는 Decoder로서, attention-based LSTM 변환기 역할을 맡고 있다
입력 음성에 대해 알맞는 sequence의 log probability를 maximize한다
음성 데이터 input은 Mel-Spectrogram을 사용하여 number of mel을 40으로 주고 10ms마다 features들을 뽑았다 (40 dimensional log-mel filter bank).
CBHG는 Convolution Bank + Highway + GRU
먼저 디코더의 출력인 Mel-Spectrogram 출력과 타겟 Mel-Spectrogram과의 L1 Distance를 구한다.
Linear-Spectrogram 출력과 타겟 Linear-Spectrogram과의 L1 Distance를 구한다. 마찬가지로 Linear-Loss로 정의한다
입력 텍스트 및 타겟 오디오를 전처리하여 Mel-Spectrogram과 Linear-Spectrogram을 준비해놔야 한다
For the reconstruction loss L(gs(x; θ), xs) in equation 1,
we either use the average mean square error or average absolute error between waveforms:
for a waveform xs containing T samples and corresponding to source s, a predicted waveform xˆs and denoting with a subscript t the t-th sample of a waveform, we use one of L1 or L2:
Create a Dataset for LibriSpeech. Each item is a tuple of the form:
waveform,
sample_rate,
utterance,
speaker_id, chapter_id, utterance_id