개념 노트: 그렇다면, 본능을 프로그래밍할 수 있는가?

Posted on February 08, 2010

약간 이야기가 거꾸로 가는 것 같은 느낌이지만…

목적 지향적 기계장치에 물리적으로 코딩되는 프로그래밍도 있다. 일례로 시계에는 1분이 어느 정도고 1시간은 몇 분인지에 관한 정보가 기계적으로 내재하며, 인간의 신체에는 유전적 프로그래밍이 DNA 형태로 존재한다. 자명종 시계처럼 환경에 따라 수정 가능한 프로그래밍도 있는데, 파블로프의 개가 보여주듯이, 생명계도 후천적으로 프로그래밍할 수 있는 구조다. 일반적 목적 지향성이 있기 때문에 프로그램을 바꾸어 가며 여러 가지 제어를 실행할 수 있는 정보 프로세싱 시스템도 있다. 이를테면 관료제는 혁명이나 쿠테타로 정부의 성격이 완전히 바뀌어도 제어 역량을 상실하지 않는다는 점에서 일반 정보 프로세싱 시스템이다. 생명계에서 발견된 프로그래밍 가능한 구조 중에서 가장 범용적인 것으로는 척추동물의 두뇌, 특히 인간의 두뇌를 들 수 있다. (제임스 R. 베니거 지음, 윤원화 옮김, 컨트롤 레벌루션, 76쪽)

파블로프의 개가 보여주듯이…

그 다음에는 손다이크퍼즐박스 가 말해주듯이…

그리고, 마지막으로 스키너상자 가 말해주듯이… 물론 파블로프의 개도 잘못된 정보로 프로그램 속에 “버그”를 만들 수 있다는 가능성을 보여 주었지만, 특히 스키너의 상자는 이런 “버그”가 어떻게 생기는지를 구체적으로 묘사하였죠.

이 상자로 스키너는 비둘기를 대상으로 ‘미신’에 관한 아주 우아한 실험을 했고, 그 결과 반응 학습이 임의적으로 이루어진다는 것을 보여 주었다. 그는 굶주린 비둘기를 스키너의 상자에 넣은 다음 새가 어떻게 행동하든 상관없이 정기적으로 음식을 제공했다. 얼마 지나지 않아 비둘기가 임의적인 행위를 반복하는 것이 관찰되었다. 한 비둘기는 음식이 제공되는 시간 사이에 상자를 시계 반대 방향으로 두어 번 돌았다. 다른 비둘기는 상자의 위쪽 모서리에 머리를 반복적으로 밀어 넣었다. 한편 고개를 위로 쳐드는 행동을 하는 비둘기도 있었는데, 마치 보이지 않는 빗장을 머리로 들어 올리려는 듯이 보였다. 비둘기는 음식이 제공되기 직전에 자기가 우연히 행하던 동작을 반복하는 것을 배운 터였다. 이를 가리켜 스키너는 ‘미신적’ 행동이라 불렀다. 비둘기들이 마치 자신의 행위가 음식을 만들어 냈다고 믿는 듯이 행동한다는 뜻이었다. 그는 인간들도 이와 비슷하게 미신적 행동을 할 수 있다고 주장했다.
많은 운동선수와 팬들이 행운을 가져다주는 마스코트를 지니고, 시합 전에 이상한 행동을 하는 이유가 이것으로 설명된다. 서브를 넣기 전에 독특한 방식으로 공을 바닥에 튀기는 테니스 선수들이 있다. 고란 이바니세비치는 테니스 토너먼트가 열리는 기간 내내 머리와 수염을 절대 건드리지 않았다고 한다. (크리스 프리스 지음, 인문학에게 뇌과학을 말하다, 153쪽)

결론은 그럴 수 있네요.

개념 노트: 본능은 정교한 통계 프로세서

Posted on February 07, 2010

