반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리


반응형

 

 

1. https://matplotlib.org/api/_as_gen/matplotlib.pyplot.html

 

matplotlib.pyplot — Matplotlib 3.0.3 documentation

matplotlib.pyplot matplotlib.pyplot is a state-based interface to matplotlib. It provides a MATLAB-like way of plotting. pyplot is mainly intended for interactive plots and simple cases of programmatic plot generation: import numpy as np import matplotlib.

matplotlib.org

matplotlib.pyplot

matplotlib.pyplot is a state-based interface to matplotlib. It provides a MATLAB-like way of plotting.

pyplot is mainly intended for interactive plots and simple cases of programmatic plot generation:

import numpy as np

import matplotlib.pyplot as plt

x = np.arange(0, 5, 0.1)

y = np.sin(x)

plt.plot(x, y)

The object-oriented API is recommended for more complex plots.

 

2. 함수

3. 위 함수 실행

4. 위 함수 실행

5. https://www.tutorialspoint.com/python_pandas/python_pandas_series.htm

 

Python Pandas Series

Python Pandas - Series Advertisements Series is a one-dimensional labeled array capable of holding data of any type (integer, string, float, python objects, etc.). The axis labels are collectively called index. pandas.Series A pandas Series can be created

www.tutorialspoint.com

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.map.html

 

pandas.Series.map — pandas 0.24.2 documentation

Parameters: arg : function, dict, or Series Mapping correspondence. na_action : {None, ‘ignore’}, default None If ‘ignore’, propagate NaN values, without passing them to the mapping correspondence.

pandas.pydata.org

https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.randn.html

 

numpy.random.randn — NumPy v1.16 Manual

Parameters: d0, d1, …, dn : int, optional The dimensions of the returned array, should be all positive. If no argument is given a single Python float is returned.

docs.scipy.org

8. https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.corr.html

 

pandas.DataFrame.corr — pandas 0.24.2 documentation

Parameters: method : {‘pearson’, ‘kendall’, ‘spearman’} or callable pearson : standard correlation coefficient kendall : Kendall Tau correlation coefficient spearman : Spearman rank correlation callable: callable with input two 1d ndarrays and returning a

pandas.pydata.org

9. https://matplotlib.org/api/_as_gen/matplotlib.pyplot.scatter.html

 

matplotlib.pyplot.scatter — Matplotlib 3.0.3 documentation

Parameters: x, y : array_like, shape (n, ) The data positions. s : scalar or array_like, shape (n, ), optional The marker size in points**2. Default is rcParams['lines.markersize'] ** 2. c : color, sequence, or sequence of color, optional The marker color.

matplotlib.org

https://matplotlib.org/api/_as_gen/matplotlib.pyplot.grid.html?highlight=grid#matplotlib.pyplot.grid

 

matplotlib.pyplot.grid — Matplotlib 3.0.3 documentation

