Homework 10. Narayanan model exercises.

- Please make sure to read #15 and 16 in the reader before you start the assignment.
- We suggest you try this Bayes Net Tutorial   at your leisure if you want to understand some of the computational principles used in this homework's program.

Hw 10:

Please read Narayanan's latest paper (in postscript, printable from the Soda lab -- see unix use) and answer question I. before trying to use the program. It will be helpful to print these instructions.

 I. Metaphor Alternatives.

The system outlined in class and the paper and the program you will be running for this assignment have x-schema executions setting source domain feature values, which then get projected via metaphors onto the target domain. An alternative design would be to have two different entries for the lexical item "Stumble", for instance one in the domain of spatial motion and the other in the domain of abstract actions (such as economic policies). Then the program could just check to see which domain was being talked about and retrieve the appropriate meaning of the lexical item (stumble). This would avoid the need to represent and use metaphors in language understanding. Discuss the pros and cons of such a scheme. In particular, when will such a design be better than the system described in class. Be as specific as you can in your answer. Extra credit will be given for concrete examples to prove your case (either way).

II. Using the Program

Question 1. Getting Started.

Installation:

Login to a PC sunning Solaris (275 & 277 Soda).
make a directory in your top level called met. "mkdir met"
cd to this directory. "cd met"
type "cp /home/ee/cs182/met.tar ."
type "tar -xf met.tar"
type "javaKARMA0.1"

Basic Operation:

If you survived the installation, you will see two windows, one that displays the net you will be using and the other that is a console for interaction and help. The network window will henceforth be referred to as the Network and the text window as the Console.

You will be mainly working in the Console window, and observing color changes in the Network window. Of course you are welcome to play in the Network window, with the understanding that if you modify the network, you will be responsible for recreating the original. So if you want to play around with the network, make sure you copy the network file to a backup.

In the Network window, you will notice a bunch of columns of nodes. The rightmost column (entitled Source Domain F-struct) corresponds to the source domain features (spatial motion and health). These features are set by x-schema executions for a specific input. The next column is entitled Metaphor Maps. Most of these maps correspond to a part of the Event Structure Metaphor we studied in class. They project source domain feature values to the target domain. The three leftmost columns in the network window correspond to three time slices of the target domain f-struct. The target domain is the domain of international economic policies. Constraints within a time slice of the target domain correspond to links between nodes in a single time-slice (for instance the fact that if you know the POLICY (Liberalization) of a Government, you know the GOAL (unregulated_freetrade) of the policy. This is represented as the link between the POLICY and GOAL variables in the target domain network. Note that there are links between slices of the target domain network. These correspond to temporal persistence links. All links are quantified by conditional probabilities as explained in class. For details of the variables and constraints see Description Of Network Features

Regarding the Console window, you will enter f-structs (feature-value pairs) from the menu item (top left) entitled "Input F-struct". For the vanilla version of the homework, this is one of the two menus you will use. The other one pertains to the "Network Options" menu. The main button you will be using there is the "Reset Network ..." option, which will reinitialize the network for a new input. For the other options, see Link1..

The main point of interaction will be the Input F-struct menu. The Input F-struct menu has options that correspond to the semantic features and values of the linguistic input. For instance the input sentence

 "Indian Government stumbling in Liberalization plan"
has features and values:

 Actor -> Indian Government
 Source Domain Schema Name and Parameters ->
                        Event = Stumble    ->
     Stumble Aspect -> Progressive (be + Stumbling) ->
                     Stumble Path -> in Liberalization Plan

Similarly the input sentence

"US Economy Crawling"
has features and values:

        Actor -> US Economy
        Source Domain Schema Name and Parameters ->
                    Event = Self Propelled Motion ->
                                 Motion Type/Manner ->
                                      & nbsp; Motion = Crawl
                                 Motion Aspect  ->
                                      & nbsp;  Progressive.

While you input this information, you may notice some text on the Console that informs you of the program's response to your input. You will also notice that some of the nodes in the Editor have changed color from their rather staid yellow to a bright blue or green and yet others have turned completely red! Not to worry. This is the result of x-schema executions and metaphor projections to the belief network.

The conventions on node color are as follows.

Nodes that are not affected in the current context are shown in Yellow.

Direct input (such as Actor = Indian Government) or Event = Fall are shown in Blue.

"Active" Metaphors (such as FALL_IS_FAIL) are shown in Cyan.

Metaphoric inferences (such as Stumble implies the presence of an obstacle which is projected to target domain difficulty) are shown in Green.

Target Domain Nodes whose probability changes as a result of metaphoric inference are shown in red. For example, the inference corresponding to the Outcome at time 2 (OUTCOME(2), when a difficulty is asserted at time 1 (DIFF(1)) is shown in red.

After staring at the colors for a suitable length of time, you can go to the Console, and select the button entitled "Inference -> Do Inference". This will dump the direct input (blue node) values; direct metaphoric projections (green node) values; and best estimates of indirect inference values (red nodes) onto your console. If you want to save your session at any time to a file, just use the "Saving the Session -> Save Console to File" option.

If you want to look at the probability of a node not in the above set (not required for the homework), just select Options -> Individual Node Probabilities at the console and then select Query on the Editor. Select any node from the network  by clicking on it  in the Editor, and you will get the posterior probability distribution for this specific variable.

III. For the next 3 questions (Question 2-5):

Enter F-structs corresponding to the following inputs. Make sure to
reset the network using  Network Options -> Reset Network after each input is processed. In each case,

a) Enter the F-struct by selecting appropriate items from the Input F-struct menu.
b) Observe the Network window and the changes in colors.
c) Run the inference query (Inference -> Do Inference) and explain the results.   Note You Can use the "Saving the Session -> Save Console to File " feature to log the results and include them in your answer)
d) Reset the network and repeat a) -d) for the next input.