간단한 실험입니다. 손을 따라 커서가 가게 만들어 놓고, 손은 보지 못하게 가리고 컴퓨터 화면을 보여줍니다. 컴퓨터 화면은 약간 왜곡도 있고, 중간이 지나야 커서를 보여주고, 어떨 때는 아예 커서를 보여주지도 않습니다.

크리스 프리스는 이런 실험을 최초로 한 사람은 1965년 덴마크 심리학자 T.I. 닐센이었고(이때는 커서가 아니라 흰 장갑을 낀 조수의 손을 보여줌), 나중에는 피에르 푸르네레가 리용의 마르크 잔느로 실험실에서 이런 실험을 했다고 합니다 (크리스 프리스, 인문학에게 뇌과학을 말하다, 114쪽).

도대체 이런 실험을 왜 할까요? 크리스 프리스는 이렇게 말합니다.

내 손이 뇌에 직접적으로 연결되어 있으면서도 나는 내 손이 지금 정확히 무엇을 하는지 자각하지 못한다. 이런 관찰 결과는 어디에서 나의 신체가 끝나고 바깥 세계가 시작되는지 그 경계를 모호하게 만든다.

꿈보다 해몽인건지… 꿈보다 해몽의 진짜 사례는 2004년 거의 똑같은 실험을 한 콘라드 쾨딩(Konrad P. Körding: 이렇게 읽는 것 맞나?)과 다니엘 월퍼트(Daniel M. Wolpert)입니다. 이들은 거의 똑같은 실험을 하고, 그 결과를 네이처지에 발표하면서 우리의 지각/운동 학습은 베이즈적인 통계 과정이라고 말합니다 (Bayesian integration in sensory motor learning ). 사실 똑같지는 않습니다. 실험에 참여한 사람들에게 일단 천번 정도 연습해 보게 한 다음에, 그 다음 천번의 결과를 기록했네요.

플라톤이나 데카르트같은 철학자는 본능 대 이성, 직관/감정 대 지성이라고 합니다. 행동경제학에서는 시스템 I과 시스템 II에 대해서 말합니다. 진화심리학에서는 도마뱀의 뇌와 사람의 뇌에 대해서 말합니다. 이 가운데 본능 내지는 감정 내지는 시스템 I 내지는 도마뱀의 뇌가 베이즈 정리를 따르는 정교한 학습/교정 모델이라는거죠. 불확실성이 높아질수록 또는 판단에 짧은 시간이 필요할수록 결국 우리는 본능이나 느낌이나 감에 의존해서 판단할 수 밖에 없는데, 이 본능이나 느낌이나 감은 따지고 보면 단순한 베이즈 모형이라는거죠. NYT에서 좀 더 쉽게 설명해 놓았네요.

When Justine Henin-Hardenne rips a cross-court forehand at the Australian Open or Tom Brady, the New England Patriots quarterback, dodges an onrushing defender, each looks like the very definition of living in the moment. Like other great athletes, they often appear to rely on speed, strength and lightning-fast reactions.
There seems to be little time for highly advanced quantitative analysis that weighs current observations against past experiences to suggest a plan of attack.
But this kind of analysis is precisely what the human brain does when facing a physical challenge, according to a study by two European scientists published in the current issue of Nature. The more uncertainty that people face — be it caused by wind on a tennis court, snow on a football field or darkness on a country highway — the more they make decisions based on their subconscious memory and the less they depend on what they see.
Among researchers, the combining of new information with conventional wisdom is known as Bayesian analysis, and it has become increasingly popular in recent years. Once controversial, because it muddies supposedly pure scientific data with subjective opinion about which prior research is relevant to a particular study, it has gained adherents as the explosion of computing power has allowed the method’s complex formulas to be performed on a basic laptop computer. (Subconsciously, athletes may play like statisticians )

볼프람 슐츠(Wolfram Schultz)에 따르면 이것을 가능하게 하는 것은 도파민이라는 신경물질이라고 합니다. 이게 하는 역할은 우리가 하는 예측이 정확하면 상을 주고(도파민 분비) 예측이 부정확하면 벌을 주는(도파민 안줌) 간단한 반응입니다.