Parameters: b : bool or None Whether to show the grid lines. If any kwargs are supplied, it is assumed you want the grid on and b will be set to True. If b is None and there are no kwargs, this toggles the visibility of the lines. which : {'major', 'minor'

matplotlib.org

https://matplotlib.org/api/legend_api.html?highlight=legend#module-matplotlib.legend

 

legend and legend_handler — Matplotlib 3.0.3 documentation

Other Parameters: loc : int or string or pair of floats, default: rcParams["legend.loc"] ('best' for axes, 'upper right' for figures) The location of the legend. Possible codes are: Location String Location Code 'best' 0 'upper right' 1 'upper left' 2 'low

matplotlib.org

11. https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.shuffle.html

 

numpy.random.shuffle — NumPy v1.16 Manual

Modify a sequence in-place by shuffling its contents. This function only shuffles the array along the first axis of a multi-dimensional array. The order of sub-arrays is changed but their contents remains the same. Parameters: x : array_like The array or l

docs.scipy.org

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.iloc.html

 

pandas.DataFrame.iloc — pandas 0.24.2 documentation

Purely integer-location based indexing for selection by position. .iloc[] is primarily integer position based (from 0 to length-1 of the axis), but may also be used with a boolean array. Allowed inputs are: An integer, e.g. 5. A list or array of integers,

pandas.pydata.org

 

 

1. Install XGBOOST https://github.com/conda-forge/xgboost-feedstock

 

conda-forge/xgboost-feedstock

A conda-smithy repository for xgboost. Contribute to conda-forge/xgboost-feedstock development by creating an account on GitHub.

github.com

 

 

 

3. https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html?highlight=read_csv#pandas.read_csv

 

pandas.read_csv — pandas 0.24.2 documentation

Parameters: filepath_or_buffer : str, path object, or file-like object Any valid string path is acceptable. The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. A local file could be: file://local

pandas.pydata.org

 

 

 

 

 

 

12. https://xgboost.readthedocs.io/en/latest/python/python_api.html

 

Python API Reference — xgboost 0.83.dev0 documentation

Python API Reference This page gives the Python API reference of xgboost, please also refer to Python Package Introduction for more information about python package. Core Data Structure Core XGBoost Library. class xgboost.DMatrix(data, label=None, missing=

xgboost.readthedocs.io

 

 

20. 

Plotting API

Plotting Library.

xgboost.plot_importance(booster, ax=None, height=0.2, xlim=None, ylim=None, title='Feature importance', xlabel='F score', ylabel='Features', importance_type='weight', max_num_features=None, grid=True, show_values=True, **kwargs)

Plot importance based on fitted trees.

 

25. predict(data, output_margin=False, ntree_limit=0, pred_leaf=False, pred_contribs=False, approx_contribs=False, pred_interactions=False, validate_features=True)

Predict with data.

Note

This function is not thread safe.

For each booster object, predict can only be called from one thread. If you want to run prediction using multiple thread, call bst.copy() to make copies of model object and then call predict().

Note

Using predict() with DART booster

If the booster object is DART type, predict() will perform dropouts, i.e. only some of the trees will be evaluated. This will produce incorrect results if data is not the training data. To obtain correct results on test sets, set ntree_limit to a nonzero value, e.g.

preds = bst.predict(dtest, ntree_limit=num_round)

30. https://matplotlib.org/api/_as_gen/matplotlib.pyplot.boxplot.html

 

matplotlib.pyplot.boxplot — Matplotlib 3.0.3 documentation

Parameters: x : Array or a sequence of vectors. The input data. notch : bool, optional (False) If True, will produce a notched box plot. Otherwise, a rectangular boxplot is produced. The notches represent the confidence interval (CI) around the median. See

matplotlib.org

31. https://matplotlib.org/api/_as_gen/matplotlib.pyplot.hist.html

 

matplotlib.pyplot.hist — Matplotlib 3.0.3 documentation

Parameters: x : (n,) array or sequence of (n,) arrays Input values, this takes either a single array or a sequence of arrays which are not required to be of the same length. bins : int or sequence or str, optional If an integer is given, bins + 1 bin edges

matplotlib.org

https://matplotlib.org/api/_as_gen/matplotlib.pyplot.axvline.html

 

matplotlib.pyplot.axvline — Matplotlib 3.0.3 documentation

Parameters: x : scalar, optional, default: 0 x position in data coordinates of the vertical line. ymin : scalar, optional, default: 0 Should be between 0 and 1, 0 being the bottom of the plot, 1 the top of the plot. ymax : scalar, optional, default: 1 Shou

matplotlib.org

 

37. https://pandas.pydata.org/pandas-docs/version/0.21/generated/pandas.DataFrame.describe.html

 

pandas.DataFrame.describe — pandas 0.21.1 documentation

percentiles : list-like of numbers, optional The percentiles to include in the output. All should fall between 0 and 1. The default is [.25, .5, .75], which returns the 25th, 50th, and 75th percentiles. include : ‘all’, list-like of dtypes or None (default

pandas.pydata.org

 

반응형


반응형

1. Imported Libraries

pandas : https://en.wikipedia.org/wiki/Pandas_(software)

 

pandas (software) - Wikipedia

Python programming library for data manipulation and analysis In computer programming, pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for

en.wikipedia.org

In computer programming, pandas is a software library written for the Python programming language for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series. It is free software released under the three-clause BSD license.[2] The name is derived from the term "panel data", an econometrics term for data sets that include observations over multiple time periods for the same individuals

 

https://pandas.pydata.org/

 

Python Data Analysis Library — pandas: Python Data Analysis Library

Python Data Analysis Library pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. pandas is a NumFOCUS sponsored project. This will help ensure t

pandas.pydata.org

 

numpy : https://en.wikipedia.org/wiki/NumPy

 

NumPy - Wikipedia

From Wikipedia, the free encyclopedia Jump to navigation Jump to search Numerical programming library for the Python programming language NumPy (pronounced (NUM-py) or sometimes [2][3] (NUM-pee)) is a library for the Python programming language, adding sup

en.wikipedia.org

NumPy (pronounced /ˈnʌmp/ (NUM-py) or sometimes /ˈnʌmpi/[2][3] (NUM-pee)) is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. The ancestor of NumPy, Numeric, was originally created by Jim Hugunin with contributions from several other developers. In 2005, Travis Oliphant created NumPy by incorporating features of the competing Numarray into Numeric, with extensive modifications. NumPy is open-source software and has many contributors.

 

https://www.numpy.org/

 

NumPy — NumPy

NumPy NumPy is the fundamental package for scientific computing with Python. It contains among other things: a powerful N-dimensional array object sophisticated (broadcasting) functions tools for integrating C/C++ and Fortran code useful linear algebra, Fo

www.numpy.org

NumPy is the fundamental package for scientific computing with Python. It contains among other things:

  • a powerful N-dimensional array object
  • sophisticated (broadcasting) functions
  • tools for integrating C/C++ and Fortran code
  • useful linear algebra, Fourier transform, and random number capabilities

Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases.

NumPy is licensed under the BSD license, enabling reuse with few restrictions.

 

boto3 : Interacting for S3   https://boto3.amazonaws.com/v1/documentation/api/latest/index.html

 

Boto 3 Documentation — Boto 3 Docs 1.9.148 documentation

 

boto3.amazonaws.com

Boto is the Amazon Web Services (AWS) SDK for Python. It enables Python developers to create, configure, and manage AWS services, such as EC2 and S3. Boto provides an easy to use, object-oriented API, as well as low-level access to AWS services.

 

sagemaker.amazon.common

 

2. https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.seed.html

 

numpy.random.seed — NumPy v1.16 Manual

Parameters: seed : int or 1-d array_like, optional Seed for RandomState. Must be convertible to 32 bit unsigned integers.

docs.scipy.org

numpy.random.seed(seed=None)

Seed the generator.

This method is called when RandomState is initialized. It can be called again to re-seed the generator. For details, see RandomState.

Parameters:

seed : int or 1-d array_like, optional

Seed for RandomState. Must be convertible to 32 bit unsigned integers.

See also

RandomState

 

3. numpy.random.random_sample(size=None) : https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.random_sample.html?highlight=random%20random_sample#numpy.random.random_sample

 

numpy.random.random_sample — NumPy v1.16 Manual

Parameters: size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned.

docs.scipy.org

numpy.random.randint : https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.randint.html

 

numpy.random.randint — NumPy v1.16 Manual

Parameters: low : int Lowest (signed) integer to be drawn from the distribution (unless high=None, in which case this parameter is one above the highest such integer). high : int, optional If provided, one above the largest (signed) integer to be drawn fro

docs.scipy.org

4. 

5. df : https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html

 

pandas.DataFrame — pandas 0.24.2 documentation

Parameters: data : ndarray (structured or homogeneous), Iterable, dict, or DataFrame Dict can contain Series, arrays, constants, or list-like objects Changed in version 0.23.0: If data is a dict, argument order is maintained for Python 3.6 and later. index

pandas.pydata.org

 

 

 

6. df - Print values

7. 파일로 저장 pandas.DataFrame.to_csv : https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html

 

pandas.DataFrame.to_csv — pandas 0.24.2 documentation

Parameters: path_or_buf : str or file handle, default None File path or object, if None is provided the result is returned as a string. If a file object is passed it should be opened with newline=’‘, disabling universal newlines. Changed in version 0.24.0:

pandas.pydata.org

8. 함수 : 3개의 파라미터를 받음 - 파일을 S3에 저장하는 함수

9. 함수 : boto3를 사용해서 해당 파일을 S3 버킷으로부터 다운 받음

boto3.Session().resource('s3') : https://boto3.amazonaws.com/v1/documentation/api/latest/guide/session.html

 

Session — Boto 3 Docs 1.9.148 documentation

Session A session manages state about a particular configuration. By default a session is created for you when needed. However it is possible and recommended to maintain your own session(s) in some scenarios. Sessions typically store: Credentials Region Ot

boto3.amazonaws.com

10. 8번 함수를 실행시켜 해당 파일을 S3에 저장

upload_fileobj : https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html?highlight=upload_fileobj#S3.Bucket.upload_fileobj

 

S3 — Boto 3 Docs 1.9.148 documentation

The response of this operation contains an EventStream member. When iterated the EventStream will yield events based on the structure below, where only one of the top level keys will be present for any given event. Response Syntax { 'Payload': EventStream(

boto3.amazonaws.com

11. 9번 함수를 실행시켜 해당 파일을 S3로부터 다운 받음

Bucket object download_fileobj : https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html?highlight=download_fileobj#S3.Bucket.download_fileobj

 

S3 — Boto 3 Docs 1.9.148 documentation

The response of this operation contains an EventStream member. When iterated the EventStream will yield events based on the structure below, where only one of the top level keys will be present for any given event. Response Syntax { 'Payload': EventStream(

boto3.amazonaws.com

12. 

13. 처음 시작 5개 데이터를 출력함

df.head() : https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.head.html

 

pandas.DataFrame.head — pandas 0.24.2 documentation

Return the first n rows. This function returns the first n rows for the object based on position. It is useful for quickly testing if your object has the right type of data in it. Parameters: n : int, default 5 Number of rows to select. Returns: obj_head :

pandas.pydata.org

14. 해당 컬럼들을 매트릭스에 담음 ??? 

pandas.DataFrame.as_matrix : https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.as_matrix.html?highlight=as_matrix#pandas.DataFrame.as_matrix

 

pandas.DataFrame.as_matrix — pandas 0.24.2 documentation

Parameters: columns : list, optional, default:None If None, return all columns, otherwise, returns specified columns.

pandas.pydata.org

15. X 값들

16. ???

17. y 컬럼을 매트릭스에 담음

 

18. y 값 형태. 10줄에 1개 컬럼

19. y 값

20. y 값을 한줄에 표시함

numpy.ravel : https://docs.scipy.org/doc/numpy/reference/generated/numpy.ravel.html

 

numpy.ravel — NumPy v1.16 Manual

Parameters: a : array_like Input array. The elements in a are read in the order specified by order, and packed as a 1-D array. order : {‘C’,’F’, ‘A’, ‘K’}, optional The elements of a are read using this index order. ‘C’ means to index the elements in row-m

docs.scipy.org

21. y 값

23. 함수 : 전달받은 파일을 ????

write_numpy_to_dense_tensor : https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/amazon/common.py

 

aws/sagemaker-python-sdk

A library for training and deploying machine learning models on Amazon SageMaker - aws/sagemaker-python-sdk

github.com

read_records

24. 함수 : 해당 파일을 ?????

25. write_recordio_file 함수를 실행 함

 

 

26. 첫 3 줄만 출력

27. read_recordio_file 함수 실행

32. 해당 파일을 S3에 저장함

33. 해당 파일을 S3에서 다운 받음

 

반응형

AWS Machine Learning - Types of ML models etc.

2019. 5. 9. 10:04 | Posted by 솔웅


반응형

AWS Machine Learning

 

* Supervised Learning : Training Set and Test Set

 

 

 

Types of ML Models

Amazon ML supports three types of ML models: binary classification, multiclass classification, and regression. The type of model you should choose depends on the type of target that you want to predict.

Binary Classification Model

ML models for binary classification problems predict a binary outcome (one of two possible classes). To train binary classification models, Amazon ML uses the industry-standard learning algorithm known as logistic regression.

Examples of Binary Classification Problems

  • "Is this email spam or not spam?"

  • "Will the customer buy this product?"

  • "Is this product a book or a farm animal?"

  • "Is this review written by a customer or a robot?"

Multiclass Classification Model

ML models for multiclass classification problems allow you to generate predictions for multiple classes (predict one of more than two outcomes). For training multiclass models, Amazon ML uses the industry-standard learning algorithm known as multinomial logistic regression.

Examples of Multiclass Problems

  • "Is this product a book, movie, or clothing?"

  • "Is this movie a romantic comedy, documentary, or thriller?"

  • "Which category of products is most interesting to this customer?"

Regression Model

ML models for regression problems predict a numeric value. For training regression models, Amazon ML uses the industry-standard learning algorithm known as linear regression.

Examples of Regression Problems

  • "What will the temperature be in Seattle tomorrow?"

  • "For this product, how many units will sell?"

  • "What price will this house sell for?"

ML 모델 유형

Amazon ML은 이진수 분류, 멀티클래스 분류 및 회귀라는 세 가지 유형의 ML 모델을 지원합니다. 선택해야 하는 모델 유형은 예측하려는 목표의 유형에 따라 따릅니다.

이진 분류 모델

이진 분류 문제에 대한 ML 모델은 이진 결과(가능성이 있는 두 가지 클래스 중 하나)를 예측합니다. 이진수 분류 모델을 교육하기 위해 은 '로지스틱 회귀'로 알려진 업계 표준 학습 알고리즘을 사용합니다.

이진 분류 문제의 예

  • "이 이메일은 스팸입니까? 스팸이 아닙니까?"

  • "고객이 이 제품을 구입할 것입니까?"

  • "이 제품은 책입니까? 아니면 가축입니까?"

  • "이 리뷰는 고객이 작성합니까? 로봇이 작성합니까?"

멀티클래스 분류 모델

멀티클래스 분류 문제에 대해 ML 모델을 사용하면 여러 클래스에 대한 예측을 생성할 수 있습니다(세 개 이상의 결과 중 하나를 예측). 멀티클래스 모델을 교육하기 위해 은 '다항 로지스틱 회귀'로 알려진 업계 표준 학습 알고리즘을 사용합니다.

멀티클래스 문제의 예

  • "이 제품은 책, 영화 또는 의류입니까?"

  • "이 영화는 로맨틱 코미디, 다큐멘터리 또는 스릴러입니까?"

  • "이 고객이 가장 관심을 갖는 제품 카테고리는 무엇입니까?"

회귀 모델

회귀 문제에 대해 ML 모델은 숫자 값을 예측합니다. 회귀 모델을 교육하기 위해 은 '선형 회귀'로 알려진 업계 표준 학습 알고리즘을 사용합니다.

회귀 문제의 예

  • "내일 시애틀의 기온은 어떨까요?"

  • "이 제품의 판매량이 얼마나 될까요?"

  • "이 집의 매매 가격이 얼마나 될까요?"

 

 

- Unsupervised Learning : Only data,
  Clustering Algorithm :
  Dimensionality Reduction
  Group words that are used in similar context or have similar meaning
  

 


Reinforcement Learning 
  Decision Making under uncertainty
  Autonomous Driving
  Games
  Reinforcement uses Reward Functions to reward correct decision and punish incorrect decision

 

Reinforcement Learning with Amazon SageMaker RL

Reinforcement learning (RL) is a machine learning technique that attempts to learn a strategy, called a policy, that optimizes an objective for an agent acting in an environment. For example, the agent might be a robot, the environment might be a maze, and the goal might be to successfully navigate the maze in the smallest amount of time. In RL, the agent takes an action, observes the state of the environment, and gets a reward based on the value of the current state of the environment. The goal is to maximize the long-term reward that the agent receives as a result of its actions. RL is well-suited for solving problems where an agent can make autonomous decisions.

Topics

Why is Reinforcement Learning Important?

RL is well-suited for solving large, complex problems. For example, supply chain management, HVAC systems, industrial robotics, game artificial intelligence, dialog systems, and autonomous vehicles. Because RL models learn by a continuous process of receiving rewards and punishments for every action taken by the agent, it is possible to train systems to make decisions under uncertainty and in dynamic environments.

Markov Decision Process (MDP)

RL is based on models called Markov Decision Processes (MDPs). An MDP consists of a series of time steps. Each time step consists of the following:

Environment

Defines the space in which the RL model operates. This can be either a real-world environment or a simulator. For example, if you train a physical autonomous vehicle on a physical road, that would be a real-world environment. If you train a computer program that models an autonomous vehicle driving on a road, that would be a simulator.

State

Specifies all information about the environment and past steps that is relevant to the future. For example, in an RL model in which a robot can move in any direction at any time step, then the position of the robot at the current time step is the state, because if we know where the robot is, it isn't necessary to know the steps it took to get there.

Action

What the agent does. For example, the robot takes a step forward.

Reward

A number that represents the value of the state that resulted from the last action that the agent took. For example, if the goal is for a robot to find treasure, the reward for finding treasure might be 5, and the reward for not finding treasure might be 0. The RL model attempts to find a strategy that optimizes the cumulative reward over the long term. This strategy is called a policy.

Observation

Information about the state of the environment that is available to the agent at each step. This might be the entire state, or it might be just a part of the state. For example, the agent in a chess-playing model would be able to observe the entire state of the board at any step, but a robot in a maze might only be able to observe a small portion of the maze that it currently occupies.

Typically, training in RL consists of many episodes. An episode consists of all of the time steps in an MDP from the initial state until the environment reaches the terminal state.

Key Features of Amazon SageMaker RL

To train RL models in Amazon SageMaker RL, use the following components:

  • A deep learning (DL) framework. Currently, Amazon SageMaker supports RL in TensorFlow and Apache MXNet.

  • An RL toolkit. An RL toolkit manages the interaction between the agent and the environment, and provides a wide selection of state of the art RL algorithms. Amazon SageMaker supports the Intel Coach and Ray RLlib toolkits. For information about Intel Coach, see https://nervanasystems.github.io/coach/. For information about Ray RLlib, see https://ray.readthedocs.io/en/latest/rllib.html.

  • An RL environment. You can use custom environments, open-source environments, or commercial environments. For information, see RL Environments in Amazon SageMaker.

The following diagram shows the RL components that are supported in Amazon SageMaker RL.

 

Amazon SageMaker RL을 사용한 강화 학습

강화 학습(RL)은 환경에서 작동하는 에이전트에 대한 목표를 최적화하는 전략(정책이라고 함)을 배우려고 시도하는 기계 학습 기법입니다. 예를 들어, 에이전트는 로봇, 환경은 미로, 목표는 최단시간 내에 미로를 성공적으로 탈출하는 것일 수 있습니다. RL에서 에이전트는 행동을 취하고, 환경의 상태를 관찰하고, 환경의 현재 상태 값에 따라 보상을 받습니다. 목표는 행동의 결과로 에이전트가 받는 장기 보상을 극대화하는 것입니다. RL은 에이전트가 자율 의사결정을 내릴 수 있는 문제를 해결하는 데 매우 적합합니다.

주제

강화 학습이 중요한 이유는 무엇입니까?

RL은 크고 복잡한 문제를 해결하는 데 매우 적합합니다. 예를 들어, 공급망 관리, HVAC 시스템, 산업용 로봇, 게임 인공 지능, 음성 대화 시스템 및 자율 주행 차량 등이 있습니다. RL 모델은 에이전트가 취하는 모든 행동에 대해 보상과 처벌을 받는 연속 프로세스를 통해 학습하기 때문에 동적인 환경에서 불확실성이 존재할 때 시스템이 의사를 결정하도록 훈련할 수 있습니다.

마코프 의사결정 과정(MDP)

RL은 마코프 의사결정 과정(MDP)라는 모델을 기반으로 합니다. MDP는 일련의 시간 단계로 구성됩니다. 각 시간 단계는 다음과 같은 요소로 구성됩니다.

환경

RL 모델이 작동하는 공간을 정의합니다. 이러한 공간은 실제 환경 또는 시뮬레이터일 수 있습니다. 예를 들어, 실제 도로에서 자율 주행 차량을 훈련하는 경우는 환경이 실제 환경입니다. 도로 위를 주행하는 자율 주행 차량을 모델링하는 컴퓨터 프로그램을 훈련하는 경우에는 환경이 시뮬레이터입니다.

상태

환경에 대한 모든 정보와 미래와 관련된 과거의 모든 단계를 지정합니다. 예를 들어, 로봇이 언제든지 어떤 방향으로든 이동할 수 있는 RL 모델에서는 현재 시간 단계에서 로봇의 위치가 상태입니다. 로봇 위치를 알면 해당 위치에 도착하기 위해 어떤 단계를 수행했는지 알 필요가 없기 때문입니다.

작업

작업은 에이전트가 수행합니다. 예를 들어 로봇이 앞으로 나아갑니다.

보상

에이전트가 수행한 마지막 작업의 상태 값을 나타내는 숫자입니다. 예를 들어, 목표가 로봇이 보물을 찾도록 하는 것이라면 보물을 찾은 경우 보상이 5이고, 보물을 찾지 못한 경우에는 보상이 0일 수 있습니다. RL 모델은 장기간 누적된 보상을 최적화하는 전략을 찾으려고 합니다. 이러한 전략을 정책이라고 합니다.

관측치

각 단계마다 에이전트가 사용할 수 있는 환경 상태에 대한 정보입니다. 전체 상태이거나 상태의 일부분일 수 있습니다. 예를 들어, 체스 시합 모델의 에이전트는 모든 단계에서 체스판의 전체 상태를 관찰할 수 있지만 미로 속의 로봇은 현재 마주하고 있는 미로의 작은 부분 밖에 관찰할 수 없습니다.

일반적으로 RL의 훈련은 많은 에피소드로 구성됩니다. 에피소드는 초기 상태에서 환경이 최종 상태에 도달할 때까지 MDP의 모든 시간 단계로 구성됩니다.

Amazon SageMaker RL의 주요 기능

Amazon SageMaker RL에서 RL 모델을 훈련하려면 다음 구성 요소를 사용합니다.

  • 딥 러닝(DL) 프레임워크. 현재, Amazon SageMaker는 TensorFlow 및 Apache MXNet에서 RL을 지원합니다.

  • RL 도구 키트. RL 도구 키트는 에이전트와 환경 간의 상호 작용을 관리하고, RL 알고리즘의 광범위한 상태 선택 항목을 제공합니다. Amazon SageMaker는 Intel Coach 및 Ray RLlib 도구 키트를 제공합니다. Intel Coach에 대한 자세한 정보는 https://nervanasystems.github.io/coach/를 참조하십시오. Ray RLlib에 대한 자세한 정보는 https://ray.readthedocs.io/en/latest/rllib.html을 참조하십시오.

  • RL 환경. 사용자 지정 환경, 오픈 소스 환경 또는 상용 환경을 사용할 수 있습니다. 자세한 정보는 Amazon SageMaker의 RL 환경 단원을 참조하십시오.

다음 다이어그램은 Amazon SageMaker RL에서 지원되는 RL 구성 요소를 보여 줍니다.

 

- refer to the picture above -

 

 

 

* Data types  
* Data in Real Life : Numeric, Text, Categorical values
* Categorical : Cartesian Transformation - Combine categorical features to form new features
* Text Type : NGRAM, OSB Transformation, Stemming, Lower Case
* Numeric Data :

 

Data Transformations Reference

Topics

N-gram Transformation

The n-gram transformation takes a text variable as input and produces strings corresponding to sliding a window of (user-configurable) n words, generating outputs in the process. For example, consider the text string "I really enjoyed reading this book".

Specifying the n-gram transformation with window size=1 simply gives you all the individual words in that string:

 

{"I", "really", "enjoyed", "reading", "this", "book"}

Specifying the n-gram transformation with window size =2 gives you all the two-word combinations as well as the one-word combinations:

 

{"I really", "really enjoyed", "enjoyed reading", "reading this", "this book", "I", "really", "enjoyed", "reading", "this", "book"}

Specifying the n-gram transformation with window size = 3 will add the three-word combinations to this list, yielding the following:

 

{"I really enjoyed", "really enjoyed reading", "enjoyed reading this", "reading this book", "I really", "really enjoyed", "enjoyed reading", "reading this", "this book", "I", "really", "enjoyed", "reading", "this", "book"}

You can request n-grams with a size ranging from 2-10 words. N-grams with size 1 are generated implicitly for all inputs whose type is marked as text in the data schema, so you do not have to ask for them. Finally, keep in mind that n-grams are generated by breaking the input data on whitespace characters. That means that, for example, punctuation characters will be considered a part of the word tokens: generating n-grams with a window of 2 for string "red, green, blue" will yield {"red,", "green,", "blue,", "red, green", "green, blue"}. You can use the punctuation remover processor (described later in this document) to remove the punctuation symbols if this is not what you want.

To compute n-grams of window size 3 for variable var1:

 

"ngram(var1, 3)"

Orthogonal Sparse Bigram (OSB) Transformation

The OSB transformation is intended to aid in text string analysis and is an alternative to the bi-gram transformation (n-gram with window size 2). OSBs are generated by sliding the window of size n over the text, and outputting every pair of words that includes the first word in the window.

To build each OSB, its constituent words are joined by the "_" (underscore) character, and every skipped token is indicated by adding another underscore into the OSB. Thus, the OSB encodes not just the tokens seen within a window, but also an indication of number of tokens skipped within that same window.

To illustrate, consider the string "The quick brown fox jumps over the lazy dog", and OSBs of size 4. The six four-word windows, and the last two shorter windows from the end of the string are shown in the following example, as well OSBs generated from each:

Window, {OSBs generated}

 

"The quick brown fox", {The_quick, The__brown, The___fox} "quick brown fox jumps", {quick_brown, quick__fox, quick___jumps} "brown fox jumps over", {brown_fox, brown__jumps, brown___over} "fox jumps over the", {fox_jumps, fox__over, fox___the} "jumps over the lazy", {jumps_over, jumps__the, jumps___lazy} "over the lazy dog", {over_the, over__lazy, over___dog} "the lazy dog", {the_lazy, the__dog} "lazy dog", {lazy_dog}

Orthogonal sparse bigrams are an alternative for n-grams that might work better in some situations. If your data has large text fields (10 or more words), experiment to see which works better. Note that what constitutes a large text field may vary depending on the situation. However, with larger text fields, OSBs have been empirically shown to uniquely represent the text due to the special skip symbol (the underscore).

You can request a window size of 2 to 10 for OSB transformations on input text variables.

To compute OSBs with window size 5 for variable var1:

"osb(var1, 5)"

Lowercase Transformation

The lowercase transformation processor converts text inputs to lowercase. For example, given the input "The Quick Brown Fox Jumps Over the Lazy Dog", the processor will output "the quick brown fox jumps over the lazy dog".

To apply lowercase transformation to the variable var1:

"lowercase(var1)"

Remove Punctuation Transformation

Amazon ML implicitly splits inputs marked as text in the data schema on whitespace. Punctuation in the string ends up either adjoining word tokens, or as separate tokens entirely, depending on the whitespace surrounding it. If this is undesirable, the punctuation remover transformation may be used to remove punctuation symbols from generated features. For example, given the string "Welcome to AML - please fasten your seat-belts!", the following set of tokens is implicitly generated:

 

{"Welcome", "to", "Amazon", "ML", "-", "please", "fasten", "your", "seat-belts!"}

Applying the punctuation remover processor to this string results in this set:

 

{"Welcome", "to", "Amazon", "ML", "please", "fasten", "your", "seat-belts"}

Note that only the prefix and suffix punctuation marks are removed. Punctuations that appear in the middle of a token, e.g. the hyphen in "seat-belts", are not removed.

To apply punctuation removal to the variable var1:

"no_punct(var1)"

Quantile Binning Transformation

The quantile binning processor takes two inputs, a numerical variable and a parameter called bin number, and outputs a categorical variable. The purpose is to discover non-linearity in the variable's distribution by grouping observed values together.

In many cases, the relationship between a numeric variable and the target is not linear (the numeric variable value does not increase or decrease monotonically with the target). In such cases, it might be useful to bin the numeric feature into a categorical feature representing different ranges of the numeric feature. Each categorical feature value (bin) can then be modeled as having its own linear relationship with the target. For example, let's say you know that the continuous numeric feature account_age is not linearly correlated with likelihood to purchase a book. You can bin age into categorical features that might be able to capture the relationship with the target more accurately.

The quantile binning processor can be used to instruct Amazon ML to establish n bins of equal size based on the distribution of all input values of the age variable, and then to substitute each number with a text token containing the bin. The optimum number of bins for a numeric variable is dependent on characteristics of the variable and its relationship to the target, and this is best determined through experimentation. Amazon ML suggests the optimal bin number for a numeric feature based on data statistics in the Suggested Recipe.

You can request between 5 and 1000 quantile bins to be computed for any numeric input variable.

To following example shows how to compute and use 50 bins in place of numeric variable var1:

"quantile_bin(var1, 50)"

Normalization Transformation

The normalization transformer normalizes numeric variables to have a mean of zero and variance of one. Normalization of numeric variables can help the learning process if there are very large range differences between numeric variables because variables with the highest magnitude could dominate the ML model, no matter if the feature is informative with respect to the target or not.

To apply this transformation to numeric variable var1, add this to the recipe:

normalize(var1)

This transformer can also take a user defined group of numeric variables or the pre-defined group for all numeric variables (ALL_NUMERIC) as input:

normalize(ALL_NUMERIC)

Note

It is not mandatory to use the normalization processor for numeric variables.

Cartesian Product Transformation

The Cartesian transformation generates permutations of two or more text or categorical input variables. This transformation is used when an interaction between variables is suspected. For example, consider the bank marketing dataset that is used in Tutorial: Using Amazon ML to Predict Responses to a Marketing Offer. Using this dataset, we would like to predict whether a person would respond positively to a bank promotion, based on the economic and demographic information. We might suspect that the person's job type is somewhat important (perhaps there is a correlation between being employed in certain fields and having the money available), and the highest level of education attained is also important. We might also have a deeper intuition that there is a strong signal in the interaction of these two variables—for example, that the promotion is particularly well-suited to customers who are entrepreneurs who earned a university degree.

The Cartesian product transformation takes categorical variables or text as input, and produces new features that capture the interaction between these input variables. Specifically, for each training example, it will create a combination of features, and add them as a standalone feature. For example, let's say our simplified input rows look like this:

target, education, job

0, university.degree, technician

0, high.school, services

1, university.degree, admin

If we specify that the Cartesian transformation is to be applied to the categorical variables education and job fields, the resultant feature education_job_interaction will look like this:

target, education_job_interaction

0, university.degree_technician

0, high.school_services

1, university.degree_admin

The Cartesian transformation is even more powerful when it comes to working on sequences of tokens, as is the case when one of its arguments is a text variable that is implicitly or explicitly split into tokens. For example, consider the task of classifying a book as being a textbook or not. Intuitively, we might think that there is something about the book's title that can tell us it is a textbook (certain words might occur more frequently in textbooks' titles), and we might also think that there is something about the book's binding that is predictive (textbooks are more likely to be hardcover), but it's really the combination of some words in the title and binding that is most predictive. For a real-world example, the following table shows the results of applying the Cartesian processor to the input variables binding and title:

TextbookTitleBindingCartesian product of no_punct(Title) and Binding

1 Economics: Principles, Problems, Policies Hardcover {"Economics_Hardcover", "Principles_Hardcover", "Problems_Hardcover", "Policies_Hardcover"}
0 The Invisible Heart: An Economics Romance Softcover {"The_Softcover", "Invisible_Softcover", "Heart_Softcover", "An_Softcover", "Economics_Softcover", "Romance_Softcover"}
0 Fun With Problems Softcover {"Fun_Softcover", "With_Softcover", "Problems_Softcover"}

The following example shows how to apply the Cartesian transformer to var1 and var2:

cartesian(var1, var2)

 

데이터 변환 참조

주제

n-gram 변환

n-gram 변환은 텍스트 변수를 입력으로 가져오고 (사용자가 구성 가능한) n 단어 창을 슬라이딩하는 문자열을 생성하여 해당 프로세스에서 출력을 생성합니다. 예를 들어 "I really enjoyed reading this book"이라는 텍스트 문자열을 생각해 보겠습니다.

창 크기 = 1인 n-gram 변환을 지정하면 다음과 같이 해당 문자열에 있는 모든 개별 단어가 제공됩니다.

 

{"I", "really", "enjoyed", "reading", "this", "book"}

창 크기 = 2인 n-gram 변환을 지정하면 다음과 같이 모든 2단어 조합과 모든 1단어 조합이 제공됩니다.

 

{"I really", "really enjoyed", "enjoyed reading", "reading this", "this book", "I", "really", "enjoyed", "reading", "this", "book"}

창 크기 = 3인 n-gram 변환을 지정하면 이 목록에 3단어 조합을 추가하여 다음을 산출합니다.

 

{"I really enjoyed", "really enjoyed reading", "enjoyed reading this", "reading this book", "I really", "really enjoyed", "enjoyed reading", "reading this", "this book", "I", "really", "enjoyed", "reading", "this", "book"}

n-gram을 2~10개 단어 범위의 크기로 요청할 수 있습니다. 크기가 1인 n-gram은 데이터 스키마에서 텍스트로 표시된 유형의 모든 입력에 대해 암시적으로 생성되므로, 사용자가 요청할 필요가 없습니다. 마지막으로, n-gram은 공백 문자에 대한 입력 데이터를 분해하여 생성된다는 것을 기억해야 합니다. 예를 들어 구두점 문자는 다음과 같이 단어 토큰의 일부로 간주됩니다. 문자열 "red, green, blue"에 대해 2개의 창으로 n-gram을 생성하면 {"red,", "green,", "blue,", "red, green", "green, blue"}로 산출됩니다. 구두점 제거 프로세서(이 문서의 뒷부분에서 설명)를 사용하여 원하지 않는 구두점을 제거할 수 있습니다.

변수 var1에 대해 창 크기가 3인 n-gram을 계산하려면:

 

"ngram(var1, 3)"

Orthogonal Sparse Bigram(OSB) 변환

OSB 변환은 텍스트 문자열 분석을 보조하는 목적이며 bi-gram 변환(창 크기가 2인 n-gram)을 대체하는 변환입니다. OSB는 n 단어 크기의 창을 텍스트 위로 슬라이딩하고 창의 첫 번째 단어가 포함된 모든 단어 페어를 출력하여 생성됩니다.

각 OSB를 구축하기 위해 구성 단어는 "_"(밑줄) 문자로 결합되며, 건너뛴 모든 토큰은 OSB에 또 다른 밑줄을 추가하여 표시됩니다. 따라서 OSB는 창 내에 확인되는 토큰뿐만 아니라 동일한 창 내에서 건너뛴 토큰의 수도 표시합니다.

예를 들어 "The quick brown fox jumps over the lazy dog"라는 문자열과 크기가 4인 OSB를 생각해 보겠습니다. 여섯 개의 4 단어 창 및 문자열 끝에 있는 더 짧은 길이의 마지막 창은 다음 예제에서 각 창에서 생성된 OSB와 함께 표시됩니다.

창, {생성된 OSB}

 

"The quick brown fox", {The_quick, The__brown, The___fox} "quick brown fox jumps", {quick_brown, quick__fox, quick___jumps} "brown fox jumps over", {brown_fox, brown__jumps, brown___over} "fox jumps over the", {fox_jumps, fox__over, fox___the} "jumps over the lazy", {jumps_over, jumps__the, jumps___lazy} "over the lazy dog", {over_the, over__lazy, over___dog} "the lazy dog", {the_lazy, the__dog} "lazy dog", {lazy_dog}

Orthogonal Sparse Bigram은 일부 상황에서 효과적으로 작용할 수 있는 n-gram의 대체 변환입니다. 데이터에 큰 텍스트 필드(10개 이상의 단어)가 있는 경우 실험을 통해 효과적인 방식을 살펴봅니다. 큰 텍스트 필드를 구성하는 내용은 상황에 따라 다를 수 있음을 참고하십시오. 그러나 큰 텍스트 필드를 사용하는 OSB는 특수 건너뛰기 기호(밑줄)로 인해 텍스트를 고유하게 나타내는 것으로 실증되었습니다.

입력 텍스트 변수의 OSB 변환에 대해 2~10의 창 크기를 요청할 수 있습니다.

변수 var1에 대해 창 크기가 5인 OSB를 계산하려면:

"osb(var1, 5)"

소문자 변환

소문자 변환 프로세서는 텍스트 입력을 소문자로 변환합니다. 예를 들어 프로세서는 "The Quick Brown Fox Jumps Over the Lazy Dog"라는 입력을 "the quick brown fox jumps over the lazy dog"라고 출력합니다.

변수 var1에 소문자 변환을 적용하려면:

"lowercase(var1)"

구두점 변환 제거

Amazon ML은 공백이 있는 데이터 스키마의 텍스트로 표시된 입력을 암시적으로 분리합니다. 문자열의 구두점은 주변의 공백에 따라 인접한 단어 토큰으로 끝나거나 완전히 별개의 토큰으로 끝납니다. 이것이 바람직하지 않은 경우, 생성된 특성의 구두점을 제거하는 데 구두점 제거 변환을 사용할 수 있습니다. 예를 들어 "Welcome to AML - please fasten your seat-belts!"라는 문자열이 있으면 다음과 같은 토큰 집합이 암시적으로 생성됩니다.

 

{"Welcome", "to", "Amazon", "ML", "-", "please", "fasten", "your", "seat-belts!"}

구두점 제거 프로세서를 이 문자열에 적용하면 다음과 같은 집합이 됩니다.

 

{"Welcome", "to", "Amazon", "ML", "please", "fasten", "your", "seat-belts"}

접두사 및 접미사 구두점만 제거됩니다. 토큰 중간에 나타나는 구두점("seat-belts"에 있는 하이픈 등)은 제거되지 않습니다.

변수 var1에 구두점 변환을 적용하려면:

"no_punct(var1)"

Quartile binning 변환

Quantile binning 프로세서는 숫자 변수 및 bin number라는 파라미터의 두 가지 입력을 사용해서 카테고리 변수를 출력합니다. 그 목적은 관측된 값을 그룹화하여 변수의 배포에서 비선형성을 발견하는 것입니다.

많은 경우에 숫자 변수와 대상 간의 관계는 선형적이지 않습니다(숫자 변수 값은 대상에 따라 점차 증가하거나 감소하지 않음). 이 경우 다양한 범위의 숫자 특성을 나타내는 카테고리 특성으로 숫자 특성을 비닝하는 것이 유용할 수 있습니다. 각 카테고리 특성 값(빈)은 대상과의 선형 관계를 갖도록 모델링될 수 있습니다. 예를 들어 연속적인 숫자 특성 account_age가 책을 구입할 가능성과 선형적으로 관련이 없다는 것을 알고 있다고 가정해 보겠습니다. 사용자는 대상과의 관계를 더욱 정확하게 캡처할 수 있는 카테고리 특성으로 age를 비닝할 수 있습니다.

quantile binning 프로세서는 Amazon ML이 age 변수의 모든 입력 값 배포를 기반으로 동일한 크기의 빈 n개를 설정한 다음 각 번호를 빈을 포함하는 텍스트 토큰으로 대체하도록 하는 데 사용될 수 있습니다. 숫자 변수에 대한 최적의 빈 수는 변수의 특징과 대상과의 관계에 따라 달라지며, 이는 실험을 통해 가장 효과적으로 결정됩니다. Amazon ML은 제안된 레시피의 데이터 통계를 기반으로 숫자 특성에 대한 최적의 빈 수를 제시합니다.

숫자 입력 변수에 대해 5~1000개의 quantile 빈을 계산하도록 요청할 수 있습니다.

다음 예제에서는 숫자 변수 var1 대신 50개의 빈을 계산하여 사용하는 방법을 보여 줍니다.

"quantile_bin(var1, 50)"

정규화 변환

정규화 변환기는 평균 값이 0이고 분산 값이 1인 숫자 변수를 정규화합니다. 특성이 대상과 관련하여 많은 정보가 되는지 여부와 관계없이 가장 큰 크기의 변수가 ML 모델의 대부분을 차지할 수 있기 때문에, 숫자 변수의 정규화는 숫자 변수 사이에 범위 차이가 매우 큰 경우에 학습 프로세스에 도움이 될 수 있습니다.

숫자 변수 var1에 이 변환을 적용하려면 다음과 같이 레시피에 추가합니다.

normalize(var1)

이 변환기는 숫자 변수의 사용자 정의 그룹 또는 모든 숫자 변수(ALL_NUMERIC)의 사전 정의된 그룹을 입력으로 사용할 수 있습니다.

normalize(ALL_NUMERIC)

참고

숫자 변수에 정규화 프로세서를 사용하는 것은 필수가 아닙니다.

데카르트 곱 변환

데카르트 변환은 두 개 이상의 텍스트 또는 카테고리 입력 변수의 순열을 생성합니다. 이 변환은 변수 간에 상호 작용이 있다고 생각될 때 사용합니다. 예를 들어 자습서: Amazon ML을 사용한 마케팅 반응 예측에서 사용되는 은행 마케팅 데이터 집합을 고려해 보겠습니다. 이 데이터 집합을 사용하여 경제 및 인구 통계 정보를 기반으로 은행 홍보에 긍정적인 반응을 보이는지 예측하려고 합니다. 해당하는 사람의 직업 유형이 상당히 중요하다고 생각할 수 있으며(특정 분야에서 근무하는 것과 사용 가능한 비용 간에 상관 관계가 있을 수 있음), 가장 높은 수준의 교육을 받은 사실도 중요하다고 간주할 수 있습니다. 또한 이 두 변수의 상호 작용에 강력한 신호가 있다는 것도 알 수 있습니다. 예를 들어 특히 학사 학위를 취득한 사업가 고객에게 홍보하는 것이 적합합니다.

데카르트 곱 변환은 카테고리 변수 또는 텍스트를 입력으로 사용하고, 이러한 입력 변수 간의 상호 작용을 캡처하는 새로운 특성을 생성합니다. 특히, 각 교육 예제에 대해 특성의 조합을 생성하고 이를 독립적인 특성으로 추가합니다. 예를 들어 다음과 같은 간소화된 입력 행이 있다고 가정하겠습니다.

target, education, job

0, university.degree, technician

0, high.school, services

1, university.degree, admin

데카르트 변환이 카테고리 변수 education 및 job 필드에 적용되도록 지정하면 결과적으로 다음과 같은 education_job_interaction 특성을 볼 수 있습니다.

target, education_job_interaction

0, university.degree_technician

0, high.school_services

1, university.degree_admin

데카르트 변환은 인수 중 하나가 암시적으로 또는 명시적으로 토큰으로 분리되는 텍스트 변수 같은 토큰 시퀀스 작업에서 더욱 강력하게 작용합니다. 예를 들어 책을 교과서로 분류할지 여부에 대한 작업을 생각해 보겠습니다. 직관적으로, 교과서라고 말할 수 있는 책의 제목에 대해 생각할 수 있으며(특정 단어는 교과서의 제목에서 더 자주 나타날 수 있음), 책의 표지에 대해 예측 가능한 점이 있다고 생각할 수도 있지만(교과서는 하드 커버가 될 가능성이 더 큼), 실제로 제목과 표지에 있는 단어의 조합이야말로 가장 예측 가능합니다. 실제 사례에서 다음 표는 데카르트 프로세서를 입력 변수 표지 및 제목에 적용한 결과를 보여 줍니다.

교과서제목표지no_punct(제목) 및 표지의 데카르트 곱

1 Economics: Principles, Problems, Policies Hardcover {"Economics_Hardcover", "Principles_Hardcover", "Problems_Hardcover", "Policies_Hardcover"}
0 The Invisible Heart: An Economics Romance Softcover {"The_Softcover", "Invisible_Softcover", "Heart_Softcover", "An_Softcover", "Economics_Softcover", "Romance_Softcover"}
0 Fun With Problems Softcover {"Fun_Softcover", "With_Softcover", "Problems_Softcover"}

다음 예는 var1 및 var2에 대해 데카르트 변환기를 적용하는 방법을 보여 줍니다.

cartesian(var1, var2)

반응형


반응형

제 블로그의 IoT - AI 섹션에 Elements of AI 로 시작하는 모든 글들은 헬싱키 대학의 인공지능 온라인 수업을 번역해 놓은 겁니다.


이 온라인 수업은 무료이고 핀란드에 있는 대학에서는 정식 학점으로 인정되는 코스입니다. 코스를 완료해서 Certification을 따면 말이죠.


핀란드에 있지 않아도 LinkedIn 의 자격증 란에 넣을 수 있으니까 구직 활동시 조금이라도 도움이 되지 않을까요?


이 코스를 다 마치면 아래와 같은 자격증을 받게 됩니다.






모두 영어로 되어 있어서 영어를 모르면 따라가기 힘들 수 있습니다.

그럴 때 제가 번역해 놓은 글들을 읽으시면서 이해하시면 도움이 될 겁니다.


그 글들만 이해 된다면 수업을 따라가는데는 크게 어려움은 없습니다.

그리고 수업을 다 끝마치면 인공지능에 대해 어느 정도 이해력이 올라갈 겁니다.

물론 강좌 수준은 전문가용이 아니라 일반 대중에게 필요한 인공지능 지식을 쉽게 설명하는 내용들 입니다.


6주 동안 공부하면서 제가 이해하기 위해 번역해서 하나 하나 올렸습니다.

올리고 나니 이 강좌를 수강을 원하는 다른 분들에게도 도움이 될 것 같아서 이렇게 소개 글을 추가해서 올리게 됐습니다.


총 6개 챕터가 있고 각 챕터당 3개의 강좌가 있으니까 총 18개의 강좌가 있습니다.

그리고 각 강좌 마지막에 한 두개 많게는 4개의 문제가 있습니다.


전체 강좌 중 90%를 완료하고 전체 문제 중 50% 이상을 맞추면 자격증을 받게 됩니다.


서술형 주관식이 있는데 딱히 어느 언어로 작성하라는 얘기는 없지만 영어로 작성하는게 좋을 겁니다.

(핀란드어로 작성한 사람도 봤습니다.)

이 주관식 문제는 학생들이 서로서로 평가하도록 돼 있습니다.

웬만큼 성의있게 쓰면 다 정답으로 인정합니다. 

그러니까 전체 문제 중 50% 이상 맞추는 건 아주 쉽습니다.


아래 링크를 클릭하시면 해당 강좌에 등록할 수 있습니다.




Elements of AI




한번 도전하셔서 외국 대학 과목도 수료해 보시고 헬싱키 대학 과목 수료증도 받아 보시고 인공지능에 대한 이해도 높여 보세요.





내용들은 전부 이론적인 것들이라 실제 인공지능 관련한 어플리케이션을 개발해 보시고 싶은 분들은 아마존의 DeepLens 를 추천합니다. 








이 DeepLens는 아마존의 인공지능 API를 사용해 Deep Learning 어플리케이션 개발을 직접 해 볼 수 있도록 하는 제품입니다. 


일반 소비자를 대상으로 하는게 아니라 인공지능을 배우고 싶어하는 개발자들을 대상으로 한 상품입니다.


이 DeepLens를 이용해 물체를 인식하는 앱, 개인지 고양이인지 구분하는 앱, 사람의 얼굴을 감지하는 앱 등 여러가지 응용 프로그램을 쉽게 개발하실 수 있습니다.  





가격은 $249 이고 아래 링크를 통해서 구입하시면 제게 도움이 됩니다. :)




AWS DeepLens - Deep learning enabled video camera for developers


아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.



저도 이 온라인 강좌를 들으면서 알게 된 건데 외국 대학에서 인공지능 관련 무료 온라인 수업을 진행하는 경우가 많이 있더라구요.


시간 나는대로 다른 강좌도 도전해 볼 생각입니다.


이 헬싱키 대학 강좌는 인공지능에 관심은 있지만 별로 알지는 못하고 실제 개발 경험도 없지만 인공지능에 대해 알고 싶고 여건이 되면 그쪽에서 일하고 싶은 분들에게 적극 추천드립니다.


반응형

Elements of AI - Summary

2018. 6. 29. 05:25 | Posted by 솔웅


반응형

Elements of AI




III.Summary



The most important decisions that determine how well our society can adapt to the changes brought by AI aren’t technological. They are political.


AI가 가져올 변화에 우리 사회가 얼마나 잘 적응할 수 있는지를 결정하는 가장 중요한 결정은 기술적 인 것이 아닙니다. 그것은 정치적인 것입니다.



Everything that we have learned about AI suggests that the future is bright. We will get new and better services and increased productivity will lead to positive overall outcomes - but only on the condition that we carefully consider the societal implications and ensure that the power of AI is used for the common good.



AI에 관해 우리가 배운 모든 것은 미래가 밝다는 것을 알려 줍니다. 우리는 새롭고 더 나은 서비스를 얻게 될 것이며 생산성이 향상되면 전반적인 결과가 긍정적이 될 것입니다. 그러나 우리가 사회에 미치는 영향을 신중하게 고려하고 AI의 힘이 공동선에 사용되도록 보장해야만합니다.






What we need to do to ensure a positive outcome


Still, we have a lot of work to do.

우리는 아직 해야 될 일들이 많이 있습니다.


  • We need to avoid algorithmic bias to be able to reduce discrimination instead of increasing it.
  • We also need to learn to be critical about what we see, as seeing is no longer the same as believing - and develop AI methods that help us detect fraud rather than just making it easier to fabricate more real-looking falsehoods.
  • We need to set up regulation to guarantee that people have the right to privacy, and that any violations of this right are strictly penalized.
- algorithmic bias를 피해 차별을 늘리지 않고 줄일 수 있도록 노력해야 합니다. 
- 우리는 우리가 무엇을 보고 있는지에 대해 좀 더 비판적이 될 수 있게 노력하는 것이 필요합니다. 보이는 것 그대로 믿을 수 있지 않습니다. 거짓을 그럴듯 하게 진짜로 보이도록 하는 것 보다 거짓을 탐지하는데 도움이 되는 AI methods를 개발해야 합니다. 
- 우리는 사람들이 사생활 침해에 대한 권리를 갖도록 보장하고 이 권리 침해에 대해 엄격하게 처벌해야한다는 규정을 마련해야합니다.


We also need to find new ways to share the benefits to everyone, instead of creating an AI elite, those who can afford the latest AI technology and use it to access unprecedented economic inequality. This requires careful political judgment. (Note that by political judgment, we mean decisions about policy, which has little to do with who votes for whom in an election or the comings and goings of individual politicians and political parties.)


우리는 모두에게 인공지능을 통한 발전의 혜택을 공유할 수 있는 새로운 방법을 찾을 필요가 있습니다. 최신 인공 지능 기술을 사용할 수 있고 전례없는 경제적 불평등을 만들어 나갈 AI 엘리트를 만들어 내는 대신에 말이죠. 이를 위해서는 신중한 정치적 판단이 필요합니다. (정치적 판단이란 선거에서 누구에게 투표했는지 혹은 어떤 정치인이나 정당이 출현해야 되는지와 관련된 것이 아니라 정책 결정을 의미하는 겁니다.)



Note

The importance of policy

The most important decisions that determine how well our society can adapt to the evolution of work and to the changes brought by AI aren’t technological. They are political.


우리 사회가 인공지능이 불러올 일의 진화나 변화에 어떻게 잘 적응해 나갈것인지와 관련해 가장 중요한 것은 기술적인 측면이 아니라 정치적인 문제 입니다. 

The regulation of the use of AI must follow democratic principles, and everyone must have an equal say about what kind of a society we want to live in in the future. The only way to make this possible is to make knowledge about technology freely available to all. Obviously there will always be experts in any given topic, who know more about it than the rest of us, but we should at least have the possibility to critically evaluate what they are saying.


인공 지능의 사용에 대한 규제는 민주주의 원칙을 따라야하며 모든 사람들이 앞으로 어떤 종류의 사회에 살기를 바라는 가에 대한 의견을 평등하게 담아야 합니다. 이를 가능하게 하는 유일한 방법은 기술에 대한 지식을 모든 사람이 자유롭게 이용할 수 있게하는 것입니다. 분명히 주어진 주제에 대한 전문가가 있을 것이며 그들은 우리보다 더 많이 알고있을 것입니다. 하지만 우리는 적어도 그들이 말하는 것을 비판적으로 평가할 수있는 가능성(능력)이 있어야합니다.



What you have learned with us supports this goal by providing you the basic background about AI so that we can have a rational discussion about AI and its implications.


우리와 함께 배운 것은 인공 지능에 대한 기본 배경을 제공함으로써 우리가 인공지능과 그 의미에 대해 합리적으로 토론할 수 있도록 돕기 위해서 입니다.




Our role as individuals


As you recall, we started this course by motivating the study of AI by discussing prominent AI applications that affect all our lives. We highlighted three examples: self-driving cars, recommendation systems, and image and video processing. During the course, we have also discussed a wide range of other applications that contribute to the current technological transition.


여러분이 공부한 것들은, 우리 삶 전체에 영향을 미치는 중요한 AI applications를 논의함으로써 AI 연구에 동기를 부여하기 위해 이 코스를 시작했습니다. 우리는 세 가지 예를 살펴 보았습니다 :자율 주행 차량, 추천 시스템, 이미지 및 비디오 프로세싱. 그 과정에서 우리는 현재의 기술 전환에 기여하는 다양한 응용 프로그램에 대해서도 논의했습니다.


Note

Hidden agenda

We also had a hidden agenda. We wanted to give you an opportunity to experience the thrill of learning, and the joy of heureka moments when something that may have been complicated and mysterious, becomes simple and if not self-evident, at least comprehensible. These are moments when our curiosity is satisfied. But such satisfaction is temporary. Soon after we have found the answer to one question, we will ask the next. What then? And then?


우리에게는 숨겨진 의제도 있었습니다. 우리는 당신에게 학습의 스릴을 경험할 수 있는 기회를 드리고 싶었습니다. 그리고 복잡하고 미스테리한 어떤 문제를 단순화하고 뚜렷하게 알지는 못하더라도 적어도 이해는 할 수 있는 그런 heureka moments의 즐거움을 드리고 싶었습니다. 그것들은 바로 호기심이 만족되는 순간일 겁니다. 그러나 그러한 만족은 일시적입니다. 한 가지 질문에 대한 답을 얻은 후에 우리는 그 다음 질문을 할 것입니다.

If we have been successful, we have whetted your appetite for learning. We hope you will continue your learning by finding other courses and further information about AI, as well as other topics of your interest. To help you with your exploration, we have collected some pointers to AI material that we have found useful and interesting.


우리가 성공을 했다면, 당신은 더 배우고 싶은 마음이 들었을 겁니다. 우리는 당신이 인공지능에 대한 다른 과목 (코스)나 더 진전된 정보를 찾는 배움의 과정을 계속 이어 나가기를 바랍니다. 여러분의 탐험을 돕기 위해 우리는 유용하고 흥미로운 AI 자료에 대한 몇 가지 pointer들을 수집했습니다.



Now you are in a position where you can find out about what is going on in AI, and what is being done to ensure its proper use. You should do so, and whenever you feel like there are risks we should discuss, or opportunities we should go after, don't wait that someone else reacts


이제 AI에서 무슨 일이 일어나고 있는지, 올바른 사용을 위해 무엇이 이루어지고 있는지 알게 되었습니다. 여러분은 그렇게해야 합니다, 그리고 언제든지 리스크가 있다고 느껴지면 그것에 대해 논의해야 합니다. 그리고 더 발전할 기회가 있다고 생각할 때마다 다른 사람이 어떻게 반응하는지 기다리지 말고 앞으로 나아가고 논의해 나가야 합니다.



아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.





Exercise 26: AI in your life


How do you see AI affecting you in the future, both at work and in everyday life? Include both the positive and possible negative implications.


AI가 직장과 일상 생활에서 미래에 어떻게 영향을 미치는가? 가능한 긍정적 , 부정적 영향을 모두를 포함해 답하시오.



This is not the end. This is the beginning.



That's it for now. We thank you for joining us. This has been a great adventure for us, and we really hope that you enjoyed it too. We are not yet finished with the course, and I believe we will never be. We will keep doing our best updating and improving it, and making it the best AI MOOC in the world.


현재로서는 여기까지 입니다. 우리와 함께 해 주셔서 감사합니다.  이것은 우리에게 커다란 모험이었습니다. 우리는 당신이 이 과정을 즐겼기를 정말로 희망합니다. 우리는 아직 코스를 마친 것이 아니며, 결코 그렇게 될 수 없다고 생각합니다. 기 세계 최고의 AI MOOC로 만들 것입니다.


Like the course isn't finished, you shouldn't think that your exploration of AI is finished either. The progress is quite rapid and it may seem too much to keep track of, but the comforting news is that the basic principles have stayed more or less the same decade after decade. As long as you know the basics about problem-solving strategies, handling uncertainty, and learning from data, you should be able to easily put new things into perspective. This is why you had to draw diagrams with chickens crossing rivers, Towers of Hanoi, why you had to calculate the probability of rain in Helsinki, or detect detect happy faces by a neural network. Knowing the fundamentals, or the elements of AI, is much longer lasting knowledge than learning the technical details of a particular AI solution.


과정이 끝나지 않은 것처럼, AI 탐구가 끝났다고 생각하지 않아야합니다. 진행 상황이 매우 빠르며 추적하기에는 너무 많은 것처럼 보일 수 있지만 여러분에게 들려드릴 좋은 소식은 인공지능의 기본 원칙이 10 년 이 지나는 동안에도 거의 동일하게 유지되었다는 것입니다. 문제 해결 전략, 불확실성 처리 및 데이터 학습에 대한 기본 사항을 알고있는 한 새로운 관점을 쉽게 파악할 수 있게 됩니다. 그래서 하노이의 Towers of Hanoi, 헬싱키에서 비가 올 확률 계산, 신경망으로 행복한 얼굴을 탐지하기 등의 공부를 한 이유가 그것입니다. 


Below we give a few pointers that we have found useful. Keep learning, stay curious.

아래에서는 유용하다고 생각되는 몇 가지 지침을 제공합니다. 계속 배우고 항상 호기심을 가지세요.


"The future has not been written. There is no fate but what we make for ourselves." (John Connor)


"미래는 기록되지 않았다. 정해진 운명이란 없다 우리가 스스로 만들어 나가는 것이다." (존 코너)




After completing Chapter 6 you should be able to:



  • Understand the difficulty in predicting the future and be able to better evaluate the claims made about AI
  • Identify some of the major societal implications of AI including algorithmic bias, AI-generated content, privacy, and work







반응형

Elements of AI - The societal implications of AI

2018. 6. 29. 00:25 | Posted by 솔웅


반응형

Elements of AI




II.The societal implications of AI





In the very beginning of this course, we briefly discussed the importance of AI in today’s and tomorrow’s society but at that time, we could do so only to a limited extent because we hadn’t introduced enough of the technical concepts and methods to ground the discussion on concrete terms.


이 과정의 초반부에 우리는 현재와 미래 사회에서의 AI의 중요성에 대해 간략히 논의 했었지만 그 때 우리는 기술적 인 개념과 방법을 충분히 학습하지 않았기 때문에 제한된 범위 내에서만 이야기 할 수 있었습니다. 확실한 용어 (terms)를 사용하면서 튼실한 토론을 하지는 못했습니다.



Now that we have a better understanding of the basic concepts of AI, we are in a much better position to take part in rational discussion about the implications of already the current AI.



이제 우리는 AI의 기본 개념을 더 잘 이해 했으므로 현재 AI의 의미에 대한 합리적 토론에 참여하는 것이 가능해 졌습니다.




Implication 1: Algorithmic bias


AI, and in particular, machine learning, is being used to make important decisions in many sectors. This brings up the concept of algorithmic bias. What it means is the embedding of a tendency to discriminate according ethnicity, gender, or other factors when making decisions about job applications, bank loans, and so on.



인공 지능, 특히 machine learning은 많은 부문에서 중요한 결정을 내리는 데 사용되고 있습니다. 이것은 알고리즘 바이어스의 개념을 불러옵니다. 이것이 의미하는 바는 구직활동이나 은행 대출등을 할 때 인종, 성별 혹은 다른 요소에 근거해 차별하는 경향이 영향을 미치고 있다는 것입니다. 




Note

Once again, it’s all about the data

The main reason for algorithmic bias is human bias in the data. For example, when a job application filtering tool is trained on decisions made by humans, the machine learning algorithm may learn to discriminate against women or individuals with a certain ethnic background. Notice that this may happen even if ethnicity or gender are excluded from the data since the algorithm will be able to exploit the information in the applicant’s name or address.


algorithmic bias (알고리즘 편향) 의 주요 이유는 데이터내의 human bias (인간의 편견) 입니다. 예를 들어, 구직 프로그램 필터링 도구가 사람이 내린 결정에 대해 교육을 받는 경우, machine learning algorithm 이 여성이나 특정 인종적 배경을 가지고 있는 개인들을 차별하는 것도 배우고 있을 거라는 겁니다. 알고리즘이 신청자의 이름이나 주소에 있는 정보를 통해서 유추할 수 있기 때문에 인종이나 성별이 데이터에서 제외 된 경우에도 이러한 일이 발생할 수 있습니다.



Algorithmic bias isn't a hypothetical threat conceived by academic researchers. It's a real phenomenon that is already affecting people today.


알고리즘 편향은 학술 연구자가 생각해 낸 가상의 위협이 아닙니다. 그것은 오늘날 사람들에게 이미 영향을 미치고있는 실제 현상입니다.



Online advertising


It has been noticed that online advertisers like Google tend to display ads of lower-pay jobs to women users compared to men. Likewise, doing a search with a name that sounds African American may produce an ad for a tool for accessing criminal records, which is less likely to happen otherwise.



Google과 같은 온라인 광고주는 남성보다 여성 사용자에게 저임금 광고를 게재하는 경향이 있음을 알게되었습니다. 마찬가지로 아프리카 계 미국인이라고 추정할 수 있는 이름으로 검색하면 범죄 기록에 접근하기 위한 도구에 대한 광고가 생성 될 수 있습니다.



Social networks


Since social networks are basing their content recommendations essentially on other users’ clicks, they can easily lead to magnifying existing biases even if they are very minor to start with. For example, it was observed that when searching for professionals with female first names, LinkedIn would ask the user whether they actually meant a similar male name: searching for Andrea would result in the system asking “did you mean Andrew”? If people occasionally click Andrew’s profile, perhaps just out of curiosity, the system will boost Andrew even more in subsequent searched.



소셜 네트워크는 본질적으로 다른 사용자의 클릭을 기반으로 컨텐츠 추천을하기 때문에 처음 시작한 초보자에게도 현재 존재하는 편견이 있는 정보를 우선 전달하게 되어 기존의 편견이 쉽게 확대 재생산 될 수 있습니다. 예를 들어, 여성 이름을 가진 전문가를 검색 할 때 LinkedIn은 사용자에게 실제로 유사한 남성 이름을 의미하는지 여부를 묻습니다. Andrea를 검색하면 시스템에서 "Andrew를 의미 했습니까?"라고 묻습니다. 그래서 만약 사람들이 Andrew의 프로파일을 클릭한다면 (아마 호기심 때문이라도...) 시스템은 사람들이 간혹 앤드류의 프로필을 클릭하는 경우가 있습니다. 아마 호기심 때문에 시스템은 Andrew를 연관 검색어로 나올 확률을 더욱 향상 시킬 것입니다.



There are numerous other examples we could mention, and you have probably seen news stories about them. The main difficulty in the use of AI and machine learning instead of rule-based systems is their lack of transparency. Partially this is a consequence of the algorithms and the data being trade secrets that the companies are unlikely to open up for public scrutiny. And even if they did this, it may often be hard to identify the part of the algorithm or the elements of the data that lead to discriminating decisions.



우리가 언급 할 수있는 수많은 다른 예가 있으며, 당신은 아마 그것들에 대한 뉴스 기사를 보았을 것입니다. 규칙 기반 시스템(rule-based systems) 대신 인공 지능과 machine learning을 사용하는 데 있어 가장 큰 어려움은 투명성 부족입니다. 회사들은 자신들의 알고리즘과 자신들이 사용했던 데이터에 대한 정보를 비밀로 분류해 public scrutiny (공개조사)에 오픈하는 것을 꺼립니다. 그들이 공개조사에 응하더라도 차별을 유도하는 알고리즘이나 데이터들을 구분해 내는 작업은 어려운 작업입니다. 



Note

Transparency through regulation?

A major step towards transparency is the European General Data Protection Regulation (GDPR). It requires that all companies that either reside within the European Union or that have European customers must: 

  • Upon request, reveal what data they have collected about any individual (right of access)
  • Delete any such data that is not required to keep with other obligations when requested to do so (right to be forgotten)
  • Provide an explanation of the data processing carried out on the customer’s data (right to explanation)

투명성을 향한 가장 메이저한 움직임은 uropean General Data Protection Regulation (GDPR) -유럽 일반 데이터 보호 규정- 입니다. 유럽 연합 내에 거주하거나 유럽 고객이있는 모든 회사는 다음을 수행해야합니다.

- 요청이있을 때, 어떤 개인에 대해 수집 한 데이터를 공개해야한다. (접근 권리)

- 요청이 있을 시 다른 의무조항을 지키는 데 위배가 되지 않은 경우 요청한 데이터를 삭제해야 한다 (잊혀질 권리)

- 고객의 데이터에 대해 수행 된 데이터 처리에 대한 설명을 제공 해야 한다 (설명을 들을 권리)



The last point means, in other words, that companies such as Facebook and Google, at least when providing services to European users, must explain their algorithmic decision making processes. It is, however, still unclear what exactly counts as an explanation. Does for example a decision reached by using the nearest neighbor classifier (Chapter 4) count as an explainable decision, or would the coefficients of a logistic regression classifier be better? How about deep neural networks that easily involve millions of parameters trained using terabytes of data? The discussion about the technical implementation about the explainability of decisions based on machine learning is currently intensive. In any case, the GDPR has potential to improve the transparency of AI technologies.



마지막으로, 페이스북이나 구글과 같은 회사는 적어도 유럽 사용자에게 서비스를 제공 할 때 알고리즘 결정 과정을 설명해야한다는 것을 의미합니다. 그러나 정확히 무엇이 설명인지는 아직 불분명합니다. 예를 들어 nearest neighbor classifier (4 장)를 사용하여 그 결론에 도달했다 라는 설명이 충분한 걸까요? 혹은 logistic regression classifier 의 계수를 사용한 경우가 더 좋은 경우일까요? 테라 바이트의 데이터를 사용하여 trained 된 수백만 개의 매개 변수를 포함하는 deep neural networks는 어떻습니까? machine learning에 기반한 의사 결정의 설명 가능성에 대한 기술적 구현에 대한 논의는 현재 집중적으로 이루어지고 있습니다. 어쨌든 GDPR은 인공 지능 기술의 투명성을 향상시킬 잠재력이있습니다.




Implication 2: Seeing is believing — or is it?


We are used to believing what we see. When we see a leader on the TV stating that their country will engage in a trade-war with another country, or when a well-known company spokesperson announces an important business decision, we tend to trust them better than just reading about the statement second-hand from the news written by someone else.



우리는 우리가 보는 것을 믿는 데 익숙합니다. TV에서 국가에서 다른 나라와의 무역 전쟁에 관여 할 것이라는 지도자를 보거나 잘 알려진 회사 대변인이 중요한 비즈니스 결정을 발표 할 때 우리는 그 성명서를 다른사람에 의해 걸려져서 나온 뉴스를 읽는 것보다 더 잘 신뢰하는 경향이 있습니다 



Similarly, when we see photo evidence from a crime scene or from a demonstration of a new tech gadget, we put more weight on the evidence than on written report explaining how things look.



마찬가지로 우리가 범죄 현장에서 사진 증거를 보거나 새로운 기술 장치를 시연 할 때, 우리는 사물이 어떻게 보이는지에 대한 서면 보고서 보다는 실제 증거에 더 많은 비중을 두고 있습니다.



Of course, we are aware of the possibility of fabricating fake evidence. People can be put in places they never visited, with people they never met, by photoshopping. It is also possible to change the way things look by simply adjusting lighting or pulling one’s stomach in in cheap before–after shots advertising the latest diet pill.



물론, 우리는 가짜 증거를 만들 수 있다는 것을 알고 있습니다. 한번도 만난 적이 없는 사람들과 결코 만나지 않은 장소에서 찍은 사진을 뽀샵으로 만들 수 있습니다.  가장 최근의 다이어트 알약을 광고하는 싸구려  before–after 촬영 시 조명을 조절하거나 뱃살을 잡아 당김으로써 변화된 것처럼 보이게 할 수 있습니다. 




Note

AI is taking the possibilities of fabricating evidence to a whole new level:


Face2Face is a system capable of identifying the facial expressions of a person and putting them on another person’s face in a Youtube video.

Lyrebird is a tool for automatic imitation of a person’s voice from a few minutes of sample recording. While the generated audio still has a notable robotic tone, it makes a pretty good impression.


Face2Face는 사람의 얼굴 표정을 식별하고 Youtube 비디오에 다른 사람의 얼굴에 넣을 수있는 시스템입니다.


Lyrebird는 몇 분동안의 샘플 녹음을 토대로 사람의 목소리를 자동으로 모방하는 도구입니다. 생성 된 오디오는 여전히 로봇 목소리라는 것을 알아 차릴 수 있을 정도이긴 하지만 꽤 잘 모방합니다.




AWS DeepLens - Deep learning enabled video camera for developers

아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.

Implication 3: Changing notions of privacy



It has been long known that technology companies collect a lot of information about their users. Earlier it was mainly grocery stores and other retailers that collected buying data by giving their customers loyalty cards that enable the store to associate purchases to individual customers.



technology companies가 사용자에 관한 많은 정보를 수집한다는 것은 오래 전부터 알려져 왔습니다. 이전에는 주로 식료품점 및 기타 소매 업체가 멤버쉽 카드를 통해 고객의 구매 데이터를 수집했습니다. 



Note

Unprecedented data accuracy

The accuracy of the data that tech companies such as Facebook, Google, Amazon and many others is way beyond the purchase data collected by conventional stores: in principle, it is possible to record every click, every page scroll, and the time you spend viewing any content. Websites can even access your browsing history, so that unless you use the incognito mode (or the like) after browsing for flights to Barcelona on one site, you will likely get advertisements for hotels in Barcelona.


페이스북, 구글, 아마존 그리고 다른 많은 tech 회사 에서 기존 구매 데이터를 통한 데이터 수집을 훨씬 웃도는 데이터의 정확성을 가지고 있습니다. :   모든 클릭, 모든 페이지 스크롤 및 콘텐츠를 보고 있는 시간 등을 수집하고 있습니다. 웹 사이트는 인터넷 사용 기록(browsing history)에도 액세스 할 수 있으므로 한 사이트에서 바르셀로나로 항공편을 탐색 한 후에 시크릿 모드 (또는 이와 유사한 방식)를 사용하지 않으면 바르셀로나에 있는 호텔에 대한 광고가 표시 될 수 있습니다.



However, as such the above kind of data logging is not yet AI. The use of AI leads new kinds of threats to our privacy, which may be harder to avoid even if you are careful about revealing your identity.



그러나 이러한 종류의 데이터 logging은 아직 AI가 아닙니다. AI를 사용하면 개인 정보에 대한 새로운 종류의 위협이 생기고 신원을 밝히지 않도록 주의를 기울여도 피하기가 어려울 수 있습니다.




Using data analysis to identify individuals



A good example of a hard-to-avoid issue is de-anonymization, breaking the anonymity of data that we may have thought to be safe. The basic problem is that when we report the results of an analysis, the results may be so specific that they make it possible to learn something about individual users whose data is included in the analysis. A classic example is asking for the average salary of people born in the given year and having a specific zip code. In many cases, this could be a very small group of people, often only one person, so you’d be potentially giving data about a single person’s salary.



피할 수없는 문제 (hard-to-avoid)의 좋은 예로는 익명성이 없어지는 것입니다. 데이터의 익명성을 없앰으로서 안전하다고 생각할 수 있을 것입니다. 기본적인 문제는 분석 결과를 보고 할 때 결과가 너무 구체적이어서 분석에 데이터가 포함 된 개별 사용자에 대해 뭔가를 알아 낼 수 있다는 것입니다. 전형적인 예는 해당 연도에 출생 하고 특정 우편번호에 주소지가 있는 사람들의 평균 급여를 물어보는 것입니다. 많은 경우, 이렇게 하면 매우 작은 그룹의 사람들이 그 대상이 될 수 있고, 종종 한 사람 만이 해당 될 수 있으므로 한 사람의 급여에 대한 데이터를 잠재적으로 제공 할 수 있는 겁니다.



An interesting example of a more subtle issue was pointed out by researchers at the University of Texas at Austin. They studied a public dataset made available by Netflix containing 10 million movie ratings by some 500,000 anonymous users, and showed that many of the Netflix users can actually be linked to user accounts on the Internet Movie Database because they had rated several movies on both applications. Thus the researchers were able to de-anonymize the Netflix data. While you may not think it's big deal whether someone else knows how you rated the latest Star Wars movie, some movies may reveal aspects of our lives (such as politics or sexuality) which we should be entitled to keep private.



더 미묘한 문제에 대한 재미있는 예가 텍사스 오스틴 대학 (University of Texas)의 연구원들에 의해 지적되었습니다. 그들은 50만명의 익명 사용자들이 영화에 대해 매긴 1천만개의 등급 자료를 포함한 Netflix의 공개 데이터세트들에 대해 연구했습니다. 연구 결과 Internet Movie Database를 통해 많은 Netflix 사용자 들의 user accounts 로 링크가 가능했습니다. 그 이유는 그들은 그 두개의 어플리케이션에서 여러 영화에 대해 등급을 매겼기 때문입니다. 그렇게 해서 연구원들은 Netflix 데이터의 익명성을 깨뜨릴 수 있었습니다. 아마 당신은 스타워즈 최신작에 대한 당신의 평가 등릅 자료가 다른 사람들에게 알려진다는 것을 그렇게 대수롭지 않게 생각할 수 있습니다. 그렇지만 어떤 종류의 영화들에 대한 평가 등급은 (예를 들어 정치나 sexuality에 관한 영화) 지키고 싶은 사적 비밀이 밝혀질 수 있습니다. 




Other methods of identification


A similar approach could in principle used to match user accounts in almost any service that collects detailed data about user behaviors. Another example is typing patterns. Researchers at the University of Helsinki have demonstrated that users can be identified based on their typing patterns: the short intervals between specific keystrokes when typing text. This can mean that if someone has access to data on your typing pattern (maybe you have used their website and registered by entering your name), they can identify you the next time you use their service even if you’d refuse to identify yourself explicitly. They can also sell this information to whoever wants to buy it.



비슷한 방식을 사용하여 원칙적으로 사용자 행동에 대한 상세한 데이터를 수집하는 거의 모든 서비스에서 사용자 계정을 일치시킬 수 있습니다. 또 다른 예는 타이핑 패턴입니다. 헬싱키 대 (University of Helsinki)의 연구원들은 사용자가 타이핑 패턴에 의해 식별 될 수 있음을 보여주었습니다. 텍스트를 입력 할 때 특정 키들 입력 사이의 짧은 간격을 측정함으로서 타이핑 패턴을 규정하게 됩니다. 즉, 누군가 자신의 웹 사이트를 사용하고 자신의 이름을 입력하여 등록한 입력 패턴의 데이터에 액세스 할 수있는 경우 다음에 그 사용자가 명시적으로 자신의 신원을 밝히기를 거부하더라도 서비스를 사용할 때 그 사용자를 식별 할 수 있는겁니다. 또한 이 정보를 구매하려는 사람에게이 정보를 판매 할 수도 있습니다.



While many of the above examples have come as at least in part as surprises — otherwise they could have been avoided — there is a lot of ongoing research trying to address them. In particular, an area called differential privacy aims to develop machine learning algorithms that can guarantee that the results are sufficiently coarse to prevent reverse engineering specific data points that went into them.



위의 사례 들은 놀라움으로 다가왔을 겁니다. 다른 사례들에 대한 많은 연구들이 진행되고 있습니다. 특히 machine learning algorithms 개발을 위한 차등 개인 정보 보호 ( differential privacy aims)라고하는 영역에서는 that can guarantee that the results are sufficiently coarse to prevent reverse engineering specific data points that went into them.





Implication 4: Changing work


When an early human learned to use a sharp rock to crack open bones of dead animals to access a new source of nutrition, time and energy was released for other purposes such as fighting, finding a mate, and making more inventions. The invention of the steam engine in the 1700s tapped into an easily portable form of machine power that greatly improved the efficiency of factories as well as ships and trains. Automation has always been a path to efficiency: getting more with less. Especially since the mid 20th century, technological development has lead to a period of unprecedented progress in automation. AI is a continuation of this progress.



초기 인간은 날카로운 돌을 사용하여 죽은 동물의 뼈를 해체해 새로운 영양 공급원에 접근하는 것을 배웠고, 그러고 난 후의 시간과 에너지로 싸우거나 배우자를 찾고 또는 새로운 발명품을 만드는 그런 목적을 이루는 데 사용했습니다. 1700 년대 증기 엔진의 발명은 선박 및 열차뿐만 아니라 공장의 효율성을 크게 향상시킨 쉽게 운반 할 수 있는 형태의 기계 동력을 활용했습니다. 자동화는 항상 효율성을 위한 길이었습니다. 특히 20 세기 중반 이래로 기술 개발은 자동화 분야에서 전례없는 발전의 시기로 이어졌습니다. 인공 지능은 이러한 진보의 연속선 상에 있는 것입니다. 



Each step towards better automation changes the working life. With a sharp rock, there was less need for hunting and gathering food; with the steam engine, there was less need for horses and horsemen; with the computer, there is less need for typists, manual accounting, and many other data processing (and apparently more need for watching cat videos). With AI and robotics, there is even less need for many kinds of dull, repetitive work.



더 나은 자동화를 향한 각 단계는 working life를 변화시킵니다. 날카로운 돌로 인해 사냥하거나 음식을 모으는 일의 노동력이 줄었습니다. 증기기관으로 인해 말과 마부의 필요성도 줄어 들었습니다. 컴퓨터로 인해 타이피스트나 수동으로 계산하는 회계 업무 그리고 다른 많은은 데이터 처리 업무량도 줄었습니다. (대신 고양이 비디오를 보는 수요가 커졌죠). 인공지능과 로봇으로 단순하고 반복적인 업무 같은 노동량이 줄어들고 있습니다. 



Note

A history of finding new things to do

In the past, every time one kind of work has been automated, people have found new kinds to replace it. The new kinds of work are less repetitive and routine, and more variable and creative. The issue with the current rate of advance of AI and other technologies is that during the career of an individual, the change in the working life might be greater than ever before. It is conceivable that some jobs such as driving a truck or a taxi, may disappear within a few years’ time span. Such an abrupt change could lead to mass unemployment as people don’t have time to train themselves for other kinds of work.


과거에는 한 종류의 작업이 자동화 될 때마다 사람들은 그 일을 대체할 수 있는 새로운 종류의 작업을 발견했습니다. 새로운 종류의 일은 반복적이고 일상적이지 않으며, 더 다양하고 창조적입니다. AI 및 기타 기술의 발전 속도에 관한 현안은 개인 경력에 있어 근무 환경의 변화가 과거 어느 때보다 커질 수 있다는 것입니다. 트럭이나 택시 운전과 같은 일부 직업은 몇 년 내에 사라질 수 있습니다. 이러한 급격한 변화는 사람들이 다른 종류의 일을 위해 스스로 훈련 할 시간이 없기 때문에 대량 실업을 초래할 수 있습니다.

The most important preventive action to avoid huge societal issues such as this is to help young people obtain a wide-ranging education. This that provides a basis for pursuing many different jobs and which isn’t in high risk of becoming obsolete in the near future.


이와 같은 거대한 사회적 문제를 피하기 위한 가장 중요한 예방 조치는 청소년들이 폭 넓은 교육을 받을 수 있도록 돕는 것입니다. 그렇게 함으로서 가까운 장래에 사라지게 될 위험이 적지 않은 여러 직업들에 대한 판단을 할 수 있는 근거를 제공합니다.

It is equally important to support life-long learning and learning at work, because there are going to be few of us who will do the same job throughout their entire career. Cutting the hours per week would help offer work for more people, but the laws of economics tend to push people to work more rather than less unless public policy regulating the amount of work is introduced.


평생 학습과 일하면서 배우는 것 두가지 모두 똑같이 중요합니다. 왜냐하면 일생동안 한가지 일만 할 사람은 앞으로 별로 없을 것이기 때문입니다.   주당 노동 시간을 줄이는 것은 더 많은 사람들을 위한 일자리를 제공하는 데 도움이되지만, 경제 법칙은 일의 양을 규제하는 공공 정책이 도입되지 않으면 사람들이 노동보다 더 많이 일하도록 압박하는 경향이 있습니다.





Because we can’t predict the future of AI, predicting the rate and extent of this development is extremely hard. There have been some estimates about the extent of job automation, ranging up to 47% of US jobs being at risk reported by researchers at the University of Oxford. The exact numbers such as these – 47%, not 45% or 49% –, the complicated-sounding study designs used to get them, and the top universities that report them tend to make the estimates sounds very reliable and precise. (Recall the point about estimating life expectancy using a linear model based on a limited amount of data.) The illusion of accuracy to one percentage is a fallacy. The above number, for example, is based on looking at a large number of job descriptions – perhaps licking the tip of your finger and putting it up to feel the wind – and using subjective grounds to decide which tasks are likely to be automated. It is understandable that people don't take the trouble to read a 79 page report that includes statements such as "the task model assumes for tractability an aggregate, constant-returns to-scale, Cobb-Douglas production function." However, if you don't, then you should remain somewhat sceptical about the conclusions too. The real value in this kind of analysis is that it suggests which kinds of jobs are more likely to be at risk, not in the actual numbers such as 47%. The tragedy is that the headlines reporting that "nearly half of US jobs at risk of computerisation" are remembered and the rest is not.



우리는 인공 지능의 미래를 예측할 수 없으므로 그 개발의 속도와 범위를 예측하는 것은 극히 어렵습니다. 옥스포드 대학 (University of Oxford)의 연구팀이 보고한 바에 따르면 미국 직업의 최대 47%가 자동화 될 수 있다는 예측이 있습니다. 45%도 아니고 49%도 아니고 47%라고 딱 집어 얘기 했으니 뭔가 굉장히 복잡한 과정을 통해서 이 수치가 나온 것 같습니다. 그리고 유명한 대학교의 보고서이니 사람들은 믿을만하고 값어치가 있다고 믿는 경향이 있습니다. (제한된 양의 데이터에 근거해 linear model을 사용해 얻은 기대수명 예상하기에서의 요점을 상기해 보세요.)  정확도가 1 %라는 착각은 잘못된 것입니다. 예를 들어, 위의 숫자는 많은 수의 job descriptions을 기반으로합니다. - 아마도 손가락 끝에 침을 바른 다음에 손을 들어 바람을 느끼는 방법을 사용했을 수도....- 그 기반 하에 주관적인 판단이 가미 돼 어떤 일들이 자동화 될 것인가를 결정하게 되죠. 아마 사람들이 그 79 페이지나 되는 보고서 안에 있는 "the task model assumes for tractability an aggregate, constant-returns to-scale, Cobb-Douglas production function." 라는 문장을 읽는데는 문제가 없다는 것은 사실입니다. 어쨌든 당신이 그 문장을 보지 않았다면 그 결론에 대해 회의적이어야 합니다. 이런 유형의 분석에서 실제 가치는 47 %와 같은 실제 수치가 아니라 어떤 종류의 일자리가 위험에 노출 될 가능성이 더 높다는 것입니다. 실제 일어난 비극은 이 논문을 보도한 기사의 제목이 "미국 직업의 거의 절반을 컴퓨터가 대체하게 될 것이다" 였습니다. 사람들에게는 이 부분만 기억되고 나머지는 잊혀지겠죠. 



So what are then the tasks that are more likely to be automated. There are some clear signs concerning this that we can already observe:


그러면 자동화 될 가능성이 더 큰 작업은 무엇입니까? 우리가 이미 관찰 할 수있는 몇 가지 분명한 징후가 있습니다.



  • Autonomous robotics solutions such as self-driving vehicles, including cars, drones and boats or ferries, are just at the verge of a major commercial applications. The safety of autonomous cars is hard to estimate, but the statistics suggests that it is probably not yet quite at the required level (the level of an average human driver). However, the progress has been incredibly fast and it is accelerating due to the increasing amount of available data.

- 자동차, drones, boats or ferries를 포함한 자율 주행 운송수단인 Autonomous robotics solutions는 주요 상업용 어플리케이션의 초입단계일 뿐입니다.  자율 주행 차량의 안전성은 예측하기가 어렵지만 통계에 따르면 아직 평균 수준의 인간 운전자 수준은 아닙니다. 그러나 진행 속도는 엄청나게 빠르며 사용 가능한 데이터의 양이 증가함에 따라 가속화되고 있습니다.



  • Customer-service applications such as helpdesks can be automated in a very cost-effective fashion. Currently the quality of service is not always to be cheered, the bottle-necks being language processing (the system not being able to recognize spoken language or to parse the grammar) and the logic and reasoning required to provide the actual service. However, working applications in constrained domains (such as making restaurant or haircut reservations) sprout up constantly.

- 헬프 데스크와 같은 고객 서비스 응용 프로그램은 매우 비용 효율적인 방식으로 자동화 될 수 있습니다. 현재 서비스의 품질은 모든 면에서 좋은 평가를 받는 것은 아닙니다. 언어 처리에 있어서의 병목현상 (시스템이 음성 언어를 인식하지 못하거나 문법을 해석하지 못 하는 것)이나 논리나 추론이 요구되는 상황에서의 지연 등이 그것입니다. 그러나 제한된 영역 (예 : 레스토랑이나 이발소 예약 등)에서 작동하는 응용 프로그램은 끊임없이 발전하고 있습니다.



For one thing, it is hard to tell how soon we’ll have safe and reliable self-driving cars and other solutions that can replace human work. In addition to this, we mustn’t forget that a truck or taxi driver doesn’t only turn a wheel: they are also responsible for making sure the vehicle operates correctly, they handle the goods and negotiate with customers, they guarantee the safety of their cargo and passengers, and take care of a multitude of other tasks that may be much harder to automate than the actual driving.



우선, 우리가 얼마나 빨리 안전하고 신뢰할 수있는 자율 주행 자동차 및 인간의 작업을 대체할 수 있는 솔루션들을 현실화 할 수 있는지 말하기가 어렵습니다. 그리고 우리가 잊지 말아야 할 것은 트럭이나 택시 운전사들이 단지 방향만 바꾸는 일은 하는 것이 아니라 자동차의 다른 기능들이 제대로 작동하는지 확인하고 기타 관련된 물품들을 관리하며 고객들과 협상도 진행하고 cargo와 승객의 안전에 대한 보장도 하는 등 다른 일들도 하고 있다는 겁니다. 그리고 단지 운전만이 아닌 자동화 하기 어려운 다른 많은 작업들도 동시에 수행하고 있습니다.



As with earlier technological advances, there will also be new work that is created because of AI. It is likely that in the future, a larger fraction of the workforce will focus on research and development, and tasks that require creativity and human-to-human interaction. If you'd like to read more on this topic, see for example Abhinav Suri's nice essay on Artificial Intelligence and the Rise of Economic Inequality.



초기 기술 진보와 마찬가지로 인공 지능으로 인해 새로운 일이 생겨 날 겁니다. 미래에는 인력의 상당 부분이 창의력과 인간과 인간의 상호 작용을 필요로하는 연구 개발 및 업무에 집중할 가능성이 높습니다. 이 주제에 대해 더 자세히 알고 싶다면 인공 지능과 경제적 불평등의 부상 (Artificial Intelligence and the Rise of Economic Inequality.)에 대한 Abhinav Suri의 훌륭한 글을 참고하십시오.




Exercise 25: Implications of AI


What kind of articles are being written about AI - and do you think they are realistic? Do an online search about AI related to one of your interests. Choose one of the articles and analyze it.

Explain the central idea in the article in your own words using about a paragraph of text (multiple sentences.) Based on your understanding, how accurate are the AI-related statements in the article? Explain your answer. Are the implications (if any) realistic? Explain why or why not.



AI에 관해 어떤 종류의 기사가 쓰여지고 있는지 알아보세요, 그것이 현실적이라고 생각합니까? 관심 분야 중 하나와 관련된 AI에 대한 온라인 기사를 검색해 보세요. 그 기사들 중 하나를 선택하고 분석해 보세요.


기사의 핵심 아이디어를 한 문단 (여러 문장)으로 그리고 여러분의 논리로 설명하십시오. 그 기사의 AI 관련 진술은 얼마나 정확합니까? 당신의 생각을 설명하세요. 그 의미가 현실적입니까? 왜 그런지 혹은 왜 그렇지 않은지 설명하세요.



반응형

Elements of AI - About predicting the future

2018. 6. 27. 21:37 | Posted by 솔웅


반응형

Elements of AI



I.About predicting the future



We will start by addressing what is known to be one of the hardest problems of all: predicting the future.

우리는 가장 어려운 문제라고 알려진 것에 대해 addressing 하면서 시작하겠습니다. : 미래를 예언하는 것


You may be disappointed to hear this, but we don't have a crystal ball that would show us what the world will be like in the future and how AI will transform our lives.


아마 이것을 들으면 당신은 실망할 수도 있을겁니다. 미래의 세계와 인공 지능이 우리 삶을 변화시킬 방법을 우리에게 보여 줄 수정 구슬은 없습니다.


As scientists, we are often asked to provide predictions, and our refusal to provide any is faced with a roll of the eyes (“boring academics”). But in fact, we claim that anyone who claims to know the future of AI and the implications it will have on our society, should be treated with suspicion.


과학자로서, 우리는 종종 예측을 제공하라는 요청을 받고, 어떤 것을 제공하기를 거부하는 것은 roll of the eyes ( "boring academics")에 직면하게됩니다. 그러나 우리는 AI의 미래와 이것이 우리 사회에 미칠 영향을 알고 있다고 주장하는 사람은 모두 의심 받아야한다고 주장합니다.


The reality distortion field


Not everyone is quite as conservative about their forecasts, however. In the modern world where big headlines sell, and where you have to dissect news into 280 characters, reserved (boring?) messaged are lost, and simple and dramatic messages are magnified. In the public perception of AI, this is clearly true.


그러나 모든 사람들이 그들의 예측에 대해 보수적 인 것은 아닙니다. 큰 headlines이 판매되는 현대 세계에서 280 자로 뉴스를 분석해야 하는 곳에서는 예약 된 (boring?) 메시지를 잃어 버리고 단순하고 극적인 메시지가 확대됩니다. AI에 대한 대중의 인식에서 이것은 분명히 사실입니다.




Note

From utopian visions to grim predictions


The media sphere is dominated by the extremes. We are beginning to see AI celebrities, standing for one big idea and making oracle-like forecasts about the future of AI. The media love their clear messages. Some promise us a utopian future with exponential growth and trillion-dollar industries emerging out of nowhere, true AI that will solve all problems we cannot solve by ourselves, and where humans don’t need to work at all.

It has also been claimed that AI is a path to world domination. Others make even more extraordinary statements according to which AI marks the end of humanity (in about 20-30 years from now), life itself will be transformed in the “Age of AI“, and that AI is a threat to our existence.


미디어 영역은 극단에 의해 지배됩니다. 우리는 인공 지능 celebrities를 만나기 시작했습니다. 하나의 큰 아이디어를 내고 AI의 미래에 대한 오라클과 유사한 예측(oracle-like forecasts)을하는 것입니다. 언론은 그들의 명백한 메시지를 좋아합니다. 어떤 사람들은 우리가 스스로 해결할 수 없는 모든 문제를 해결하고, 인간이 전혀 일할 필요가 없는 곳에서 기하 급수적으로 성장하고 수조 달러의 산업이 나타나지 않는 유토피아 적 미래를 약속합니다.


인공 지능은 세계 지배의 길임을 주장 해 왔습니다. 다른 사람들은 AI가 (지금부터 약 20-30 년 후에) 인류의 종말을 표명하는 더욱 특별한 성명서를 작성하고, "AI의 시대"에서 삶 자체가 변형 될 것이며, AI는 우리의 존재에 대한 위협이라고 말합니다.


While some forecasts will probably get at least something right, others will likely be useful only as demonstrations of how hard it is to predict, and many don’t make much sense. What we would like to achieve is for you to be able to look at these and other forecasts, and be able to critically evaluate them.


일부 예측은 아마도 적어도 적절한 것을 얻게 될 것이지만, 다른 예측은 예측하기가 얼마나 어려운지에 대한 시연으로 만 유용 할 것이고, 많은 것은 별로 의미가 없습니다. 우리가 달성하고자하는 것은 이러한 예측과 다른 예측을 보고 비판적으로 평가할 수있는 것입니다.



AWS DeepLens - Deep learning enabled video camera for developers

아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.

On hedgehogs and foxes


The political scientist Philip E. Tetlock, author of Superforecasting: The Art and Science of Prediction, classifies people into two categories: those who have one big idea (“hedgehogs”), and those who have many small ideas (“foxes”). Tetlock has carried out an experiment between 1984 and 2003 to study factors that could help us identify which predictions are likely to be accurate and which are not. One of the significant findings was that foxes tend to be clearly better at prediction than hedgehogs, especially when it comes to long-term forecasting.


Superforecast : The Art and Science of Prediction의 저자 인 Philip E. Tetlock은 사람들을 하나의 큰 아이디어 (고슴도치)가 많거나 와 작은 아이디어 ( "여우")가 많은 사람들로 분류합니다. Tetlock은 1984 년과 2003 년 사이에 어떤 예측이 정확하고 그렇지 않은지 파악하는 데 도움이되는 요인을 연구하기 위해 실험을 수행했습니다. 중요한 발견 중 하나는 여우가 고슴도치보다 예측에서 더 나은 경향이 있다는 것입니다. 특히 장기 예측에 있어서는 그렇습니다.


Probably the messages that can be expressed in 280 characters are more often big and simple hedgehog ideas. Our advice is to pay attention to carefully justified and balanced information sources, and to be suspicious about people who keep explaining everything using a single argument.


아마도 280 자로 표현할 수 있는 메시지는 크고 단순한 고슴도치 아이디어 일 수 있습니다. 우리의 조언은 신중하고 정당하고 균형 잡힌 정보원에 주의를 기울여야 하며, 하나의 논점을 사용하여 모든 것을 계속 설명하는 사람들에 대해 의심을 품는 것입니다.


Predicting the future is hard but at least we can consider the past and present AI, and by understanding them, hopefully be better prepared for the future, whatever it turns out to be like.


미래를 예측하는 것은 어렵지만 최소한 우리는 과거와 현재의 인공 지능을 생각해 볼 수 있습니다. 그리고 그것을 이해함으로써 미래에 대한 준비가 더 되었으면 좋겠습니다.


AI winters


The history of AI, just like many other fields of science, has witnessed the coming and going of various different trends. In philosophy of science, the term used for a trend is paradigm. Typically, a particular paradigm is adopted by most of the research community and optimistic predictions about progress in the near-future are provided. For example, in the 1960s neural networks were widely believed to solve all AI problems by imitating the learning mechanisms in the nature, the human brain in particular. The next big thing was expert systems based on logic and human-coded rules, which was the dominant paradigm in the 1980s.


인공 지능의 역사는 다른 많은 과학 분야와 마찬가지로 다양한 경향의 출현을 목격했습니다. 과학 철학에서 추세에 사용되는 용어는 패러다임입니다. 일반적으로 특정 패러다임은 대부분의 연구 커뮤니티에서 채택하고 있으며 가까운 장래에 진행에 대한 낙관적 인 예측이 제공됩니다. 예를 들어, 1960 년대 신경망은 자연의 학습 메커니즘, 특히 인간의 두뇌를 모방하여 모든 AI 문제를 해결하는 것으로 널리 믿어졌습니다. 다음으로 큰 것은 논리와 인간 규범에 기반을 둔 전문가 시스템이었는데, 1980 년대 지배적 인 패러다임이었습니다.


The cycle of hype


In the beginning of each wave, a number of early success stories tend to make everyone happy and optimistic. The success stories, even if they may be in restricted domains and in some ways incomplete, become the focus on public attention. Many researchers rush into AI — or at least calling their research AI — in order to access the increased research funding. Companies also initiate and expand their efforts in AI in the fear of missing out (FOMO).


각 웨이브가 시작될 때 초기 성공 사례가 많아서 모든 사람들을 행복하고 낙관적으로 만드는 경향이 있습니다. 성공 사례는 제한된 영역에 있거나 어떤면에서 불완전하더라도 대중의 관심을 끌기 위한 것입니다. 많은 연구자들이 연구 자금 지원을 늘리기 위해 인공 지능을 연구하거나 적어도 자신의 연구를 AI 연구라고 명명합니다. 회사들은 자신들이 기회를 놓칠까봐 (FOMO fear of missing out) 두려워 AI 관련 사업을 시작하고 또 확장합니다.


So far, each time an all-encompassing, general solution to AI has been said to be within reach, progress has ended up running into insurmountable problems, which at the time were thought to be minor hiccups. In the case of neural networks in the 1960s, the hiccups were related to handling nonlinearities and to solving the machine learning problems associated with the increasing number of parameters required by neural network architectures. In the case of expert systems in the 1980s, the hiccups were associated with handling uncertainty and common sense. As the true nature of the remaining problems dawned after years of struggling and unsatisfied promises, pessimism about the paradigm accumulated and an AI winter followed: interest in the field faltered and research efforts were directed elsewhere.


지금까지 AI에 대한 포괄적이고 일반적 인 해결책이 나올 때 마다 또 다른 극복하기 어려운 문제점에 직면해 왔습니다. (그 당시에는 그것이 그렇게 심각한 문제라고 생각하지 않고 그냥 마이너한 문제 -minor hiccups- 라고 생각 했었습니다.)  1960 년대의 neural networks의 경우, hiccups은 nonlinearities 처리와 관련됐고 neural network architectures에 필요한 매개 변수의 숫자를 증가시킴으로서 machine learning 문제를 해결하는 것과 관련돼 있었습니다. 1980 년대의 전문가 시스템의 경우, hiccups은 불확실성과 상식을 다루는 것과 연관되어있었습니다. 수년간의 고군분투와 unsatisfied promises로 인해 남아있는 문제의 진정한 본질이 쌓여 감에 따라 패러다임에 대한 비관론과 AI 겨울이 뒤 따랐습니다. 이 분야에 대한 관심이 줄어들고 연구 노력이 다른 곳으로 향했습니다.


Modern AI


Currently, roughly since the turn of the millennium, AI has been on the rise again. Modern AI methods tend to focus on breaking a problem into a number of smaller, isolated and well-defined problems and solving them one at a time. Modern AI is bypassing grand questions about meaning of intelligence, the mind, and consciousness, and focusing on building practically useful solutions in real-world problems. Good news for us all who can benefit from such solutions!


현재 밀레니엄 시대가 시작된 이래로 인공 지능에 대한 관심은 다시 상승하고 있습니다. 현대 인공 지능 방법론은 문제를 다수의 작고 고립되고 잘 정의 된 문제로 분해하고 한 번에 하나씩 해결하는 데 초점을 맞추는 경향이 있습니다. 현대 인공 지능은 지능, 정신 및 의식의 의미에 대한 거창한 질문을 우회하고 실제 문제에서 실제적으로 유용한 솔루션을 구축하는 데 중점을 둡니다. 그러한 해결책을 누릴 수있는 모든 사람들에게 좋은 소식입니다!


Another characteristic of modern AI methods, closely related to working in the complex and “messy” real world, is the ability to handle uncertainty, which we demonstrated by studying the uses of probability in AI in Chapter 3. Finally, the current upwards trend of AI has been greatly boosted by the come-back of neural networks and deep learning techniques capable of processing images and other real-world data better than anything we have seen before.


복잡하고 지저분한 현실 세계에서 일하는 것과 밀접한 관련이있는 현대 인공 지능 방법의 또 다른 특징은 불확실성을 다루는 능력이며, 우리는 3 장에서 AI에서 확률의 사용을 연구함으로써 이것을 증명했습니다. 마지막으로, 현재의 인공 지능은 이전에 보았던 것보다 이미지 및 기타 실제 데이터를 처리 할 수있는 neural networks 및 deep learning 기술의 등장으로 크게 향상되었습니다.



Note

So are we in a hype cycle?

Whether the history will repeat itself, and the current boom will be once again followed by an AI winter, is a matter that only time can tell. Even if it does, and the progress towards better and better solutions slows down to a halt, the significance of AI in the society is going to stay. Thanks to the focus on useful solutions to real-world problems, modern AI research yields fruit already today, rather than trying to solve the big questions about general intelligence first — which was where the earlier attempts failed.


역사가 반복 될 지, 현재의 붐이 다시 AI 겨울이 뒤따를 지 여부는 시간 만 알 수있는 문제입니다. 그것이 더 좋고 더 나은 해결책을 향한 진전이 멈추더라도, 사회에서 AI의 중요성은 계속 남아있게 될 것입니다. 실제 문제에 대한 유용한 솔루션에 중점을 두어 현대 인공 지능 연구는 먼저 초기 시도가 실패한 일반적인 지능에 대한 커다란 질문을 해결하기보다는 오늘의 열매를 맺고 있습니다.



Prediction 1: AI will continue to be all around us



As you recall, we started by motivating the study of AI by discussing prominent AI applications that affect all ours lives. We highlighted three examples: self-driving vehicles, recommendation systems, and image and video processing. During the course, we have also discussed a wide range of other applications that contribute to the ongoing technological transition.


당신이 기억 하듯이, 우리는 우리의 모든 삶에 영향을 미치는 중요한 AI 응용 프로그램을 논의함으로써 AI 연구에 동기를 부여하기 시작했습니다. 우리는 세 가지 예를 강조했습니다 :자율 주행 차량, 추천 시스템, 이미지 및 비디오 프로세싱. 이 과정에서 진행중인 기술 전환에 기여하는 다양한 응용 프로그램에 대해서도 논의했습니다.


Note

AI making a difference

As a consequence of focusing on practicality rather than the big problems, we live our life surrounded by AI (even if we may most of the time be happily unaware of it): the music we listen to, the products we buy online, the movies and series we watch, our routes of transportation, and even the news and information that we have available, are all influenced more and more by AI. What is more, basically any field of science, from medicine and astrophysics to medieval history, is also adopting AI methods in order to deepen our understanding of the universe and of ourselves.


큰 문제보다는 실용성에 중점을 두는 결과로, 우리는 인공 지능으로 둘러싸인 삶을 살고 있습니다. 우리가 듣는 음악, 온라인으로 구매하는 제품, 영화 우리가보고있는 시리즈, 운송 경로, 심지어 우리가 이용할 수 있는 뉴스와 정보는 AI에 의해 점점 더 많은 영향을 받고 있습니다. 게다가 의학과 천체 물리학부터 medieval history에 이르기까지 기본적으로 과학 분야는 우주와 우리 자신에 대한 이해를 깊게하기 위해 AI 방법을 채택하고 있습니다.





Prediction 2: the Terminator isn't coming


One of the most pervasive and persistent ideas related to the future of AI is the Terminator. In case you should have somehow missed the image of a brutal humanoid robot with a metal skeleton and glaring eyes... well, that’s what it is. The Terminator is a 1984 film by director James Cameron. In the movie, a global AI-powered defense system called Skynet becomes conscious of its existence and wipes most of the humankind out of existence with nukes and advanced killer robots.


AI의 미래와 관련된 가장 보편적이고 지속적인 아이디어 중 하나는 터미네이터입니다. 당신이 어떻게 든 금속 골격과 눈부신 눈을 가진 잔인한 휴머노이드 로봇의 이미지를 놓쳐 버렸어야했다면 ... 그렇습니다. 터미네이터는 1984 년 James Cameron 감독의 영화입니다. 영화에서 Skynet이라고 불리는 글로벌 인공 지능 동력 방어 시스템은 그 존재를 의식하게되고 핵무기와 진보 된 킬러 로봇으로 대부분의 인류를 없애 버립니다.



Note

Two doomsday scenarios

There are two alternative scenarios that are suggested to lead to the coming of the Terminator or other similarly terrifying forms of robot uprising. In the first, which is the story from the 1984 film, a powerful AI system just becomes conscious and decides that it just really, really dislikes humanity in general.


터미네이터 또는 유사하게 무서운 형태의 로봇 반란으로 이어질 수 있다고 제안되는 두 가지 시나리오가 있습니다. 1984 년 영화의 첫 번째 이야기에서 강력한 인공 지능 시스템은 의식이 생겨서 인류가 정말로 정말로 싫다는 결정을 내립니다.

In the second alternative scenario, the robot army is controlled by an intelligent but not conscious AI system that is in principle in human control. The system can be programmed, for example, to optimize the production of paper clips. Sounds innocent enough, doesn’t it?


두 번째 대안 시나리오에서, 로봇 군대는 원칙적으로 인간의 통제하에 있는 지능형이지만 의식이 없는 인공 지능 시스템에 의해 제어됩니다. 예를 들어 종이 클립의 생산을 최적화하기 위해 시스템을 프로그래밍 할 수 있습니다. 이것은 별로 범죄적이지는 않죠?

However, if the system possesses superior intelligence, it will soon reach the maximum level of paper clip production that the available resources, such as energy and raw materials, allow. After this, it may come to the conclusion that it needs to redirect more resources to paper clip production. In order to do so, it may need to prevent the use of the resources for other purposes even if they are essential for human civilization. The simplest way to achieve this is to kill all humans, after which a great deal more resources become available for the system’s main task, paper clip production.


그러나 시스템이 우수한 지능을 보유하고 있다면 곧 에너지 및 원자재와 같은 가용 자원이 허용하는 최대 수준의 종이 클립 생산에 도달하게됩니다. 이 후에 종이 클립 제작에 더 많은 리소스를 필요로 한다는 결론에 도달 할 수 있습니다. 그렇게하기 위해서는 인간 문명에 필수적이라 할지라도 자원을 다른 용도로 사용하지 못하게 해야 할 수도 있습니다. 이것을 달성하는 가장 간단한 방법은 모든 인간을 죽이는 것입니다. 그 후에 많은 양의 자원이 시스템의 주요 작업 인 종이 클립 제작에 사용할 수 있게됩니다.



Why these scenarios are unrealistic


There are a number of reasons why both of the above scenarios are extremely unlikely and belong to science fiction rather than serious speculations of the future of AI.


위 시나리오가 모두 AI의 미래에 대한 심각한 추측 이라기보다는 과학 소설에 속하는 것이 극히 비현실적인 것이라는 여러가지 근거들이 있습니다.





Reason 1:

Firstly, the idea that a superintelligent, conscious AI that can outsmart humans emerges as an unintended result of developing AI methods is naive. As you have seen in the previous chapters, AI methods are nothing but automated reasoning, based the combination of perfectly understandable principles and plenty of input data, both of which are provided by humans or systems deployed by humans. To imagine that the nearest neighbor classifier, linear regression, the AlphaGo game engine, or even a deep neural network could become conscious and start evolving into a superintelligent AI mind requires a (very) lively imagination.


첫째, 인간보다 현명 할 수있는 지능적이고 의식이 있는 인공 지능이 인공 지능 방법을 개발 한 의도하지 않은 결과로 나타난다는 생각은 순진합니다. 이전 장에서 보았 듯이 인공 지능 방법은 사람이 배포 한 시스템이나 인간이 제공하는 완벽하게 이해할 수있는 원칙과 많은 입력 데이터의 조합을 기반으로하는 자동화 된 추론 일뿐입니다. nearest neighbor classifier, linear regression, AlphaGo 게임 엔진 또는 심지어 deep neural network가 의식을 갖게 되고 초능력 인공 지능 사고로 진화하는 것을 상상하기 위해서는 (매우) 활기찬 상상력이 필요합니다.


Note that we are not claiming that building human-level intelligence would be categorically impossible. You only need to look as far as the mirror to see a proof of the possibility of a highly intelligent physical system. To repeat what we are saying: superintelligence will not emerge from developing narrow AI methods and applying them to solve real-world problems. (Recall the narrow vs general AI from the section on the philosophy of AI in Chapter 1.)


우리는 인간 수준의 지능을 구축하는 것이 명백히 불가능하다고 주장하지는 않습니다. 고도로 지능적인 물리적 시스템의 가능성에 대한 증거를 보기 위해서는 거울까지만 봐야합니다. 다시 말하자면 : superintelligence은 narrow AI methods에서 나오지 않으며 단지 현실 세계의 문제를 해결하기 이해 적용될 뿐입니다. (제 1 장에서 인공 지능의 철학에 관한 섹션에서 narrow vs general AI를 생각해 보세요.)


Reason 2:


econdly, one of the favorite ideas of those who believe in superintelligent AI is the so called singularity: a system that optimizes and “rewires“ itself so that it can improve its own intelligence at an ever accelerating, exponential rate. Such superintelligence would leave humankind so far behind that we become like ants that can be exterminated without hesitation. The idea of exponential intelligence increase is unrealistic for the simple reason that even if a system could optimize its own workings, it would keep facing more and more difficult problems that would slow down its progress, quite like the progress of human scientists requires ever greater efforts and resources by the whole research community and indeed the whole society, which the superintelligent entity wouldn’t have access to. The human society still has the power to decide what we use technology, even AI technology, for. Much of this power is indeed given to us by technology, so that every time we make progress in AI techonology, we become more powerful and better at controlling any potential risks due to it.


둘째, superintelligent AI를 믿는 사람들이 좋아하는 아이디어 중 하나는 소위 특이성 (singularity)입니다. 즉, 가속화되고 기하 급수적 인 속도로 자체 지능을 향상시킬 수 있도록 최적화하고 스스로 "rewires"하는 시스템입니다. 그러한 superintelligent은 인류를 초월하게 되고 우리는 개미같은 존재가 되서 망설임 없이 제거되는 존재가 된다는 생각입니다. 기하 급수적 인 지능 증가에 대한 아이디어는 비현실적이라는 것을 간단하게 증명할 수 있습니다. 시스템이 자체적으로 최적화 할 수 있다고 하더라도 점점 단계가 진행 될 수록 점점 더 어려운 문제에 직면하게 되고 그 진행 속도는 점점 더 느려지게 될 겁니다. 인간 과학자들이 점점 더 많은 노력을 기울여야 하는것과 마찬가지로 전체 연구 기관에서도 더 많은 자원이 필요로 하게 되고 결국은 전체 사회의 더 많은 자원과 노력이 필요하게 됩니다. 결국 그러한 needs는 superintelligent entity가 접근할 수 없는 지점에 도달하게 됩니다. 그렇기 때문에 비 현실적이라는 겁니다. 

인간 사회는 아직 어떤 기술을 사용할 것인가에 대한 결정 권한이 있습니다. AI 기술에 대한 결정권한도 마찬가지죠. 이 파워의 상당부분은 결국 기술로서 우리에게 주어질 겁니다. 그리고 우리가 인공지능 기술에 대해 어떤 진전을 이룰 때마다 우리의 그러한 권한은 점점 더 강력해지고 그로 인해 잠재적인 리스크를 통제하는데 있어서도 더 많은 발전이 이루어지게 될 겁니다.



Note

The value alignment problem

The paper clip example is known as the value alignment problem: specifying the objectives of the system so that they are aligned with our values is very hard. However, suppose that we create a superintelligent system that could defeat humans who tried to interfere with its work. It’s reasonable to assume that such a system would also be intelligent enough to realize that when we say “make me paper clips”, we don’t really mean to turn the Earth into a paper clip factory of a planetary scale.


종이 클립 예제는 가치 정렬(value alignment) 문제로 알려져 있습니다. 시스템의 목표를 지정하여 우리의 가치대로 정렬되도록하는 것은 매우 어렵습니다. 우리가 우리의 일을 방해하고 결국은 인간을 패배시킬 수 있는 superintelligent system을 만들었다 고 가정 해보십시오. 그러한 시스템은 우리가 "make me paper clips"라고 말했을 때 이것이 지구를 행성 규모의 종이 클립 공장으로 바꾸는 것을 의미하지 않는다는 것을 깨닫기에 충분히 지능적이라고 가정하는 것이 합리적입니다.


Separating stories from reality


All in all, the Terminator is a great story to make movies about but hardly a real problem worth panicking about. The Terminator is a gimmick, an easy way to get a lot of attention, a poster boy for journalists to increase click rates, a red herring to divert attention away from perhaps boring, but real, threats like nuclear weapons, lack of democracy, environmental catastrophes, and climate change. In fact, the real threat the Terminator poses is the diversion of attention from the actual problems, some of which involve AI, and many of which don’t. We’ll discuss the problems posed by AI in what follows, but the bottom line is: forget about the Terminator, there are much more important things to focus on.


결국, 터미네이터는 영화를 만들기에는 아주 훌륭한 스토리이지만 그걸 현실적으로 받아들여 두려워 할 정도의 문제는 아닙니다. 터미네이터는 눈길을 끌기에 쉬운 방법이며, 저널리스트들에게 클릭률을 높이기 위한 좋은 소재이며 지루한 것에서 부터 주위를 끌 수 있는 빨간 청어 같은 것이죠. 하지만 실제 생활에서는 핵무기 같은 위협, 민주주의의 부재, 환경 재앙, 그리고 기후 변화 같은 것들이 주위를 끄는 이슈입니다. 사실, 터미네이터가 제기하는 진정한 위협은 이러한 실제 문제에서 관심을 돌리게 만드는 겁니다. 그러한 실제문제에는 실제 고민해야할 AI 관련 토픽도 있습니다. AI와 관련 한 실제 고민해야할 문제에 대해서는 다음에서 논의 할 것입니다. 이 글의 결론은 터미네이터를 잊어 버리고, 훨씬 더 중요한 것에 집중하자는 것입니다.



Exercise 24: What is the perception of AI?

For this exercise, we want you to think about how AI is portrayed. Do an online image search for the term “AI” and see what kinds of pictures come up. If you are using Google search, you should choose "Images" in the top of the screen.

What's the general impression you get about AI from the image search results? Is this an accurate representation of AI? Why or why not?


이 연습문제 에서는 AI가 어떻게 묘사되는지 생각해보기를 바랍니다. "AI"라는 용어에 대한 온라인 이미지 검색을 수행하고 어떤 종류의 그림이 나타나는지 봅니다. Google 검색을 사용하는 경우 화면 상단에서 '이미지'를 선택해야합니다.


이미지 검색 결과에서 AI에 대해 얻는 일반적인 인상은 무엇입니까? 이것이 AI의 정확한 표현입니까? 왜 그렇습니까?



반응형

Elements of AI - Advanced neural network techniques

2018. 6. 25. 04:12 | Posted by 솔웅


반응형

Elements of AI





III.Advanced neural network techniques





In the previous section, we have discussed the basic ideas behind most neural network methods: multilayer networks, non-linear activation functions, and learning rules such as the backpropagation algorithm.


이전 섹션에서는 neural network 방법의 기본 아이디어 인 multilayer networks, non-linear activation functions 및 backpropagation algorithm 과 같은 것들을 알아 보았습니다.




They power almost all modern neural network applications. However, there are some interesting and powerful variations of the theme that have lead to great advances in deep learning in many areas.


그들은 거의 모든 modern neural network applications을 지원합니다. 그것과 관련해 흥미롭고 강력한 여러 다양한 변형들이 나타남으로서 많은 분야에서 deep learning의 큰 진보를 이끌었습니다. 





Convolutional neural networks (CNNs)


One area where deep learning has achieved spectacular success is image processing. The simple classifier that we studied in detail in the previous section is severely limited – as you noticed it wasn't even possible to classify all the smiley faces correctly. By adding more layers in the network and using backpropagation to learn the weights does in principle solve the problem, but another one emerges: the number of weights becomes extremely large and consequently, the amount of training data required to achieve satisfactory accuracy can become too large to be realistic.



deep learning이 큰 성공을 거둔 분야 중 하나는 image processing 분야 입니다. 이전 섹션에서 자세히 공부 한 simple classifier는 굉장히 제한적입니다. 여러분도 모든 웃는 얼굴을 올바르게 분류 할 수는 없다는 것을 눈치 채셨을 겁니다. 네트워크에 더 많은 레이어를 추가하고 backpropagation을 사용하여 weights를 학습하면 원칙적으로 문제가 해결되지만, weights 수가 극도로 커지고 결과적으로 만족할만한 정확도를 달성하는 데 필요한 교육 데이터의 양이 구현하기에는 너무 커질 수 있습니다.



Fortunately, a very elegant solution to the problem of too many weights exists: a special kind of neural networks, or rather, a special kind of layer that can be included in a deep neural network. This special kind of layer is a so called convolutional layer. Networks including convolutional layers are called convolutional neural networks (CNNs). Their key property is that they can detect image features such as bright or dark (or specific color) spots, edges in various orientations, patterns, and so on. These form the basis for detecting more abstract features such as a cat’s ears, a dog’s snout, a person’s eye, or the octagonal shape of a stop sign. It would normally be hard to train a neural network to detect such features based on the pixels of the input image, because the features can appear in different positions, different orientations, and in different sizes in the image: moving the object or the camera angle will change the pixel values dramatically even if the object itself looks just the same to us. In order to learn to detect a stop sign in all these different conditions would require vast of amounts of training data because the network would only detect the sign in conditions where it has appeared in the training data. So, for example, a stop sign in the top right corner of the image would be detected only if the training data included an image with the stop sign in the top right corner. CNNs can recognize the object anywhere in the image no matter where it has been observed in the training images.



다행스럽게도, 너무 많은 weights 문제에 대한 매우 우아한 해결책이 있습니다. 특수한 종류의 neural networks 또는 심층 신경 네트워크에 포함될 수있는 특별한 종류의 계층이 있습니다. 이 특별한 종류의 레이어는 소위 convolutional layer입니다. convolutional 계층을 포함한 네트워크를 convolutional neural networks, CNN 이라고합니다. 그들의 핵심 속성은 밝거나 어두운 (또는 특정 색) 반점, 다양한 방향의 모서리, 패턴 등과 같은 이미지 피처를 감지 할 수 있다는 것입니다. 이들은 고양이의 귀, 개 주둥이, 사람의 눈 또는 정지 신호의 팔각형 모양과 같은 보다 추상적 인 특징을 탐지하기 위한 기초를 형성합니다. 피쳐가 다른 위치, 다른 방향 및 이미지의 다른 크기로 나타날 수 있기 때문에 일반적으로 입력 이미지의 픽셀을 기반으로 이러한 피쳐를 감지하도록 neural networks을 학습하는 것이 어려울 것입니다. 객체 또는 카메라 각도 이동 객체 자체가 우리에게 똑같이 보일지라도 픽셀 값을 극적으로 바꿀 것입니다. 이러한 모든 조건에서 정지 신호를 감지하는 것을 배우려면 네트워크가 교육 데이터에 나타난 징후 만 감지하기 때문에 엄청난 양의 교육 데이터가 필요합니다. 따라서 예를 들어, 오른쪽 상단 모서리에 정지 신호가 있는 이미지가 교육 데이터에 포함 된 경우에만 이미지 오른쪽 상단의 정지 신호가 감지됩니다. CNN은 트레이닝 이미지에서 관찰 된 위치에 관계없이 이미지의 어느 곳에서나 오브젝트를 인식 할 수 있습니다.




AWS DeepLens - Deep learning enabled video camera for developers


아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.




Note

Why we need CNNs

CNNs use a clever trick to reduce the amount of training data required to detect objects in different conditions. The trick basically amounts to using the same input weights for many neurons — so that all of these neurons are activated by the same pattern — but with different input pixels. We can for example have a set of neurons that are activated by a cat’s pointy ear. When the input is a photo of a cat, two neurons are activated, one for the left ear and another for the right. We can also let the neuron’s input pixels be taken from a smaller or a larger area, so that different neurons are activated by the ear appearing in different scales (sizes), so that we can detect a small cat's ears even if the training data only included images of big cats.


CNN은 다른 조건에서 개체를 탐지하는 데 필요한 교육 데이터의 양을 줄이기 위해 영리한 트릭을 사용합니다. 트릭은 기본적으로 많은 뉴런에 대해 동일한 입력 가중치를 사용하므로 모든 뉴런이 동일한 패턴으로 활성화되지만 입력 픽셀은 다릅니다. 우리는 예를 들어 고양이의 뾰족한 귀로 활성화되는 일련의 뉴런을 가질 수 있습니다. 입력 사진이 고양이의 사진 인 경우 두 개의 뉴런이 활성화됩니다. 하나는 왼쪽 귀에, 다른 하나는 오른쪽에 활성화됩니다. 또한 뉴런의 입력 픽셀을 작거나 큰 영역에서 가져 와서 다른 뉴런이 다른 크기 (크기)로 나타나는 귀에 의해 활성화되도록하여 훈련 데이터만으로도 작은 고양이의 귀를 감지 할 수 있습니다 큰 고양이의 이미지가 포함되어 있습니다.



The convolutional neurons are typically placed in the bottom layers of the network, which processes the raw input pixels. Basic neurons (like the perceptron neuron discussed above) are placed in the higher layers, which process the output of the bottom layers. The bottom layers can usually be trained using unsupervised learning, without a particular prediction task in mind. Their weights will be tuned to detect features that appear frequently in the input data. Thus, with photos of animals, typical features will be ears and snouts, whereas in images of buildings, the features are architectural components such as walls, roofs, windows, and so on. If a mix of various objects and scenes is used as the input data, then the features learned by the bottom layers will be more or less generic. This means that pre-trained convolutional layers can be reused in many different image processing tasks. This is extremely important since it is easy to get virtually unlimited amounts of unlabeled training data - images without labels - which can be used to train the bottom layers. The top layers are always trained by supervised machine learning techniques such as backpropagation.



convolutional neurons은 일반적으로 raw input 픽셀을 처리하는 네트워크의 맨 아래 계층에 배치됩니다. 위에서 언급 한 퍼셉트론 뉴런과 같은 기본 뉴런은 상위 계층에 배치되며 하위 계층의 출력을 처리합니다. 맨 아래 계층은 일반적으로 특정 예측 작업을 염두에 두지 않고 unsupervised learning을 사용하여 학습 할 수 있습니다. weights는 입력 데이터에 자주 나타나는 피쳐를 감지하도록 조정됩니다. 따라서 동물의 사진과 함께 전형적인 특징은 귀와 주둥이 일 것이고 건물의 이미지에서는 벽, 지붕, 창 등과 같은 건축 적 구성 요소입니다. 다양한 오브젝트와 장면의 혼합이 입력 데이터로 사용되면 하단 레이어에서 학습 한 기능이 다소 일반적인 것입니다. 이것은 미리 훈련 된 convolutional 레이어가 많은 다른 이미지 처리 작업에서 재사용 될 수 있음을 의미합니다. 분류되지 않은 교육 데이터 (레이블이없는 이미지)를 사실상 무제한으로 쉽게 얻을 수 있기 때문에 이는 매우 중요합니다.이 이미지는 맨 아래 계층을 교육하는 데 사용할 수 있습니다. 최상위 레이어는 항상 역 전파와 같은 supervised machine learning 기술에 의해 교육됩니다.





Do neural networks dream of electric sheep? Generative adversarial networks (GANs)


Having learned a neural network from data, it can be used for prediction. Since the top layers of the network have been trained in a supervised manner to perform a particular classification or prediction task, the top layers are really useful only for that task. A network trained to detect stop signs is useless for detecting handwritten digits or cats.



데이터로부터 neural network를 학습하면 prediction에 사용할 수 있습니다. 네트워크의 최상위 계층이 특정 분류 또는 예측 작업을 수행하기 위해 supervised manner로 교육 되었기 때문에 최상위 계층은 해당 작업에만 유용합니다. 정지 신호를 탐지하도록 훈련 된 네트워크는 handwritten digits 나 고양이를 탐지하는 데 쓸모가 없습니다.



A fascinating result is obtained by taking the pre-trained bottom layers and studying what the features they have learned look like. This can be achieved by generating images that activate a certain set neurons in the bottom layers. Looking at the generated images, we can see what the neural network “thinks” a particular feature looks like, or what an image with a select set of features in it would look like. Some even like to talk about the networks “dreaming” or “hallucinating” images (see Google’s DeepDream system).



매혹적인 결과는 사전 훈련 된 최하층을 취하고 그들이 배운 기능이 어떻게 생겼는지 연구함으로써 얻을 수 있습니다. 이것은 최하위 계층에서 특정 set neurons을 활성화하는 이미지를 생성하여 얻을 수 있습니다. 생성 된 이미지를 살펴보면, 신경망이 특정 기능을 어떻게 보는지, 또는 특정 기능 세트가 있는 이미지가 어떤 모습인지를 알 수 있습니다. 일부는 심지어 "꿈꾸는 dreaming"또는 "환각적인 hallucinating" 이미지 (Google의 DeepDream 시스템 참조)에 대해 이야기하기를 좋아합니다.



Note

Be careful with metaphors

However, we’d like to once again emphasize the problem with metaphors such as dreaming when simple optimization of the input image is meant — remember the suitcase words discussed in Chapter 1. The neural network doesn’t really dream, and it doesn’t have a concept of a cat that it would understand in a similar sense as a human understands. It is simply trained to recognize objects and it can generate images that are similar to the input data that it is trained on.


그러나 우리는 입력 이미지의 단순한 optimization이 의미하는 은유적인 문제가 의미하는 것을 다시한번 강조하고자 합니다. 1 장에서 논의 된 suitcase 단어를 생각해 보세요. neural network은 실제로 꿈도 꾸지도 못합니다. 인간이 이해하는 것과 비슷한 의미로 이해할 수있는 고양이 개념을 가지고 있지 않습니다. 그것은 단순히 물체를 인식하도록 훈련되었으며 훈련 된 입력 데이터와 유사한 이미지를 생성 할 수 있습니다.





To actually generate real looking cats, human faces, or other objects (you’ll get whatever you used as the training data), Ian Goodfellow who currently works at Google Brain, proposed a clever combination of two neural networks. The idea is to let the two networks compete against each other. One of the networks is trained to generate images like the ones in the training data. The other network’s task is to separate images generated by the first network from real images from the training data — it is called the adversarial network, and the whole system is called generative adversarial network or a GAN.



진짜로 보이는 고양이, 인간의 얼굴 또는 다른 객체 (당신이 훈련 데이터로 사용한 것은 무엇이든지)를 생성하기 위해, 현재 Google Brain에서 일하고있는 Ian Goodfellow는 두 개의 신경 네트워크를 영리하게 조합 할 것을 제안했습니다. 아이디어는 두 네트워크가 서로 경쟁하게 하는 것입니다. 네트워크 중 하나는 training data에 있는 것과 같은 이미지를 생성하도록 교육되었습니다. 다른 네트워크의 임무는 첫 번째 네트워크에서 생성 된 이미지를 훈련 데이터의 실제 이미지와 분리하는 것입니다.이 이미지를 adversarial network라고 하며, 전체 시스템을 generative adversarial network 또는 GAN이라고합니다.



The system trains the two models side by side. In the beginning of the training, the adversarial model has an easy task to tell apart the real images from the training data and the clumsy attempts by the generative model. However, as the generative network slowly gets better and better, the adversarial model has to improve as well, and the cycle continues until eventually the generated images are almost indistinguishable from real ones. The GAN tries to not only reproduce the images in the training data: that would be a way too simple strategy to beat the adversarial network. Rather, the system is trained so that it has to be able to generate new, real-looking images too.



이 시스템은 두 모델을 나란히 훈련시킵니다. 훈련이 시작될 때, adversarial 모델은 훈련 데이터로부터 실제 이미지를 분리하고 생성 모델에 의한 서투른 (clumsy) 시도를 쉽게 구분할 수 있습니다. 그러나 generative 네트워크가 서서히 향상되면서 adversarial 모델도 개선되어야 하고 결국 생성 된 이미지가 실제 이미지와 거의 구별되지 않을 때까지 사이클이 계속됩니다. GAN은 훈련 데이터에서 이미지를 재현하는 것뿐만 아니라 adversarial 네트워크를 이길 수 있는 간단한 전략이기도합니다. 오히려 시스템은 새로운 실제 이미지를 생성 할 수 있도록 훈련되어 있습니다.






The above images were generated by a GAN developed by NVIDIA in a project led by Prof Jaakko Lehtinen (see this article for more details).

Could you have recognized them as fakes?



위 이미지는 Jaakko Lehtinen 교수가 이끄는 프로젝트에서 NVIDIA가 개발 한 GAN에 의해 생성되었습니다 (자세한 내용은이 기사 참조).


여러분은 이게 가짜인지 알아 차리실 수 있습니까?






After completing Chapter 5 you should be able to:

  • Explain what a neural network is and where they are being successfully used
  • Understand the technical methods that underpin neural networks




반응형

Elements of AI - How neural networks are built

2018. 6. 25. 00:30 | Posted by 솔웅


반응형



Elements of AI



II.How neural networks are built





As we said earlier, neurons are very simple processing units. Having discussed linear and logistic regression in Chapter 4, the essential technical details of neural networks can be seen as slight variations of the same idea.


앞서 말했듯이 뉴런은 매우 간단한 처리 단위입니다. 4 장에서 선형 및 로지스틱 회귀에 대해 배웠습니다., 신경망(neural networks)의 핵심 기술의 세부 사항은 그것들과 같은 아이디어에서 약간의 변형을 한 것일 뿐이라는 것을 아시게 될 겁니다.




Note

Weights and inputs

The basic artificial neuron model involves a set of adaptive parameters, called weights like in linear and logistic regression. Just like in regression, these weights are used as multipliers on the inputs of the neuron, which are added up. The sum of the weights times the inputs is called the linear combination of the inputs. You can probably recall the shopping bill analogy: you multiply the amount of each item by its price per unit and add up to get the total.


기본 artificial neuron 모델은 linear 및 logistic regression에서 사용되는 weights 라고하는 adaptive parameters의 세트를 포함합니다. regression와 마찬가지로, 이러한 weights는 더 해지는 뉴런의 입력에 승수로 사용됩니다. weights에 입력 값을 곱한 값의 합을 linear combination이라고합니다. 우리는 shopping bill analogy를 떠 올릴 수 있습니다. 각 항목당 가격에 그 갯수를 곱한 다음 그것들을 합하여 청구금액을 구했습니다. 





If we have a neuron with six inputs (analogous to the amounts of the six shopping items: potatoes, carrots, and so on), input1, input2, input3, input4, input5, and input6, we also need six weights. The weights are analogous to the prices of the items. We’ll call them weight1, weight2, weight3, weight4, weight5, and weight6. In addition, we’ll usually want to include an intercept term like we did in linear regression. This can be thought of as a fixed additional charge due to processing a credit card payment, for example.



우리가 여섯 개의 입력에 한개의 뉴런을 가지고 있다고 합시다. (6개의 쇼핑 아이템들의 amounts와 유사합니다: 감자, 당근 등등), input1, input2, input3, input4, input5 및 input6과 같은 여섯 개의 입력을 갖는 뉴런을 가지고 있다면 여섯 개의 weights도 필요합니다. weights는 품목 가격과 유사합니다. 우리는 그것을 weight1, weight2, weight3, weight4, weight5 및 weight6이라고합니다. 또한 linear regression에서 했던것과 같은 intercept term을 포함하기를 원합니다. 이것은 예를 들어 신용 카드 지불 처리로 인해 생기는 고정 된 추가 비용이라고 생각할 수 있습니다.




We can then calculate the linear combination like this: linear combination = intercept + weight1 × input1 + ... + weight6 × input6 (where the ... is a shorthand notation meaning that the sum include all the terms from 1 to 6).



그 다음 우리는 다음과 같이 linear combination을 계산할 수 있습니다.

linear combination = intercept + weight1 × input1 + ... + weight6 × input6 

(여기서 ...는 합계에 1에서 6까지의 모든 항이 포함되어 있음을 의미하는 약식 표기입니다.)



With some example numbers we could then get:


숫자로 하면 다음과 같이 됩니다.



10.0 + 5.4 × 8 + (-10.2) × 5 + (-0.1) × 22 + 101.4 × (-5) + 0.0 × 2 + 12.0 × (-3) = -543.0




AWS DeepLens - Deep learning enabled video camera for developers

아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.




Exercise 21: Weights and inputs


In this exercise, consider the following expression that has both weights and inputs: 10.0 + 5.4 × 8 + (-10.2) × 5 + (-0.1) × 22 + 101.4 × (-5) + 0.0 × 2 + 12.0 × (-3) = -543.0




What is the intercept term in the expression? 

a) 543.0 

b) 10.0 

c) -3 

d) 5.4?



What are the inputs? 

a) 8, 5, 22, -5, 2, -3 