Question 2: Aspectual Inferences

1)      Indian Government's Liberalization Plan Stumbling.
2)      France fell into recession.
3)      France started to fall into recession.
4)      France has fallen into recession.
5)      France on the verge of falling into recession.
6)      France on the verge of falling back into recession.
7)      German Economy continues to crawl.

Question 3: X-schema Parameters

8)      US Economy moving at the pace of a Clinton jog.
9)      Indian Government making Giant Strides toward Liberalization.
10)     France walked into recession.  (what's the diff. between this and 2)?
11)     US Economy crawling.
12)     US Economy at a standstill.
13)     US Economy sprinting along.

Question 4: Different Source Domain

14)     US Economy falls ill.
15)     Germany recovers from recession.
16)     Free-trade is the best therapy.

Question 5: Multiple events (including source domains)

In this question, you will process multiple inputs (2). The only change from the previous instructions is that you SHOULD NOT reset the network between the two inputs. After the two inputs are entered you should do Inference -> Do Inference and save the session if you want as before. The DO Network Options -> Reset Network... to process the next sequence of events Notes
 

17) US Economy was at a standstill. Now sprinting along.
18) Germany was on the verge of falling into recession, but recovered.

IV. Novel Input

Pick up a headline/blurb from a recent newspaper article that you think can be interpreted by the system. Enter the appropriate f-struct for your input, observe and analyze the behavior of the system for your input. Save your interaction by using the Save Your Session -> Save Console to file option, and include the log file in your homework.

Link1:

In order to reload the network from scratch for any reason (without quitting the program), click on the "Network Options -> Open ..." option, and this will open up a file dialog box. Select (or type) the filename "met-rep" into the dialog, and this will reload the original network. The menu item entitled "Options" allows you to play with various options. You can look at an individual node and its probability distribution, or find the best posterior explanation for all the nodes. For the vanilla homework, you will probably not need this menu at all. However, you are welcome to use and may in fact find some of the other inference options helpful to understand how the system works. You can save your entire session to a file by selecting "Saving The Session -> Save Console to File", which opens up a file dialog box and sends the contents of the console to the selected/typed file.

Link2:

Unfortuantely, the memory and other class specific constraints only allow for two inputs, but you should be able to visualize how a larger sequence can be handled.  Potentially a  fairly long dependency chain can be established during the course of a narrative, and such an abiliity to use the current state as context for the next input turns out to be vital.

This assignment is due on Monday, April 19.