A mechanism for learning exactly what to do to get rewards (or avoid punishments) also exists. It’s called the temporal difference (TD) algorithm. This procedure allows a machine to discover the best sequence of actions to perform in order to get something of value. This procedure is also known as the Actor-Critic model. One part of the program, the Actor, chooses the next action to perform. The other part of the program, the Critic, indicates how good this action was. This critic tells the actor about any errors in the prediction. A good action is one in which the situation we are in now has a value that is higher than the situation we were in before performing the action. The critic is commenting on the change in vlaue from one time to the next (hence ‘temporal difference’). Value is higher after an action that gets you nearere to the reward. This is a way of discovering the pathway that lead to rewared. Value is highest in the place right next to reward. As we move away from the reward, the value gets smaller. By moving toward the places with higher value, we will eventually reach the reward. Of course these value are not actually marked on the real world. they are marked only on the internal model of the world we have in our brains, the model that has been built up by learning and experience.
Wolfram Schultz and the computational scientists Peter Dayan and Reed Montague showed that the behavior of dopamine nerve cells was exactly what you would expect if the monkey’s brain were using the same learning methods as a machine using the TD algorithm. The activity in the dopamine nerve ecells is the prediction error that enables the monkey to learn without a teacher. This kind of learning doesn’t just occur in the nerve cells of monkeys. Learning by prediction can explain the behavior of bees looking for the best flowers and the behavior of humans gambling for money. In both cases learning by prediction creates a map of possible of actions indicating which actions are the most likely to lead to rewards. (Christopher D. Frith, Making up the mind: how the brain creates our mental world, pp. 96-97)

TD 알고리즘에 대한 위키피디어 링크scholarpedia link 입니다. TD 알고리즘과 베이즈 정리 사이의 유사성은 베이즈가 만든 당구공의 위치찾기 문제를 보면 좀 더 쉽게 알 수 있겠네요. “춤추는 술고래의 수학 이야기”라고 번역이 된 “The Drunkard’s Walk”에는 이렇게 나옵니다.

Bayes approached the problem via a metaphor. Imagine we are supplied with a square table and two balls. We roll the first ball onto the table in a manner that makes it equally probable that the ball will come to rest at any point. Our job is to determine, without looking where along the left-right axis the ball stopped. Our tool in this is the second ball, which we may repeatedly roll onto the table in the same manner as the first. With each roll a collaborator notes whether that ball comes to rest to the right or the left of the place where the first ball landed. At the end he informs us of the total number of times the second ball landed in each of the two general locations. The first ball represents the unknown that we wish to gain information about, and the second ball represents the evidence we manage to obtain. If the second ball lands consistently to the right of the first, we can be pretty confident that the first ball rests toward the far left side of the table. If it lands less consistently to the right, we might be less confident of that conclusion, or we might guess that the first ball is situated further to the right. Bayes showed how to determine, based on the data of the second ball, the precise probability that the first ball is at any given point on the left-right axis. And he showed how, given additional data, one should revise one’s initial estimate. In Baysian terminology, the initial estimates are called prior probabilities and the new guesses, posterior probabilities. (Leonard Mlodinow, The Drunkard’s Walk, pp. 110-111)

그러니까, 당구대 위에 공을 하나 굴립니다. 우리 숙제는 그 공의 위치(왼쪽/오른쪽)를 찾아내는 겁니다. 우리가 쓸 방법은 두번째 당구공입니다. 그걸 굴리면 누군가 옆에서 첫번째 공과 비교해서 두번째 공이 어디 있는지 알려줍니다. 그 자료를 기초로 해서 첫번째 공의 위치를 찾아내는거죠. 그러니까, 언제나 두번째 공이 첫번째 공의 오른쪽으로 간다면 그 공은 왼쪽에 붙어 있는거죠. 그리고 여러번 굴렸는데 반반이라면 첫번째 공은 대충 가운데 있는거죠.