b) 5.4, 8, -10.2, 5, -0.1, 22, 101.4, -5, 0.0, 2, 12.0, -3 

c) 5.4, -10.2, -0.1, 101.4, 0.0, 12.0 

d) 43.2, -51.0, -2.2, -507.0, 0.0, -36.0



Which of the inputs needs to be changed the least to increase the output by a certain amount? 

a) first 

b) second 

c) third 

d) fourth



What happens when the fifth input is incremented by one? 

a) nothing 

b) the output increases by one 

c) the output increases by two 

d) something else




The weights are almost always learned from data using the same ideas as in linear or logistic regression, as discussed previously. But before we discuss this in more detail, we’ll introduce another important stage that a neuron completes before it sends out an output signal.



weights는 이전에 논의 된 것처럼 linear 또는 logistic regression 에서와 같은 아이디어를 사용하여 거의 항상 데이터로부터 얻어지게 됩니다. 우리가 좀 더 자세한 것들을 논의하기 전에 다른 중요한 stage를 소개해 드릴 겁니다. 그것은 뉴런이 출력 신호를 보내기 전에 완성하게 되는 것입니다.




Activations and outputs


Once the linear combination has been computed, the neuron does one more operation. It takes the linear combination and puts it through a so called activation function. Typical examples of the activation function include:



