comparison thesis/cortex.org @ 450:432f2c4646cb

sleepig.
author Robert McIntyre <rlm@mit.edu>
date Wed, 26 Mar 2014 03:18:57 -0400
parents 09b7c8dd4365
children 0a4362d1f138
comparison
equal deleted inserted replaced
449:09b7c8dd4365 450:432f2c4646cb
661 provided by an experience vector and reliably infering the rest of 661 provided by an experience vector and reliably infering the rest of
662 the senses. 662 the senses.
663 663
664 ** Empathy is the process of tracing though \Phi-space 664 ** Empathy is the process of tracing though \Phi-space
665 665
666 666 Here is the core of a basic empathy algorithm, starting with an
667 667 experience vector: First, group the experiences into tiered
668 proprioceptive bins. I use powers of 10 and 3 bins, and the
669 smallest bin has and approximate size of 0.001 radians in all
670 proprioceptive dimensions.
671
672 Then, given a sequence of proprioceptive input, generate a set of
673 matching experience records for each input.
674
675 Finally, to infer sensory data, select the longest consective chain
676 of experiences as determined by the indexes into the experience
677 vector.
678
679 This algorithm has three advantages:
680
681 1. It's simple
682
683 3. It's very fast -- both tracing through possibilites and
684 retrieving possible interpretations take essentially constant
685 time.
686
687 2. It protects from wrong interpretations of transient ambiguous
688 proprioceptive data : for example, if the worm is flat for just
689 an instant, this flattness will not be interpreted as implying
690 that the worm has its muscles relaxed, since the flattness is
691 part of a longer chain which includes a distinct pattern of
692 muscle activation. A memoryless statistical model such as a
693 markov model that operates on individual frames may very well
694 make this mistake.
695
696 #+caption: Program to convert an experience vector into a
697 #+caption: proprioceptively binned lookup function.
698 #+name: bin
699 #+begin_listing clojure
700 #+begin_src clojure
668 (defn bin [digits] 701 (defn bin [digits]
669 (fn [angles] 702 (fn [angles]
670 (->> angles 703 (->> angles
671 (flatten) 704 (flatten)
672 (map (juxt #(Math/sin %) #(Math/cos %))) 705 (map (juxt #(Math/sin %) #(Math/cos %)))
673 (flatten) 706 (flatten)
674 (mapv #(Math/round (* % (Math/pow 10 (dec digits)))))))) 707 (mapv #(Math/round (* % (Math/pow 10 (dec digits))))))))
675 708
676 (defn gen-phi-scan 709 (defn gen-phi-scan
677 "Nearest-neighbors with spatial binning. Only returns a result if 710 "Nearest-neighbors with binning. Only returns a result if
678 the propriceptive data is within 10% of a previously recorded 711 the propriceptive data is within 10% of a previously recorded
679 result in all dimensions." 712 result in all dimensions."
680 713 [phi-space]
681 [phi-space]
682 (let [bin-keys (map bin [3 2 1]) 714 (let [bin-keys (map bin [3 2 1])
683 bin-maps 715 bin-maps
684 (map (fn [bin-key] 716 (map (fn [bin-key]
685 (group-by 717 (group-by
686 (comp bin-key :proprioception phi-space) 718 (comp bin-key :proprioception phi-space)
687 (range (count phi-space)))) bin-keys) 719 (range (count phi-space)))) bin-keys)
688 lookups (map (fn [bin-key bin-map] 720 lookups (map (fn [bin-key bin-map]
689 (fn [proprio] (bin-map (bin-key proprio)))) 721 (fn [proprio] (bin-map (bin-key proprio))))
690 bin-keys bin-maps)] 722 bin-keys bin-maps)]
691 (fn lookup [proprio-data] 723 (fn lookup [proprio-data]
692 (set (some #(% proprio-data) lookups))))) 724 (set (some #(% proprio-data) lookups)))))
693 725 #+end_src
694 726 #+end_listing
727
728
729 #+caption: Program to calculate empathy by tracing though \Phi-space
730 #+caption: and finding the longest (ie. most coherent) interpretation
731 #+caption: of the data.
732 #+name: longest-thread
733 #+begin_listing clojure
734 #+begin_src clojure
695 (defn longest-thread 735 (defn longest-thread
696 "Find the longest thread from phi-index-sets. The index sets should 736 "Find the longest thread from phi-index-sets. The index sets should
697 be ordered from most recent to least recent." 737 be ordered from most recent to least recent."
698 [phi-index-sets] 738 [phi-index-sets]
699 (loop [result '() 739 (loop [result '()
716 thread-a thread-b)) 756 thread-a thread-b))
717 '(nil) 757 '(nil)
718 threads)] 758 threads)]
719 (recur (concat longest-thread result) 759 (recur (concat longest-thread result)
720 (drop (count longest-thread) phi-index-sets)))))) 760 (drop (count longest-thread) phi-index-sets))))))
761 #+end_src
762 #+end_listing
763
721 764
722 There is one final piece, which is to replace missing sensory data 765 There is one final piece, which is to replace missing sensory data
723 with a best-guess estimate. While I could fill in missing data by 766 with a best-guess estimate. While I could fill in missing data by
724 using a gradient over the closest known sensory data points, averages 767 using a gradient over the closest known sensory data points, averages
725 can be misleading. It is certainly possible to create an impossible 768 can be misleading. It is certainly possible to create an impossible
745 (recur (dec i) (assoc! v (dec i) cur))) 788 (recur (dec i) (assoc! v (dec i) cur)))
746 (recur i (assoc! v i 0)))))) 789 (recur i (assoc! v i 0))))))
747 #+end_src 790 #+end_src
748 #+end_listing 791 #+end_listing
749 792
750
751
752
753 793
754 ** Efficient action recognition with =EMPATH= 794 ** Efficient action recognition with =EMPATH=
795
796 In my exploration with the worm, I can generally infer actions from
797 proprioceptive data exactly as well as when I have the complete
798 sensory data. To reach this level, I have to train the worm with
799 verious exercices for about 1 minute.
755 800
756 ** Digression: bootstrapping touch using free exploration 801 ** Digression: bootstrapping touch using free exploration
757 802
758 * Contributions 803 * Contributions
759 804