그러니까, 도파민을 이용하는 우리의 본능/직관/감정은 베이즈 방법을 활용한 TD 알고리즘의 구현이라는거죠. 어쩌면, 며칠전 이야기한 범생의 전수조사에 대비하여 비즈니스맨이 사용하는 전수조사 도 이것과 통할 수도 있겠네요. 또, 오래전 yes에 대한 서평 에서 쓴 것처럼, 도마뱀의 뇌가 경험치가 낮으면 어떤 결함을 가지게 되는지에 대해서도 연결이 되는 이야기이겠네요.

도마뱀의 뇌는 통계적 사고에 능합니다. 그렇지만, 통계적 사고의 한계인 경험치가 낮느면(즉 데이터가 적으면) 신뢰할 수 없는 결과가 나온다는 한계가 그대로 적용됩니다. 그러니까 아마추어는 괜히 소로스 따라한다고 까불다가 패가망신할 수 있다는거죠. 뱀장사가 하는 말처럼, “애들은 가라”는 거죠.

앞에서 인용한 뉴욕타임즈 기사에는 다음과 같은 두 사람의 이야기가 나옵니다.

“The human brain knows about Bayes’s rule,” said Konrad P. Körding, a postdoctoral researcher at the Institute of Neurology in London, who conducted the study published in Nature along with Daniel M. Wolpert, a professor at the institute…
“I’m quite comfortable with the idea that people use probability,” said Dr. Stigler, the Chicago statistician. “The idea that it’s associated with a Bayesian approach is not quite clear.”

꿈보다 해몽이라니까요…

개념 노트: 잠재의식 광고

Posted on February 05, 2010

그냥 책 전체에 대한 이야기와 구분하기 위해 책이나 웹 등에서 읽다가 부딛친 개념을 따라갈 때 쓰려고 합니다. 그냥 제 생각과 그런걸 정리하려 합니다.

언제인지 몰라도 잠재의식의 힘에 대한 이야기를 할 때면 언제나 빼먹지 않고 나오는 이야기가 바로, 무슨 영화에 팝콘이라든지 콜라라든지 하는 글자를 육안으로 구분할 수 없는 짧은 시간동안 (1/3000초)반복해서 보여주면 사람들이 콜라를 사먹고 팝콘을 더 많이 사먹는다는 이야기인데… 이 이야기를 들을 때마다 이건 영어권 사람에게만 효과가 있는건지, 외국인이 봐도 효과가 있는건지, 또 눈이 의식하지 못할 정도로 짧은 시간 동안에 과연 그 문자를 읽을 수 있는건지, 내지는 차라리 그림을 쓰면 더 효과적일지 않을지 하는 궁금증이 들었었더랬죠.

그런데, 이 이야기는 제임스 비카리 라는 사람이 실험 결과를 내세우면서 일약 유명해졌는데, 그게 나중에 근거가 없음이 밝혀졌음에도 불구하고 일종의 어반 레전드로 자리잡아 누구도 이게 과연 진짜인지 가짜인지 신경쓰지 않고 여전히 그렇게 이야기하고 있다는… 또 그럼에도 불구하고 (효과가 있건 없건) FCC에서는 이런 광고를 금지시키도 했었구요…

In 1957 James Vicary claimed to have inserted two advertising messages, Eat Popcorn and Drink Coca-Cola, in the film Picnic. The messages were shown repeatedly, but their duration was so short that they were never consciously perceived. Vicary claimed that over a six-week period the sales of popcorn rose by 58% and the sales of Coca-Cola rose by 18%. No evidence was ever brought forward to substantiate these claims, and in 1962, Vicary stated that he made up the whole story. Nevertheless many popular books were published based on this report, with titles such as Subliminal Seduction. (Christopher D. Frith, Making up the mind: how the brain creates our mental world, p. 44)

위 책은 “인문학에게 뇌과학을 말하다 (크리스 프리스, 장호연 옮김, 동녘 사이언스)로 번역되어 나왔네요. subliminal advertising 이란 글도 읽어 볼 만 하네요.