일단 linear combination이 계산되면, 뉴런은 한 번 더 연산을 수행합니다. linear combination을 취하여 소위 활성화 함수를 통해 전달합니다. activation function의 일반적인 예는 다음과 같습니다.



  • identity function: do nothing and just output the linear combination
  • step function: if the value of the linear combination is greater than zero, send a pulse (ON), otherwise do nothing (OFF)
  • sigmoid function: a “soft” version of the step function


- identity function : 아무것도 하지 않고 선형 조합 만 출력합니다.

- step function : linear combination의 값이 0보다 큰 경우 펄스를 보내고 (ON), 그렇지 않으면 아무 것도 하지 않습니다 (OFF)

- sigmoid function : 스텝 함수의 "soft"버전




Note that with the first activation function, the identity function, the neuron is exactly the same as linear regression. This is why the identity function is rarely used in neural networks: it leads to nothing new and interesting.


첫 번째 activation function 인 identity function의 경우, 뉴런은 linear regression와 정확히 동일합니다. 이것이 identity function이 neural networks에서 거의 사용되지 않는 이유입니다. 그것은 새롭고 흥미로운 것은 없습니다.



Note

How neurons activate

Real, biological neurons communicate by sending out sharp, electrical pulses called “spikes”, so that at any given time, their outgoing signal is either on or off (1 or 0). The step function imitates this behavior. However, artificial neural networks tend to use the second kind of activation functions so that they output a continuous numerical activation level at all times. Thus, to use a somewhat awkward figure of speech, real neurons communicate by something similar to the Morse code, whereas artificial neurons communicate by adjusting the pitch of their voice as if yodeling.


