Alexandre Devaux coded an experiment that extract people from photo using deep learning and make them appear as holograms: https://twitter.com/AlexandreDevaux/status/1234460583552049152
완벽하진 않지만, 처음 공부하시는 분들께 조금이나마 도움이 되셨으면 하는 바람으로 공유드립니다.
주된 내용은 David Sliver의 reinforcement learning (http://www0.cs.ucl.ac.uk/staff/d.silver/web/Teaching.html)과 팡요랩(https://www.youtube.com/watch?v=wYgyiCEkwC8&list=PLpRS2w0xWHTcTZyyX8LMmtbcMXpd3s4TU)에서 해주신 것에 필요하다고 생각된 부분은 Sutton 교수님의 Reinforcement learning 교재를 바탕으로 정리해보았습니다.(너무나 잘 설명해주셔서 감사합니다 !)
Deep Learningis clearly a field that has seen crazy advancements in the past couple of years. These advancements have been made possible by the amazing projects in this area. The need forData ScientistsandAI Engineersare high in demand and this surge is due to the large amount of data we collect. So, in this article, I’ll discuss some of the top Deep Learning Projects.
Lung cancer has long been one of the most difficult forms of the disease to diagnose. With doctors using their eyes for detection, the nodules are harder to spot and as a result, the cancer is eitherdetected too lateor not detected at all. The nodule can have a variety of looks, and it takes doctorsyears to knowall the different looks.
12 Sigmauses deep learning to train an AI algorithm that would help doctors analyze CT scan images more efficiently. They train the models on GPU-powered neuralnetworks that run50 times fasterthan those running CPUs. Hospitals using the Model can get results inunder 10 minwhich saves at least 4-5 hours of Doctor’s work.
Detectron is Facebook AI Research’s software system that implements state-of-the-artObject Detectionalgorithms. It is written in Python and powered by the Caffe2 deep learning framework. You can detect every object in a video and that too live.
The goal of Detectron is to provide a high-quality, high-performance codebase for object detection research. It is designed to be flexible in order to support rapidimplementation and evaluation of novel research. It contains more than50 Pre-trained models. It’s an amazing Deep Learning Project.
Deep Learning is also doing major advancements in audio processing and it’s not just generating music or classification. WaveGlow is a Flow-based Generative Network for Speech Synthesis byNVIDIA.
AI & Deep Learning with TensorFlow
Instructor-led Sessions
Real-life Case Studies
Assignments
Lifetime Access
Explore Curriculum
WaveGlow combines insights from Glow and WaveNet in order to provide fast, efficient and high-quality audio synthesis, without the need for auto-regression. WaveGlow is implemented using only asingle network, trained using only asingle cost function: maximizing the likelihood of the training data, which makes thetraining procedure simple and stable.
Google Brain has devised some new software that can create detailed images from tiny, pixelated source images. Google’s software, in short, basically means the “zoom in… now enhance!” TV trope is actually possible. First, take a look at the image on the right.
The left column contains the pixelated8×8 source images, and the center column shows the images that Google Brain’s software was able to create from those source images. For comparison, the real images are shown in the right column. As you can see, the software seemingly extracts an amazing amount of detail from just64source pixels. It’s ana amazing Deep Learning Project.
No challenge today is more important than creating beneficialArtificial General Intelligence(AGI), with broad capabilities at the human level and ultimately beyond. OpenCog is a project that aims to build an open-source artificial intelligence framework.
The human brain consists of a host of subsystems carrying out particular tasks: some more specialized, some more general in nature. The OpenCog design aims tocapture the spirit of the brain’s architecture and dynamics without imitating the details.Sophiathe great AI Bot is one of the first of it’s kind to possess the traits of AGI.
A longstanding goal in character animation is to combine data-driven specification of behavior with a system that can execute a similar behavior in a physical simulation, thus enabling realistic responses to perturbations and environmental variation.
DeepMimic is an example-GuidedDeep Reinforcement Learningof Physics-Based Character Skills. The reinforcement learning (RL) methods can be adapted to learn robust control policies capable of imitating a broad range of example motion clips, while also learning complex recoveries, adapting to changes in morphology, andaccomplishing user-specified goals.
Imagine you have ahalf imageof a scene and you wanted the full scenery, well that’s what image outpainting can do that for you. This project is aKerasimplementation of Stanford’s Image Outpainting paper. The model was trained with 3500 scrapped beach data with argumentation totaling up to 10500 images for 25 epochs.
This is an amazing paper with a detailedstep by stepexplanation. A must-try example for all the Deep Learning Enthusiasts. Personally, this is my favorite DeepLearning project.
Watson is an IBM supercomputer that combines Artificial Intelligence (AI) and sophisticated analytical software for optimal performance as a “question answering” machine. The supercomputer is named for IBM’s founder, Thomas J. Watson. It is the open, multi-cloud platform that lets you automate the AI life cycle.
AI & Deep Learning with TensorFlow
Weekday / Weekend BatchesSee Batch Details
Applications for Watson’s underlying cognitive computing technology are almost endless. Because the device can perform text mining and complex analytics on huge volumes of unstructured data, it can support a search engine or an expert system with capabilities far superior to any previously existing.
The possibility of IBM Watson is endless. It works in major areas like:
Healthcare
Analytics
ChatterBot
Teaching Assistants
With this, we come to an end of this Deep Learning Projects article. I hope these projects are enough to get you started on Deep Learning Projects, check out theAI and Deep Learning With Tensorflowby Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. This Certification Training is curated by industry professionals as per the industry requirements & demands. You will master the concepts such as SoftMax function, Autoencoder Neural Networks, Restricted Boltzmann Machine (RBM) and work with libraries like Keras & TFLearn.
Machine Learning From Scratch. Bare bones NumPy implementations of machine learning models and algorithms with a focus on accessibility. Aims to cover everything from linear regression to deep learning.
Machine Learning From Scratch
About
Python implementations of some of the fundamental Machine Learning models and algorithms from scratch.
The purpose of this project is not to produce as optimized and computationally efficient algorithms as possible but rather to present the inner workings of them in a transparent and accessible way.
Figure: Classification of the digit dataset by a neural network which has been evolutionary evolved.
Genetic Algorithm
$ python mlfromscratch/examples/genetic_algorithm.py +--------+ | GA | +--------+ Description: Implementation of a Genetic Algorithm which aims to produce the user specified target string. This implementation calculates each candidate's fitness based on the alphabetical distance between the candidate and the target. A candidate is selected as a parent with probabilities proportional to the candidate's fitness. Reproduction is implemented as a single-point crossover between pairs of parents. Mutation is done by randomly assigning new characters with uniform probability. Parameters ---------- Target String: 'Genetic Algorithm' Population Size: 100 Mutation Rate: 0.05 [0 Closest Candidate: 'CJqlJguPlqzvpoJmb', Fitness: 0.00] [1 Closest Candidate: 'MCxZxdr nlfiwwGEk', Fitness: 0.01] [2 Closest Candidate: 'MCxZxdm nlfiwwGcx', Fitness: 0.01] [3 Closest Candidate: 'SmdsAklMHn kBIwKn', Fitness: 0.01] [4 Closest Candidate: ' lotneaJOasWfu Z', Fitness: 0.01] ... [292 Closest Candidate: 'GeneticaAlgorithm', Fitness: 1.00] [293 Closest Candidate: 'GeneticaAlgorithm', Fitness: 1.00] [294 Answer: 'Genetic Algorithm']
EfficientNet, ResNet, HRNet, SelecSLS등 다양한 모델들과 pretrained weight들을 갖추고 있으며, 모듈러 구조로 다양한 batchnorm, activation, 트레이닝트릭등(Autoaugment 등) 을 쉽게 사용할 수 있도록 짜여있습니다.
개인이 만든것이라고 생각하기에는 놀라울정도로 다양한 모델들과 아키텍쳐를 갖추고 있는데요, maintainer 본인이 여러 업무나 kaggle대회를 진행하거나 논문들을 살펴보면서 맞이하는 코드등을 쌓아가면서 코드를 형성했다고합니다.
최근에 네이버 클로버ai에서 resnet을 재구성하여 이전에 sota였던 efficientnet을 능가하는 assemblenet이 나온 후, 여기 maintainer도 tensorflow로 구성되어있던 원래의 코드를 pytorch로 구현하는 작업에 매진하고 있는 모양입니다.
현재는 selective kernel network를 구현하고 있는데요 이미 다양한 최적화, 모듈화가 가능한 자신의 코드베이스에 맞게 재구성중인 모양입니다.
저 개인적으로는 해당 assemblenet 논문의 결론부에서 언급된 ECA- Net(efficient channel attention)을 나름대로 재구성해서 해당 github에 pull request를 보내놓은 상태입니다.
ECA 원문에서는 channel간의 결과를 convolution할때 kernel size에 맞게 zero padding하게 됩니다.
그러나 채널들간의 관계는 인접한 픽셀이나 feature map과는 다르기 때문에 zero padding하는게 무의미하다고 생각하였습니다.
"첫"채널이나 "마지막"채널은 기하학적이거나 위상적인 의미를 지니지 않을 것이기 때문에 더 zeropadding하여 더 적은 channel과 convolution하기보다는 circular padding을 통해 모든 채널이 같은 갯수의 서로 다른 채널들과 convolution하는게 논리적으로 맞다고 생각합니다.
그러한 논리적 접근에 따라 circular ECA module을 구현하여 함께 pull request를 하였지만, 꼭 해당 코드에만 사용해야하는 것은 아니라 이러한 attention module(ECA든 cECA든) 이 적합하다고 생각하시는 분이라면 참고해서 쓰실 수있으셨으면 좋겠습니다.
대회 참여 인원은 총 960명으로 국내에서 가장 많은 사람이 참가한 데이터 경진대회로 성황리에 마무리되었습니다. 많은 사람이 참여한 이유로는 1. 기존 데이콘 회원의 높은 참가율 2. 높은 상금 (총 2,000 만원) 3. KB금융, 한국인터넷진흥원(KISA)의 높은 브랜드 가치인 것으로 판단됩니다.
알고리즘 평가를 위해서 대회 중 새롭게 수집한 11월 ~ 12월 금융 문자 데이터에 대해 예측력과, 예측 시간을 측정했습니다. 많은 우수 코드들은 공통적으로 형태소 분석기로는 Mecab을 사용했으며 머신러닝 모델로는 LightGBM을 사용했습니다. 대회 특성상 정확도와 함께 예측 속도가 중요하기 때문에 정확하면서도 처리시간이 짧은 Mecab이 선택되었고, 길이가 짧은 금융문자 특성상 신경망 기반의 BERT, LSTM과 같이 무거운 모델 보다는 비교적 가벼운 LightGBM이 선호된 것으로 보입니다.
대회 결과 새로운 데이터 세트에 대해 AUC 0.999405, 정확도 95%의 높은 예측력을 보이면서도 속도 또한 개당 2ms로 빠르게 처리하는 알고리즘을 발굴할 수 있었습니다. 이로써 고객에게 실시간으로 스미싱 여부를 제공하는 것이 가능할 것으로 기대됩니다.
Sound Classification with Machine Learning: A demo of a Neural Network trained to classify animal sounds, rain drops, baby crying and man-made noises like helicopter flying.
- 이 커널로 스터디 [https://www.kaggle.com/timesler/comparison-of-face-detection-packages](https://www.kaggle.com/timesler/comparison-of-face-detection-packages)
(누구든 사는 것의 uncertainty와 부족한 자원에 자주 실망한다. 인공지능 훈련을 하면서 이러한 것이 오히려 성공의 요소로 중요하다는 것을 배운다)
서울대 전기정보공학부의 성원용교수입니다. 나는 올해 8월 은퇴를 앞두었습니다만, 지난 몇년간 인공지능 분야를 재미있게 연구했습니다. 주로 효율적인 하드웨어 구현을 위한 단어길이 최적화, 그리고 응용으로는 음성인식입니다.
오늘은 설이기 때문에 젊은 후학들에게 인공지능을 통해 배우는 인생이 무엇인가하는 것을 생각해 보았습니다. 우리가 인공신경망의 훈련에 SGD(Stochastic Gradient Descent)를 많이 쓰는데, 이 훈련이 잘 되려면 네트워크를 loss surface의 소위 flat minima (평평한 최소)로 보내야 합니다. Flat minima는 웨이트의 값이나 data의 분포에 변화가 생겨도 loss가 크게 변하지 않기 때문에 소위 generalization (일반화) 능력과 관련해서 중요한 개념입니다. 나의 경우는 flat minima를 인공신경망 웨이트의 단어길이를 줄이는 목적으로 중요하게 생각합니다.
최근의 인공신경망은 파라미터의 갯수가 많기 때문에 훈련 데이터를 몇 에포크 돌리면 금방 다 외워버립니다. 즉, 트레이닝 로스가 매우 작아집니다. 그런데 빨리 훈련이 되면 flat minima에 가지 못하는 경향이 있습니다. 이를 오버피팅(over-fitting)되었다 하기도 합니다. 그 까닭은 인공신경망이 만드는 loss surface는 non-convex이기 때문입니다. Non-convex는 최소값 지점(minima)이 수없이 많지요. 따라서 적당하지 않은 minima에 빨리 정착해서 훈련 끝났음하면 안 됩니다. 이렇게 적당하지 않은 minima를 sharp minima라 하는데 training loss는 이 점에서 작을지라도 전체적으로 data의 통계적 변화에 취약합니다. 즉 generalization 능력이 떨어집니다.
이렇게 sharp minima를 피하기 위한 대표적인 훈련법이 SGD (stochastic gradient descent)입니다. GD(gradient descent)와 비교할 때 SGD는 크지 않은 mini-batch size (보통 32~512정도)로 loss를 얻어서 웨이트를 업데이트하는데 이 때 그 미니배치에 어떤 데이터가 들어오냐에 따라서 일종의 noise가 생기고 이 것이 SGD를 sharp minima에 빠지지 않게 하는 역할을 한다고 합니다. 또 다른 방법이 L2 weight regularization입니다. 이 경우는 weight 값의 크기에 제약을 두는 것입니다. 이 밖에도 weight 나 gradient에 noise를 injection하는 방법이 있습니다. 그리고 dropout 도 regularization 입니다.
이러한 regularization방법은 크게 두가지 특징을 가지고 있습니다. 첫째로 uncertainty입니다. GD의 경우는 batch size가 엄청커서 평가의 nosie가 적습니다. 그렇지만 SGD는 batch size가 제한되어 있기 때문에 noise가 큽니다. 어떤 때는 잘못된 방향으로 update합니다. 그렇지만 이 것이 sharp minima에서 빠져나오는데 도움을 줍니다. 두번째는 제약(constraint)입니다. L2 norm을 작게한다든가 weight의 값에 noise를 넣습니다. Regualarization을 가하면 training accuracy 100%를 찍기가 엄청 어렵습니다. Training loss가 천천히 줍니다. 말하자면 더 어려운 시험문제, 더 나쁜 상황으로 훈련을 시키는 것에 비유할 수 있습니다.
이 DNN훈련이 삶에 주는 지혜가 있습니다. 성공하기 위해서는 flat minima를 찾아야 합니다. 직업에 있어서 flat minima는 유연성과 확장성이 있어서 발전가능성이 크고 위기에도 견딜 수 있는 것입니다. 그래서 경영학 구루들은 사람들에게 '자신의 편안한 영역(일종의 sharp minima)에 안주하지 말라' 조언합니다. 그리고 flat minima를 찾기 위해서는 uncertainty를 감수해야 합니다. 입학시험부터 입사시험에 이르기까지 합격 불합격이 꼭 실력대로 되는 것은 아닙니다. 그래도 꼭 실력대로 안되는 세상이 모든 것이 성적대로 줄세워서 되는 세상보다는 낫습니다. 단지 세상은 이러한 uncertainty를 가지고 움직인다는 것을 이해해야 합니다. 두번째는 적절한 regularization이 필요합니다. 돈걱정등 모든 걱정이 없으면 좋을 것 같지만, 많은 재벌의 자식들이 마약문제로 언론에 많이 나옵니다. 부모의 후광으로 빨리 출세가 좋은 것이 아닙니다. 오버피팅되는 네트워크를 만드는 것입니다. 적절한 regularization은 오히려 성공에 도움을 줍니다.
누구든 사는 것의 uncertainty와 부족한 자원에 자주 실망합니다. 그렇지만 인공지능 훈련을 하면서 이러한 것이 또한 성공의 요소로 중요함을 덕담으로 남깁니다. 올 한해에도 많은 성과가 있기를 바랍니다.
Latest from Stanford, Adobe and IIT researchers: State of the art in Virtual Try on!
https://www.profillic.com/paper/arxiv:2001.06265
(An efficient framework for this is composed of 2 stages: (1) warping (transforming) the try-on cloth to align with the pose and shape of the target model, and (2) a texture transfer)
솔트룩스, 애버트란, 플리토에서 함께 작업한 것으로 알고 있으며 해당 데이터를 활용하여 성능이 얼마나 나오는지 실험을 진행해보았습니다. 눈으로 보았을 때 아직 조금 다듬어야 할 부분들(문장 정렬,표현 등)이 보였으나 기존의 공개된 데이터들 (ex. Opensubtitles)에 비해 상당히 고품질의 데이터로 판단됩니다.
실험을 위한 테스트셋으로는 IWSLT에서 공개한 Test2016, Test2017을 사용하였습니다.
실험결과 한-영 기계번역에서 16.38(Test 16기준) 의 BLEU 점수가 나왔으며 Opensubtitles 데이터까지 함께 학습시켜보니 17.34 (Test 16기준)까지 나오는 것을 볼 수 있었네요. 기존에 서강대학교[저-자원 언어의 번역 향상을 위한 다중 언어 기계번역], 강원대학교[MASS를 이용한 영어-한국어 신경망 기계번역]에서 동일한 테스트셋으로 실험한 논문보다 성능이 높게 나옴을 알 수 있었습니다.(물론 학습데이터가 달라서 성능 비교는 의미가 없습니다...)
역시 데이터의 품질이 중요함을 다시 한번 알 수 있었네요…
해당 데이터로 많은 분들이 다양한 서비스를 만들어 보시면 좋을 거 같습니다.
추가적으로 해당 모델을 Demo형태로도 만들어보았으니 직접 사용해보실 분들은 사용해보시면 좋을 듯 합니다 !
올해의 첫 NLP 뉴스입니다! 최근 자연어 처리 관련 재밌는 소식들이 많아 어떤 소식을 전해드리는게 좋을까 고민을 하다가, 아래 5개 소식을 선정해 소개해드리고자 합니다. 본 글을 읽는 모든 분들께 유익한 글이 되었으면 좋겠습니다 🤗
ㅡㅡㅡㅡㅡㅡㅡㅡㅡ
1. Hugging Face's Tokenizers
자연어 처리 전문 스타트업 Hugging Face 사에서 토크나이저 라이브러리를 오픈소스로 공개하였습니다. 다들 아시다시피 Deep Learning을 연구 및 적용하는 연구자와 개발자들이 늘어남에 따라 많은 모델링 관련 오픈소스들이 공개되어 왔습니다. 그리고 Hugging Face의 transformers, Facebook의 fairseq, Google의 tensor2tensor 등의 오픈소스가 공개됨에 따라 모델 구현은 이전보다 많이 수월해진 면이 있습니다.
그러나 자연어 데이터 전처리에 필수적으로 포함되는 토큰화 작업에서 생기는 성능 이슈로 인해 여전히 전처리 과정에서의 병목은 존재합니다. 이처럼 전처리 과정에서 발생하는 병목 현상을 해소하고, 다른 오픈소스들과 같이 연구자 및 개발자들에게 더 나은 편의를 제공하기 위해 Hugging Face 사가 토크나이저 오픈소스를 새로이 공개하였습니다!
Hugging Face 사의 'tokenizers'는 [그림 1]과 같이 4개의 컴포넌트가 하나의 파이프 라인으로 구성되며, 각 컴포넌트는 다음 역할을 담당합니다. - Normalizer: 입력된 텍스트 데이터에 정규화를 수행 - PreTokenizer: 공백을 이용한 간단한 문장 Split을 수행 - Model: BPE, WordPiece, SentencePiece 등의 Tokenization 알고리즘이 적용 - PostProcessing: (Optional) Model의 결과 값에 후작업을 수행 (e.g. Language Modeling을 훈련하기 위해 Special tokens를 더해줄 수 있음)
tokenizers 라이브러리는 Rust로 구현되어 단일 CPU 기준 GB 사이즈의 텍스트를 처리하는데 약 20초 미만이 소요되었다고 하며, 현재 Node.js와 Python 바인딩을 제공해주고 있습니다! 앞으로 자연어 처리 관련 연구 및 개발에 있어 많은 도움을 받을 라이브러리가 될 것 같습니다. 역시 갓 Hugging Face !
2. NER Papers repository
어제 소개해드린 CMU CS 11-747 강좌에 Graham Neubig과 함께 Co-instructor로 등록되어 있는 Pengfei Liu가 2013년부터 2020년까지 8년 간 ACL, EMNLP, NAACL, Coling, ICLR, AAAI, IJCAI 등 7개의 최상위 학회에 제출된 NER 논문들을 큐레이팅한 'Named-Entity-Recognition-NER-Papers' 레포지토리를 공개하였습니다.
논문 리스트와 더불어 NER 연구에 주로 사용되는 벤치마크 데이터셋 정보도 함께 제공해주고 있으며, 리스트 뷰어의 경우 검색, 인용 수 기준 정렬 등 부가적인 편의 기능까지 제공합니다. 특히 각 논문에 카테고리 태그를 모두 달아둠으로써 카테고리 별로 논문을 선별해 볼 수 있는 기능이 많은 연구자들에게 요긴하게 사용될 것 같아 소개를 드립니다 🙂
3. Dair's news letter
Medium에서 자연어 처리와 관련한 좋은 아티클를 많이 작성해주는 dair.ai에서 뉴스 레터를 시작하였습니다. 1~2주 간격으로 자연어 처리, 머신러닝과 관련된 최신 소식들을 전해준다고 합니다. 관심 있으신 분들이 생각나실 때 마다 여러 소식들을 캐치업하기 좋을 자료가 될 것 같습니다.
그리고 이번 첫 편에서는 Hugging Face의 tokenizers, TensorFlow 2.1에 새로이 추가된 TextVectorization 레이어, dair.ai가 Medium을 통해 발행했던 NLP Review in 2019 등을 다루었습니다!
4. Felix Hill's Non-Compositional
언어학, 수학 등에는 Compositionality의 원리가 존재한다고 합니다. (정확하지는 않지만 제가 이해한 바에 의하면) 이는 한 Expression의 의미는 해당 Expressoin을 구성하는 성분들의 의미와 그 성분들을 묶어주는 규칙에 의해 결정된다는 원리입니다. 언어학자들은 자연어가 대개 Compositional 하지만, Idiom과 같이 해당 원리가 적용되지 않는 예외도 존재한다고 이야기합니다. 해당 원리에 부합하지 않는 더 간단한 예로는 "I am home"과 같은 문장을 들 수 있겠네요.
DeepMind에서 인공지능을 연구하는 Felix Hill은 언어학자들과 다른 의견을 가지고 있는 것 같습니다. Felix는 자연어가 기본적으로 Non-Compositional 하다고 주장합니다. 아래는 Felix의 블로그 소개 글입니다.
"자연어는 수학이나 논리학 등의 형식 언어와 다르기에 흥미롭다. 사람들은 때때로 자연어가 Compositional하다고 생각하지만, 자연어는 Compositional한 언어가 아니다. 만약 당신이 자연어가 Compositional하다 생각한 바로 그 사람이라면, 내 블로그 Non-Compositional을 한 번 확인해봐라"
제게는 다소 생소한 언어학과 관련된 이야기이지만, Felix Hill의 "Natural Language is Non-Compositional" 주장에 관심이 있으실 분들이 계실 것 같아 소개를 드립니다. 해당 주장에 흥미가 생기신 분들은 아래 링크를 참조해주세요!
P.S Felix Hill은 Yoshua Bengio, 조경현 교수님과 같은 세계적 석학들과 Co-work을 하는 인공지능 관련 권위자이자 인지과학, 전산 언어학을 전공한 학자입니다. 이러한 Felix의 위 주장은 현재 Twitter에서도 꽤나 논쟁이 되고 있으니, 심각하게 받아 들이시기 보다는 다양한 관점의 주장을 접한다 생각하고 참고하시는게 좋을 것 같습니다 🙂
5. AI Dungeon 2
작년 12월 aidungeon.io 사에서 Open AI의 Pre-trained GPT-2 모델을 활용한 텍스트 기반 게임 AI Dungeon 2를 새로이 내놓았는데, 이게 해외에서 반응이 꽤나 좋습니다. 해당 게임은 GPT-2-small을 사용해 구현했던 AI Dungeon 1을 발전시킨 게임으로, 이번에는 OpenAI가 공개한 모델 중 가장 큰 GPT-2-large를 활용해 텍스트를 보다 안정적으로 생성할 수 있는 게임으로 중무장해 돌아왔습니다.
그리고 본 게임을 구현하며 진행했던 GPT-2 관련 여러 실험 + 튜닝 등의 이야기를 담은 메이킹 스토리 아티클이 있는데 해당 글도 상당히 재미있습니다. 먼저 모델 Fine-tuning의 경우, chooseyourstory.com에서 제공하는 모험 시나리오 관련 데이터셋을 활용해 진행했다고 합니다. 그리고 Text generation 모델들이 겪는 고질적인 문제인 '중복 단어의 생성 문제'를 해결하기 위해 Salesforce 팀이 CTRL에서 적용한, 이전에 이미 생성된 단어들의 확률 값을 의도적으로 줄여주는 방식을 본 게임 모델 개발에도 차용했다고 합니다.
또한 컨텍스트를 유지하기 위해 모델이 생성해낸 '상황 텍스트'와 '사용자의 입력'이 함께 다음 입력 값으로 들어가게 되며, 현재 입력 값 뿐만 아니라 최대 10턴 이전의 입력까지 Memory로 함께 가져가며 이전 상황 설정들을 기억하도록 하였습니다 (최적 메모리로는 이전 8턴 까지의 값들을 사용). 모델의 한계로는 상황 생성에 있어 자연스러운 텍스트를 생성해내고 있긴 하나, 대화문 등의 텍스트를 생성할 때 'Who is who?'를 파악하는 면에서 취약점을 보이고 있다고 합니다.
개인적으로 게임을 몇 번 진행해보았는데 꽤나 흥미로운 게임이었으며, Text generation 모델을 이러한 부문에서도 사용할 수 있구나라는 깨달음을 얻을 수 있었습니다. 그리고 메이킹 스토리의 경우, 모델을 적용하며 마주하게 되는 여러 문제들에 대한 대응 방안(apply CTRL tip, Memory network, ...)이 많이 담긴 좋은 글이기에 꼭 읽어보시길 추천드립니다. 시간 되실 때, 게임도 한 번 해보세요! 😆
Felix Hill's Non-Compositional: https://fh295.github.io/noncompositional.html
AI Dungeon 2: https://play.aidungeon.io/ AI Dungeon 2 making story: https://pcc.cs.byu.edu/2019/11/21/ai-dungeon-2-creating-infinitely-generated-text-adventures-with-deep-learning-language-models/
State of the art- Photoshop faces with hand sketches!
https://www.profillic.com/paper/arxiv:2001.02890
(The researchers propose Deep Plastic Surgery, a novel sketch-based image editing framework to achieve both robustness on hand-drawn sketch inputs and the controllability on sketch faithfulness)