실제, 생물학적 뉴런은 "스파이크 (spikes)"라고하는 날카로운 전기 펄스를 전송함으로써 communicate 합니다. 즉 어떤 주어진 시간에 발신 신호가 켜지거나 꺼지게 됩니다 (1 또는 0). step function는 이 동작을 모방합니다. 그러나 artificial neural은 항상 두 번째 종류의 activation functions을 사용하려고 합니다. 그래서 지속적으로 numerical activation level을 출력합니다. 약간 이상한 표현을 하면 실제 뉴런은 모르스 부호와 비슷한 방식으로 의사 소통하는 반면, 인공 뉴런은 그들의 요괴와 같은 목소리를 조정함으로서 소통을 합니다.




The output of the neuron, determined by the linear combination and the activation function, can be used to extract a prediction or a decision. For example, if the network is designed to identify a stop sign in front of a self-driving car, the input can be the pixels of an image captured by a camera attached in front of the car, and the output can be used to activate a stopping procedure that stops the car before the sign.



linear combination 및 activation function에 의해 결정되는 뉴런의 출력은 예측 또는 결정을 추출하는 데 사용될 수 있습니다. 예를 들어, 그 네트워크가 주율 주행 중인 자동차 앞에서 정지 신호를 식별하도록 설계된 경우, 입력은 자동차 앞쪽에 부착 된 카메라로 캡처 한 이미지의 픽셀 일 수 있으며 출력을 사용하여 표지판 앞에서 차를 멈추는 정지 절차를 실행하게 됩니다.



Learning or adaptation in the network occurs when the weights are adjusted so as to make the network produce the correct outputs, just like in linear or logistic regression. Many neural networks are very large, and the largest contain hundreds of billions of weights. Optimizing them all can be a daunting task that requires massive amounts of computing power.



linear 또는 logistic regression와 마찬가지로 네트워크가 올바른 출력을 생성 할 수 있도록 weights가 조정될 때 네트워크에서의 학습(Learning) 또는 적응(adaptation)이 발생합니다. 많은 neural networks들은 그 규모가 매우 크며, 가장 큰 신경망은 수천억 개의 weights를 포함합니다. 이들 모두를 최적화하는 것은 엄청난 양의 컴퓨팅 능력을 요구하는 어려운 작업 일 수 있습니다.







Exercise 22: Activations and outputs

Below are graphs for three different activation functions with different properties. First we have the sigmoid function, then the step function, and finally the identity function.


다음은 서로 다른 특성을 가진 세 가지 다른 activation functions에 대한 그래프입니다. 먼저 sigmoid functions, step functions, 마지막으로 identity functions를 사용합니다.













Which of the activations described above give: 

the largest output for an input of 5?

Sigmoid

Linear

Step


the smallest output for an input of -5?

Sigmoid

Linear

Step


the largest output for an input of -2.5?

Sigmoid

Linear

Step




Perceptron: the mother of all ANNs


The perceptron is simply a fancy name for the simple neuron model with the step activation function we discussed above. It was among the very first formal models of neural computation and because of its fundamental role in the history of neural networks, it wouldn’t be unfair to call it the “Mother of all Artificial Neural Networks”.



perceptron은 위에서 논의한 step activation function가있는 간단한 뉴런 모델의 멋진 이름입니다. 그것은 neural computation의 최초의 공식 모델 중 하나 였고 신경망의 역사에서 기초가 되는 역할을 하기 때문에 "모든 Artificial Neural Networks의 어머니"라고 부른다고 해서 틀린 말은 아닙니다.



It can be used as a simple classifier in binary classification tasks. A method for learning the weights of the perceptron from data, called the Perceptron algorithm, was introduced by the psychologist Frank Rosenblatt in 1957. We will not study the Perceptron algorithm in detail. Suffice to say that it is just about as simple as the nearest neighbor classifier. The basic principle is to feed the network training data one example at a time. Each misclassification leads to an update in the weight.



이진 분류(binary classification) 작업에서 간단한 classifier로 사용될 수 있습니다. 퍼셉트론 (Perceptron) 알고리즘이라고 불리는 데이터로부터 퍼셉트론의 가중치를 학습하는 방법은 1957 년 심리학자 Frank Rosenblatt에 의해 도입되었습니다. 우리는 Perceptron 알고리즘을 자세히 연구하지는 않을 것입니다. 그것이 nearest neighbor classifier만큼이나 간단하다고 말할 수 있습니다. 기본 원리는 한 번에 한 가지 예를 들어 네트워크 교육 데이터를 제공하는 것입니다. 각 misclassification에 대해서는 weight가 업데이트됩니다.




Note

AI hyperbole

After its discovery, the Perceptron algorithm received a lot of attention, not least because of optimistic statements made by its inventor, Frank Rosenblatt. A classic example of AI hyperbole is a New York Times article published on July 8th, 1958:
“The Navy revealed the embryo of an electronic computer today that it expects will be able to walk, talk, see, reproduce itself and be conscious of its existence.”

Please note that neural network enthusiasts are not at all the only ones inclined towards optimism. The rise and fall of the logic-based expert systems approach to AI had all the same hallmark features of an AI-hype and people claimed that the final breakthrough is just a short while away. The outcome both in the early 1960s and late 1980s was a collapse in the research funding called an AI Winter.


Perceptron 알고리즘을 발견 한 후 이는 많은 주목을 받았는데, 그 이유는 적어도 발명자 인 Frank Rosenblatt가 말한 낙관적 인 진술(optimistic statements) 때문이었습니다. AI hyperbole의 고전적인 예는 1958 년 7 월 8 일에 출판 된 New York Times의 기사입니다.

"해군은 오늘 전자 컴퓨터의 배아가 걸을 수 있고, 말하고,보고, 복제하고, 존재를 의식 할 수있을 것으로 기대한다고 밝혔다.


신경망 애호가가 낙관적 인 경향이있는 것은 아닙니다. AI에 대한 logic-based expert systems 접근법의 인기 상승과 하락은 AI-hype(과장된 AI)의 그것과 거의 같이 갔습니다. 사람들은 최종 목표 지점이 얼마 안 남았다고 주장했죠. 1960 년대 초반과 1980 년대 후반의 두 접근법이 보여준 결과는 AI Winter라고하는 연구 기금의 붕괴였다.




The history of the debate that eventually lead to almost complete abandoning of the neural network approach in the 1960s for more than two decades is extremely fascinating. The article A Sociological Study of the Official History of the Perceptrons Controversy by Mikel Olazaran (published in Social Studies of Science, 1996) reviews the events from a sociology of science point of view. Reading it today is quite thought provoking. Reading stories about celebrated AI heroes who had developed neural networks algorithms that would soon reach the level of human intelligence and become self-conscious can be compared to some statements made during the current hype. If you take a look at the above article, even if you wouldn't read all of it, it will provide an interesting background to today's news. Consider for example an article in the MIT Technology Review published in September 2017, where Jordan Jacobs, co-founder of a multimillion dollar Vector institute for AI compares Geoffrey Hinton (a figure-head of the current deep learning boom) to Einstein because of his contributions to development of neural network algorithms in the 1980s and later. Also recall the Human Brain project mentioned in the previous section.



결국 20 년 넘게 계속된 1960 년대식 neural network 접근법이 완전히 포기하게 되는 과정의 논쟁은 아주 많이 흥미롭습니다. 미켈 올 라자 란 (Mikel Olazaran)의 퍼셉트론 논란 (Perceptrons Controversy)의 공식 역사에 관한 사회 학적 연구 (1996 년 사회학 출판)는 과학적 관점에서 사회학의 사건을 검토합니다. 오늘 그것을 읽는 것은 상당히 자극적이라고 생각합니다. 곧 인간 지능 수준에 도달하고 자의식이되는 신경 회로망 알고리즘을 개발 한 유명한 AI 영웅에 관한 이야기를 읽는 것은 현재 과대 광고 중에 작성된 일부 표현과 비교할 수 있습니다. 위의 기사를 살펴보면 모든 기사를 읽지 않더라도 오늘의 뉴스에 흥미로운 배경을 제공합니다. 예를 들어, 2017 년 9 월에 발표 된 MIT Technology Review의 기사에서 인공 지능을 위한 수백만 달러짜리 벡터 neural network 알고리즘의 개발에 공헌한 정도를 아인슈타인과 비교하기도 합니다. 이전 섹션에서 언급 한 Human Brain 프로젝트를 상기 해보십시오.



According to Hinton, “the fact that it doesn’t work is just a temporary annoyance.” (Although according to the article, Hinton is laughing about the above statement, so it's hard to tell how serious he is about it.) The Human Brain project claims to be “close to a profound leap in our understanding of consciousness“. Doesn't that sound familiar?



Hinton에 따르면, "그것이 제대로 작동하지 않는다는 팩트는 그냥 일시적인 불편함일 뿐이다."(기사에 따르면 Hinton은 위의 문장에 대해 웃음을 짓고 있지만 그가 얼마나 그것에 대해 serious 했는지에 대해서는 자세하 알 수 없습니다.) The uman Brain 프로젝트는 "의식에 대한 우리의 이해에 있어 중대한 도약에 가깝다"고 주장합니다. 왠지 그 표현이 귀에 익숙하지 않으세요?



No-one really knows the future with certainty, but knowing the track record of earlier annoucements of imminent breakthroughs, some critical thinking is advised. We'll return to the future of AI in the final Chapter, but for now, let's see how artificial neural networks are built.


아무도 확실하게 미래를 알지 못하지만, 그것을 해결하기 위해 연구한 이전에 발표 들을 따라가다 보면 더 낳은 어떤 중요한(비판적인) 생각들을 할 수 있습니다.  우리는 마지막 장에서 인공 지능의 미래로 돌아갈 것이지만, 지금은 인공 신경 네트워크가 어떻게 만들어 지는지 보도록하겠습니다.




Putting neurons together: networks



A single neuron would be way too simple to make decisions and prediction reliably in most real-life applications. To unleash the full potential of neural networks, we can use the the output of one neuron as the input of other neurons, whose outputs can be the input to yet other neurons, and so on. The output of the whole network is obtained as the output of a certain subset of the neurons, which are called the output layer. We’ll return to this in a bit, after we discussed the way neural networks adapt to produce different behaviors by learning their parameters from data.



하나의 뉴런은 대부분의 실제 애플리케이션에서 안정적으로 의사 결정과 예측을 내리기에는 너무 단순합니다. 신경 네트워크의 모든 잠재력을 발휘하기 위해 우리는 한 뉴런의 출력을 다른 뉴런의 입력으로 사용할 수 있으며 그 출력은 다른 뉴런에 대한 입력이 될 수 있어야 합니다. 전체 네트워크의 출력은 출력 레이어라고하는 뉴런의 특정 하위 집합의 출력으로 얻어집니다. 우리는 신경 네트워크가 데이터로부터 매개 변수를 학습함으로써 다른 행동을 생산하는 방식에 대해 논의한 후에 이 부분으로 조금 돌아가 보겠습니다.



Key terminology

Layers

Often the network architecture is composed of layers. The input layer consists of neurons that get their inputs directly from the data. So for example, in an image recognition task, the input layer would use the pixel values of the input image as the inputs of the input layer. The network typically also has hidden layers that use the other neurons´ outputs as their input, and whose output is used as the input to other layers of neurons. Finally, the output layer produces the output of the whole network. All the neurons on a given layer get inputs from neurons on the previous layer and feed their output to the next.


종종 네트워크 아키텍처는 레이어로 구성됩니다. 입력 레이어는 데이터에서 직접 입력을받는 뉴런으로 구성됩니다. 예를 들어 이미지 인식 작업에서 입력 레이어는 입력 이미지의 픽셀 값을 입력 레이어의 입력으로 사용합니다. 네트워크는 일반적으로 입력으로 다른 뉴런의 출력을 사용하는 숨겨진 레이어가 있으며, 출력은 뉴런의 다른 레이어에 대한 입력으로 사용됩니다. 마지막으로 출력 레이어는 전체 네트워크의 출력을 생성합니다. 주어진 레이어의 모든 뉴런은 이전 레이어의 뉴런에서 입력을 받아 다음 레이어로 출력합니다.




A classical example of a multilayer network is the so called multilayer perceptron. As we discussed above, Rosenblatt’s Perceptron algorithm can be used to learn the weights of a perceptron. For multilayer perceptron, the corresponding learning problem is way harder and it took a long time before a working solution was discovered. But eventually, one was invented: the so called backpropagation algorithm lead to a revival of neural networks in the late 1980s. It is still at the heart of many of the most advanced deep learning solutions.



다층 네트워크의 고전적인 예는 소위 다층 퍼셉트론 (multilayer perceptron)이라고 합니다. 위에서 언급했듯이 Rosenblatt의 Perceptron 알고리즘을 사용하여 퍼셉트론의 weights를 학습 할 수 있습니다. 다층 퍼셉트론의 경우, 해당 학습 문제가 더욱 어렵습니다. 그 작업의 솔루션을 발견하기까지는 더 많은 시간이 걸릴겁니다. 그러나 결과적으로, 하나는 발명되었습니다. : 소위 역 전파 알고리즘은 1980 년대 후반에 신경 회로망을 부활시키게 됩니다. 그것은 여전히 가장 진보 된 많은 deep learning 솔루션의 핵심입니다.



Note

Meanwhile in Helsinki...

The path(s) leading to the backpropagation algorithm are rather long and winding. An interesting part of the history is related to the computer science department of the University of Helsinki. About three years after the founding of the department in 1967, a Master’s thesis was written by a student called Seppo Linnainmaa. The topic of the thesis was “Cumulative rounding error of algorithms as a Taylor approximation of individual rounding errors” (the thesis was written in Finnish, so this is a translation of the actual title “Algoritmin kumulatiivinen pyöristysvirhe yksittäisten pyöristysvirheiden Taylor-kehitelmänä”).

The automatic differentiation method developed in the thesis was later applied by other researchers to quantify the sensitivity of the output of a multilayer neural network with respect to the individual weights, which is the key idea in backpropagation.


backpropagation 알고리즘으로 이끄는 길은 다소 길며 어려움이 있습니다. 그 역사에서 흥미로운 부분은 헬싱키 대학의 컴퓨터 과학과 관련되어 있습니다. 1967 년에 학과가 창립 된 지 약 3 년 후, Seppo Linnainmaa라는 학생이 석사 논문을 썼습니다. 이 논문의 주제는 "Cumulative rounding error of algorithms as a Taylor approximation of individual rounding errors" (논문은 핀란드어로 작성되었으므로 실제 제목 인 "Algoritmin kumulatiivinen pyöristysvirhe yksittäist pyöristysvirheiden Taylor-kehitelmänä"번역본)입니다.


이 논문에서 개발 된 자동 차별화 (automatic differentiation) 방법은 다른 연구원에 의해 나중에 역 전파에서 핵심 아이디어 인 개별 가중치에 대한 다층 신경망 출력의 민감도를 정량화하기 위해 적용되었습니다.



A simple neural network classifier


To give a relatively simple example of using a neural network classifier, we'll consider a task that is very similar to the MNIST digit recognition task, namely classifying images in two classes. We will first create a classifier to classify whether an image shows a cross (x) or a circle (o). Our images are represented here as pixels that are either colored or white, and the pixels are arranged in 5 × 5 grid. In this format our images of a cross and a circle (more like a diamond, to be honest) look like this:


neural network classifier를 사용하는 비교적 간단한 예제를 제공하기 위해, 우리는 MNIST digit recognition 태스크와 매우 유사한 태스크, 즉 2 개의 클래스로 이미지를 분류하는 태스크를 살펴 볼 겁니다. 먼저 이미지에 가위 표시 (x) 또는 원 (o) 표시 여부를 분류하는 분류자(classifier)를 만듭니다. 우리의 이미지는 여기에 색깔이 있거나 흰색 인 픽셀로 표현되며 픽셀은 5x5 격자로 배열됩니다. 이 형식에서는 가위표시와 원 (솔직히 다이아몬드와 더 비슷합니다.)의 이미지가 다음과 같이 보입니다.






In order to build a neural network classifier, we need to formalise the problem in a way where we can solve it using the methods we have learned. Our first step is to represent the information in the pixels by a numerical values that can be used as the input to a classifier. Let's use 1 if the square is colored, and 0 if it is white. Note that although the symbols in the above graphic are of different color (green and blue), our classifier will ignore the color information and use only the colored/white information. The 25 pixels in the image make the inputs of our classifier.



neural network classifier를 만들기 위해서는 우리가 배운 방법을 사용하여 문제를 공식화해야합니다. 첫 번째 단계는 픽셀의 정보를 분류 기준의 입력으로 사용할 수있는 숫자 값으로 표현하는 것입니다. 사각형에 색이 칠해지면 1을, 흰색이면 0을 사용하기로 하겠습니다. 위의 그림에서는 다른 색상 (녹색 및 파란색)이지만 우리의 classifier는 색상 정보를 무시하고 colored/white 만 사용할 겁니다. 이미지에 있는 25개의 픽셀이 우리의 classifier의 입력을 만듭니다.



To make sure that we know which pixel is which in the numerical representation, we can decide to list the pixels in the same order as you'd read text, so row by row from the top, and reading each row from left to right. The first row of the cross, for example, is represented as 1,0,0,0,1; the second row as 0,1,0,1,0, and so on. The full input for the cross input is then: 1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1.



어떤 픽셀이 어떤 숫자 인지 알기 위해 텍스트를 읽는 순서와 같은 순서로 픽셀을 나열하기 때문에 위쪽에서 행 단위로 정렬하고 각 행을 왼쪽에서 오른쪽으로 읽는 방식으로 결정할 수 있습니다. 예를 들어 십자가의 첫 번째 행은 1,0,0,0,1로 표시됩니다. 두 번째 행은 0,1,0,1,0과 같이 나타납니다. 가위표에 대한 전체 입력은 다음과 같습니다. 1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0, 1,0,0,0,1.



We'll use the basic neuron model where the first step is to compute a linear combination of the inputs. Thus need a weight for each of the input pixels, which means 25 weights in total.


첫 번째 단계는 입력의 linear combination을 계산하는 기본 뉴런 모델을 사용합니다. 따라서 각 입력 픽셀에 대해 weight가 필요합니다. 즉 총 25 개의 weight를 의미합니다.



Finally, we use the step activation function. If the linear combination is negative, the neuron activation is zero, which we decide to use to signify a cross. If the linear combination is positive, the neuron activation is one, which we decide to signify a circle.


마지막으로 step activation function를 사용합니다. linear combination이 음수이면 뉴런 활성화는 0이며 가위표를 나타내는 데 사용하기로 결정합니다. 선형 조합이 양수이면, 뉴런 활성화는 하나이며, 이는 우리가 원을 나타 내기로 결정한 것입니다.



Let's try what happens when all the weights take the same numerical value, 1. With this setup, our linear combination for the cross image will be 9 (9 colored pixels, so 9 × 1, and 16 white pixels, 16 × 0), and for the circle image it will be 8 (8 colored pixels, 8 × 1, and 17 white pixels, 17 × 0). In other words, the linear combination is positive for both images and they are thus classified as circles. Not a very good result given that there are only two images to classify.



모든 weights가 동일한 숫자 값 1을 사용하면 어떻게되는지 시도해 봅시다. 이 설정을 사용하면 가위표 이미지에 대한 선형 조합이 9 (9 colored pixels, so 9 × 1, and 16 white pixels, 16 × 0)가 됩니다. 원 이미지의 경우 8 (8 colored pixels, 8 × 1, and 17 white pixels, 17 × 0)이 됩니다. 즉, linear combination은 두 이미지에 대해 양의 값을 갖기 때문에 원으로 분류됩니다. 분류 할 이미지가 두 개 뿐인 경우 매우 좋은 결과는 아니죠.



To improve the result, we need to adjust the weights in such a way that the linear combination will negative for a cross and positive for a circle. If we think about what differentiates images of crosses and circles, we can see that circles have no colored pixels in the center of the image, whereas crosses do. Likewise, the pixels at the corners of the image are colored in the cross, but white in the circle.



결과를 개선하려면 linear combination이 가위표에 대해 음수이고 원에 대해 양수가되는 방식으로 가중치를 조정해야합니다. 가위표와 원의 이미지를 구별하는 것에 대해 생각해 보면 원은 이미지의 중심에 컬러 픽셀이없고 십자가는 볼 수 있습니다. 마찬가지로 이미지 모서리에있는 픽셀은 십자가에 표시되지만 원에는 흰색으로 표시됩니다.



We can now adjust the weights. There are an infinite number of weights that do the job. For example, assign weight -1 to the center pixel (the 13th pixel), and weight 1 to the pixels in the middle of each of the four sides of the image, letting all the other weights be 0. Now, for the cross input, the center pixel produce the value –1, while for all the other pixels either the pixel value of the weight is 0, so that –1 is also the total value. This leads to activation 0, and the cross is correctly classified.



이제 우리는 weights를 조정할 수 있습니다. 그 일을 하는 무한한 가중치가 있습니다. 예를 들어, 중심 픽셀 (13 번째 픽셀)에 가중치 -1을 할당하고 이미지의 네면의 중간에있는 픽셀에 가중치 1을 할당하여 다른 모든 가중치를 0으로 만듭니다. 이제 교차 입력 중심 픽셀은 값 -1을 생성하지만 다른 모든 픽셀에 대해서는 가중치의 픽셀 값이 0이므로 -1도 총 값입니다. 이로 인해 활성화 0이 발생하고 가위표가 올바르게 분류됩니다.



How about the circle then? Each of the pixels in the middle of the sides produces the value 1, which makes 4 × 1 = 4 in total. For all the other pixels either the pixel value or the weight is zero, so 4 is the total. Since 4 is a positive value, the activation is 1, and the circle is correctly recognized as well.



그럼 원은? 변의 중간에있는 각 픽셀은 값 1을 생성하며, 총 4 × 1 = 4가됩니다. 다른 모든 픽셀의 경우 픽셀 값 또는 가중치가 0이므로 4가 합계입니다. 4가 양수이므로 활성화는 1이며 원이 올바르게 인식됩니다.




Happy or not?


We will now follow similar reasoning to build a classifier for smiley faces. You can assign weights to the input pixels in the image by clicking on them. Clicking once sets the weight to 1, and clicking again sets it to -1. The activation 1 indicates that the image is classified as a happy face, which can be correct or not, while activation –1 indicates that the image is classified as a sad face.


우리는 똑같은 추론(reasoning)을 따라 웃는 얼굴을위한 classifier를 만들 것입니다. 이미지의 입력 픽셀을 클릭하여 weights를 지정할 수 있습니다. 한 번 클릭하면 weights가 1로 설정되고 다시 클릭하면 -1로 설정됩니다. 활성화 1은 이미지가 행복한 얼굴로 분류됨을 나타내며, 활성화 -1은 이미지가 슬픈 얼굴로 분류되었음을 나타냅니다.



Don't be discouraged by the fact that you will not be able to classify all the smiley faces correctly: it is in fact impossible with our simple classifier! This is one important learning objective: sometimes perfect classification just isn't possible because the classifier is too simple. In this case the simple neuron that uses a linear combination of the inputs is too simple for the task. Observe how you can build classifiers that work well in different cases: some classify most of the happy faces correctly while being worse for sad faces, or the other way around.


모든 웃는 얼굴을 정확하게 분류 할 수 없다는 사실로 인해 낙담하지 마십시오. 우리의 간단한 classifier로는 실제로 불가능합니다! 이는 중요한 학습 목표 중 하나입니다. classifier가 너무 간단하기 때문에 완벽한 분류가 불가능한 경우도 있습니다. 이 경우 입력의 선형 조합을 사용하는 단순한 뉴런은 이 작업을 하기에 너무 간단합니다. 다른 경우에 잘 작동하는 classifier를 제작하는 방법을 관찰하십시오. 일부는 행복한 얼굴 대부분을 올바르게 분류하고 슬픈 얼굴이나 그 반대의 경우에도 마찬가지 입니다.



Can you achieve 6/8 correct for both happy and sad faces?







반응형

Elements of AI - Neural network basics

2018. 6. 23. 04:21 | Posted by 솔웅


반응형


Elements of AI





Our next topic, deep learning and neural networks, tends to attract more interest than many of the other topics.

우리의 다음 주제 인 deep learning과 neural networks는 다른 많은 주제보다 많은 관심을 끌고 있습니다.



One of the reasons for the interest is the hope to understand our own mind, which emerges from neural processing in our brain. Another reason is the advances in machine learning achieved within the recent years by combining massive data sets and deep learning techniques.


관심의 이유 중 하나는 우리 뇌의 신경 처리에서 나오는 우리 자신의 마음을 이해할 수 있다는 희망입니다. 또 다른 이유는 방대한 데이터 세트와 deep learning 기술을 결합하여 최근 몇 년 동안 machine learning이 발전했기 때문입니다.





What are neural networks?


To better understand the whole, we will start by discussing the individual units that make it up. A neural network can mean either a “real” biological neural network such as the one in your brain, or an artificial neural network simulated in a computer.



전반적인 내용을 더 잘 이해하기 위해 그것을 구성하는 개별 단위에서 부터 시작하겠습니다. neural network은 여러분의 뇌와 같은 "실제" 생물학적 신경망 또는 컴퓨터에서 시뮬레이션 된 인공 신경망을 의미 할 수 있습니다.




Key terminology

Deep learning

Deep learning refers to certain kinds of machine learning techniques where several “layers” of simple processing units are connected in a network so that the input to the system is passed through each one of them in turn. This architecture has been inspired by the processing of visual information in the brain coming through the eyes and the captured by the retina. This depth allows the network to learn more complex structures without requiring unrealistically large amounts of data.


Deep learning이란 간단한 처리 장치들(processing units)의 여러 "계층 layers"이 하나의 네트워크 안에서 연결되어 시스템에 들어오는 입력들을 순서대로 각 레이어에 있는 유닛들에게 전달되게하는 machine learning 기술의 특정 종류 중 하나입니다. 이 architecture는 눈을 통해 망막에 포착되고 그것이 뇌에 전달되는 시각 정보의 처리과정에서 착안 됐습니다. 이 depth 덕분에 네트워크는 비현실적으로 많은 양의 데이터를 요구하지 않고도 더 복잡한 구조를 학습 할 수 있게 됐습니다.





AWS DeepLens - Deep learning enabled video camera for developers

아마존 AWS DeepLens는 Deep learning을 배울 수 있는 개발자용 비디오 카메라 입니다.
2018년 6월부터 판매하고 있습니다. 구매를 원하시면 위 이미지 링크를 클릭하세요.



Neurons, cell bodies, and signals

A neural network, either biological and artificial, consists of a large number simple units, neurons, that receive and transmit signals to each other. The neurons are very very simple processors of information, consisting of a cell body and wires that connect the neurons to each other. Most of the time, they do nothing but sit still and watch for signals coming in through the wires.


생물학적이든 인공적이든 neural network는 , 서로 신호를주고 받는 많은 수의 simple units, 뉴런으로 구성됩니다. 뉴런은 정보를 처리하는 아주아주 간단한 프로세서로서 뉴런들을 서로 연결하는 cell body와 wires로 구성돼 있습니다. 대부분의 경우, 그들은 아무것도하지 않고 조용히 앉아서 wires들을 통해 들어오는 신호를 주시합니다.


Dendrites, axons, and synapses

In the biological lingo, we call the wires that provide the input to the neurons dendrites. Sometimes, depending on the incoming signals, the neuron may fire and send a signal out for the other neurons to receive. The wire that transmits the outgoing signal is called an axon. Each axon may be connected to one or more dendrites at intersections that are called synapses.


생물학적 용어에서 우리는 뉴런 수상 돌기(neurons dendrites)에 입력을 제공하는 wires를 호출합니다. 때로는 들어오는 신호에 따라 뉴런은 signal을 발사해 다른 뉴런이 받을 수 있도록 보내기도 합니다. 발신 신호를 전송하는 wire을 축삭(axon)이라고합니다. 각 축색 돌기(axon)는 시냅스(synapses)라고하는 교차점에서 하나 이상의 수상 돌기(dendrites) 에 연결될 수 있습니다.





Isolated from its fellow-neurons, a single neuron is quite unimpressive, and capable of only a very restricted set of behaviors. When connected to each other, however, the system resulting from their concerted action can become extremely complex. (Exhibit A: your brain.) The behavior of the system is determined by the ways in which the neurons are wired together. Each neuron reacts to the incoming signals in a specific way that can also adapt over time. This adaptation is known to be the key to functions such as memory and learning.



동료 뉴런과 분리 된 단일 뉴런은 전혀 인상적이지 않으며(unimpressive) 매우 제한된 일련의 행동 만 수행 할 수 있습니다. 그러나 서로 연결될 때 그들의 공동 작업으로 인해 발생하는 시스템 결과는 매우 복잡해질 수 있습니다. (예 A : 당신의 뇌.) 시스템의 행동은 뉴런들이 함께 연결되는 방식에 의해 결정됩니다. 각 뉴런은 시간이 지나면서 적응될 수 있는 특정 방식으로 들어오는 신호에 반응합니다. 이러한 적응은 기억 및 학습과 같은 기능의 핵심으로 알려져 있습니다.





Exercise 20. Elements of a neural network


Label the different components of a neuron into the above diagram



아래 다이어그램에 뉴런의 여러 구성 요소들의 이름을 맞춰보세요.





- Synapse (connection)


- Dendrite (input)

- Cell body

- Axon (output)




Why develop artificial neural networks?



The purpose of building artificial models of the brain can be neuroscience, the study of the brain and the nervous system in general. It is tempting to think that by mapping the human brain in enough detail, we can discover the secrets of human and animal cognition and consciousness.



뇌에 대한 인공 모델을 만드는 목적은 일반적인 뇌와 신경에 대한 연구를 하는 신경과학(neuroscience)이 될 수 있습니다. 인간의 두뇌를 충분히 자세하게 매핑함으로써 인간과 동물의 인지와 의식의 비밀을 발견 할 수 있다고 생각되는 아주 매력적인 일이죠.



Note

Modeling the brain

The BRAIN Initiative led by American neuroscience researchers is pushing forward technologies for imaging, modeling, and simulating the brain at a finer and larger scale than before. Some brain research projects are very ambitious in terms of objectives. The Human Brain Project promised about 5 years ago that “the mysteries of the mind can be solved - soon”. After years of work, the Human Brain Project was facing questions about when the billion euros invested by the European Union will deliver what was promised, even though, to be fair, some less ambitious milestones have been achieved.


미국의 신경 과학 연구자들이 주도하는 BRAIN Initiative는 이전보다 더 세세하고 광범위하게 뇌에대한 imaging, modeling, and simulating에 대한 기술을 발전 시키고 있습니다. 일부 뇌 연구 프로젝트는 목표 측면에서 매우 야심적입니다. 인간 두뇌 프로젝트 (Human Brain Project)는 약 5 년 전에 "mind (마음)에 대한 신비가 곧 풀릴 수있다"고 약속했습니다. 유럽 연합 (EU)이 10 억 유로를 투자했고 그걸 기반으로 수년간의 작업이 진행됐습니다. 이제 휴먼 브레인 프로젝트 (Human Brain Project)는 약속 한 내용을 언제 제공 할 것인가에 대한 질문에 직면 해 있습니다. 그럼에도 불구하고 객관적으로 볼 때 이 프로젝트는 약속한 야심 보다는 적은 야심의 마일스톤을 달성하기는 했습니다.



However, even while we seem to be almost as far from understanding the mind and consciousness, there are clear milestones that have been achieved in neuroscience. By better understanding of the structure and function of the brain, we are already reaping some concrete rewards. We can, for instance, identify abnormal functioning and try to help the brain avoid them and reinstate normal operation. This can lead to life-changing new medical treatments for people suffering from neurological disorders: epilepsy, Alzheimer’s disease, problems caused by developmental disorders or damage caused by injuries, and so on.



어쨌든 지금은 우리가 마음과 의식을 이해하는 것에서 거의 멀리 떨어져있는 것처럼 보이지만 신경 과학(neuroscience)에서 성취 된 명확한 이정표(milestones)들이 있습니다. 뇌의 구조와 기능을 더 잘 이해함으로써 우리는 이미 어떤 견고한 보상을 받고 있습니다. 예를 들어 우리는 어떤 비정상적인 기능을 식별하고 뇌가 그런 비정상적인 상황을 피하고 정상적인 상태로 되돌아 오도록 도울 수 있습니다. 이것은 간질(neurological disorders), 알츠하이머, 발달 장애로 인한 문제 또는 부상으로 인한 손상 등 신경계 질환으로 고통받는 사람들을 위해 삶을 변화시키는 새로운 치료법으로 이어질 수 있습니다.



Note

Looking to the future: brain computer interfaces

One research direction in neuroscience is brain-computer interfaces that allow interacting with a computer by simply thinking. The current interfaces are very limited and they can be used, for example, to reconstruct on a very rough level what a person is seeing, or to control robotic arms or drones by thought. Perhaps some day we can actually implement a thought reading machine that allows precise instructions but currently they belong to science fiction. It is also conceivable that we could feed information into the brain by stimulating it by small electronic pulses. Such stimulation is currently used for therapeutic purposes. Feeding detailed information such as specific words, ideas, memories, or emotions is at least currently science fiction rather than reality, but obviously we know neither the limits of such technology, nor how hard it is to reach them.


신경 과학(neuroscience) 분야에 대한 한 연구 방향은 brain-computer interfaces로 단순하게 생각하는 컴퓨터와 상호 작용할 수 있도록 하는 겁니다. 현재의 인터페이스는 매우 제한되어 있지만 실제 사용하는 분야가 있기도 합니다. 예를 들어 사람이 보고있는 것을 매우 거칠지만 재구성할 수 있구요, 생각으로 로봇 팔이나 드론을 조종 하는 것 등이 가능합니다. 어쩌면 언젠가는 정확하게 생각을 읽는 기계를 실제로 구현할 수 있겠습니다만 아직까지 그것은 공상과학소설의 영역입니다.. 우리는 작은 전자 펄스(electronic pulses)로 자극함으로서 뇌로 정보를 제공할 수 있다고 생각합니다. 이러한 자극은 현재 치료(therapeutic ) 목적으로 사용됩니다. 특정 단어, 아이디어, 추억 또는 감정과 같은 자세한 정보를 제공하는 것은 아직까지는 현실보다는 공상과학소설에만 존재하고 그것을 현실화 하는게 얼마나 어려울지도 아직 가늠하기 힘든 수준입니다. 







We’ve drifted a little astray from the topic of the course. In fact, another main reason for building artificial neural networks has little to do with understanding biological systems. It is to use biological systems as an inspiration to build better AI and machine learning techniques. The idea is very natural: the brain is an amazingly complex information processing system capable of a wide range of intelligent behaviors (plus occasionally some not-so-intelligent ones), and therefore, it makes sense to look for inspiration in it when we try to create artificially intelligent systems.



우리는 코스의 주제에서 약간의 벗어나 버렸네요. 사실, 인공 신경 네트워크를 구축하는 또 다른 주된 이유는 생물학적 시스템을 이해하는 것과 거의 관련이 없습니다. 더 나은 AI 및 기계 학습 기술을 구축하는 데 대한 영감으로 생물학적 시스템을 사용하는 것입니다. 그 아이디어는 매우 자연 스러운 것입니다. 두뇌는 다양한 지능적 행동 (때로는 그렇게 지능적이지는 않은 행동들도 포함)이 가능하도록 하는 놀랍도록 복잡한 정보 처리 시스템이므로, 우리가 인공 지능 시스템을 만드려고 할 때 영감을 받기 위해 살펴 보는 것은 당연한 일입니다. 



Neural networks have been a major trend in AI since the 1960s. We’ll return to the waves of popularity in the history of AI in the final part. Currently neural networks are again at the very top of the list as deep learning is used to achieve significant improvements in many areas such as natural language and image processing, which have traditionally been sore points of AI.



Neural networks은 1960 년대 이래 인공 지능 분야에서 major trend 입니다. 우리는 마지막 부분에서 인공 지능의 역사에서 waves of popularity를 다룰 겁니다. 현재 neural networks는 deep learning처럼 인공지능 분야 리스트의 맨 위에 있습니다. 전통적으로 인공 지능의 요점이었던 자연 언어 및 이미지 처리와 같은 많은 분야에서 중요한 개선을 이루기 위해 깊은 학습이 사용되므로 현재 신경 네트워크가 목록의 맨 위에 있습니다.





What is so special about neural networks?



The case for neural networks in general as an approach to AI is based on a similar argument as that for logic-based approaches. In the latter case, it was thought that in order to achieve human-level intelligence, we need to simulate higher-level thought processes, and in particular, manipulation of symbols representing certain concrete or abstract concepts using logical rules.



AI에 접근하는 일반적인 의미로서의 neural networks에 대한 케이스는 logic-based 접근법과 argument를 같습니다. 후자의 경우, 인간 수준의 지능을 얻기 위해서는 더 높은 수준의 사고 과정을 시뮬레이션해야하며, 특히 논리적 규칙을 사용하여 특정 구체적 또는 추상적 개념을 나타내는 기호를 조작해야한다고 생각했습니다.



The argument for neural networks is that by simulating the lower-level, “subsymbolic” data processing on the level of neurons and neural networks, intelligence will emerge. This all sounds very reasonable but keep in mind that in order to build flying machines, we don’t build airplanes that flap their wings, or that are made of bones, muscle, and feather. Likewise, in artificial neural networks, the internal mechanism of the neurons is usually ignored and the artificial neurons are often much simpler than their natural counterparts. The eletro-chemical signalling mechanisms between natural neurons are also mostly ignored in artificial models when the goal is to build AI systems rather than to simulate biological systems.



neural networks에 대한 논쟁은 neurons과 neural networks 그리고 지능 수준의 데이터를 처리하는 것보다 낮은 수준인  “subsymbolic” 데이터 처리과정에 의해 가능할 것이라고 생각됐습니다. 이 모든 것은 매우 합리적으로 들릴지 모르지만 비행하는 기계를 만들기 위해 비행기 날개를 퍼덕이게 만들지는 않는다는 것을 유념해 두세요. 우리는 비행기를 만들 때 뼈나 근육, 깃털같은 것들을 만들지는 않습니다. 마찬가지로, artificial neural networks에서 뉴런의 내부 메카니즘은 대개 무시되며 인공 뉴런은 종종 천연 뉴런보다 훨씬 간단합니다. 자연상태의 뉴런 사이의 전기 화학적 신호 메커니즘은 생물학적 시스템을 시뮬레이션하기보다는 인공 지능 시스템을 구축하는 것이 목표 인 인공 모델에서도 대부분 무시됩니다.



Compared to how computers traditionally work, neural networks have certain special features:



컴퓨터가 전통적으로 작동하는 방식과 비교할 때 신경망에는 다음과 같은 특별한 기능이 있습니다.




Neural network key feature 1


For one, in a traditional computer, information is processed in a central processor (aptly named the central processing unit, or CPU for short) which can only focus on doing one thing at a time. The CPU can retrieve data to be processed from the computer’s memory, and store the result in the memory. Thus, data storage and processing are handled by two separate components of the computer: the memory and the CPU. In neural networks, the system consists of a large number of neurons, each of which can process information on its own so that instead of having a CPU process each piece of information one after the other, the neurons process vast amounts of information simultaneously.



첫번째 전통적인 컴퓨터에서 정보는 한 번에 한 가지 일에만 집중할 수있는 중앙 프로세서 (중앙 처리 장치 또는 CPU라고도 함)에서 처리됩니다. CPU는 처리 할 데이터를 컴퓨터 메모리에서 검색하여 처리된 결과를 메모리에 저장할 수 있습니다. 따라서 데이터 저장 및 처리는 컴퓨터의 두 가지 개별 구성 요소 인 메모리와 CPU에서 처리됩니다. neural networks에서 시스템은 많은 수의 뉴런으로 구성되어 있습니다. 각 뉴런은 자체적으로 정보를 처리 할 수 있으므로 CPU가 각 정보를 차례로 처리하는 대신 한 번에 막대한 양의 정보를 동시에 처리합니다.



Neural network key feature 2


The second difference is that data storage (memory) and processing isn’t separated like in traditional computers. The neurons both store and process information so that there is no need to retrieve data from the memory for processing. The data can be stored short term in the neurons themselves (they either fire or not at any given time) or for longer term storage, in the connections between the neurons — their so called weights, which we will discuss below.



두 번째 차이점은 기존의 컴퓨터처럼 데이터 저장 (메모리) 및 처리가 분리되어 있지 않다는 점입니다. 뉴런은 정보의 저장과 처리를 둘 다 합니다. 그러므로 정보를 처리하기 위해 메모리에서 정보를 검색하지 않아도 됩니다. 데이터는 뉴런 안에 혹은 뉴런들간에 연결된 지점에 단기간 또는 장기간 저장될 수 있습니다. (그들은 그 정보를 발사하거나 그냥 가지고 있거나 할 수 있습니다.) 그 연결 점들을 weights라고 하는데 이 부분에 대해 앞으로 살펴 볼 겁니다. 



Because of these two differences, neural networks and traditional computers are suited for somewhat different tasks. Even though it is entirely possible to simulate neural networks in traditional computers, which was the way they were used for a long time, their maximum capacity is achieved only when we use special hardware (computer devices) that can process many pieces of information at the same time. This is called parallel processing. Incidentally, graphics processors (or graphics processing units, GPUs) have this capability and they have become a cost-effective solution for running massive deep learning methods.



이 두 가지 차이점 때문에 neural networks과 전통적인 컴퓨터는 각기 다른 작업에 적합합니다. 전통적인 컴퓨터에서 신경 네트워크를 시뮬레이션하는 것이 가능하기는 하고 그것이 오랫동안 우리가 사용했던 방법이지만 그걸 가능하도록 하는 용량은 동시에 아주 많은 정보조각들을 처리할 수 있는 특별한 하드웨어를 사용해야만 가능합니다. 이것을 병렬 처리(parallel processing)라고합니다. 덧붙여서 그래픽 프로세서 (또는 그래픽 처리 장치, GPU)는 이러한 capability를 갖추고 있으며 대규모 deep learning 방법을 실행하는 데 비용 효율적인 솔루션이 되었습니다.





반응형
이전 1 2 3 다음