SSM training configuration parameters

There are several configuration parameters that are specific to SSM training files. You can specify these parameters and set their values by using the <param> and <value> elements within an <SSM> element.

Note: This means that configuration parameters must be specified separately for each item in the <semantic_models> section of the main body of the SSM training file, rather than globally for the entire document in the main header.

The default values for these parameters are acceptable for your initial training iterations, so for your first few training sessions there is no need to specify them. In later iterations, you can alter parameter values for tuning purposes. See Testing and tuning SSMs for additional details.

All configuration is done with parameters inside the training files. Other sources of configuration parameters, such as parameters set for the general configuration, do not affect SSM training.

no_err_on_test

This parameter controls computation of errors on test sentences. By default, the test program computes errors after every iteration. This parameter can be used to eliminate that repetition. Suppressing errors doesn’t affect results, but it does reduce processing. The value is a boolean, true or false; the default value is false unless otherwise specified:

<param name="no_err_on_test">
    <value> true </value>
</param>

learning_rate

save_best

This parameter causes the saved SSM to use the number of iterations with the best test set score. The value must be a string ("true" or "false"). The default value is true, meaning that the best iteration is saved, providing that the training file contains a test set. The number of iterations represented in the output file is reported to the diagnostic log. For example:

<param name="save_best">
    <value> false </value>
</param>

This parameter is not compatible with no_err_on_test. Ensure that these parameters are set to false (their default value).

ssm_ngram_window

This parameter specifies the number of adjacent words to use in searching for appropriate bigram features.

Type

Integer from 0 to MAX_INT.

  • 0 means no bigram features.
  • 1 means only adjacent words. For example, a sentence “a b c d” generates potential bigram features from the set {a+b, b+c, c+d}.
  • 2 generates the potential bigram features {a+b, b+c, c+d, a+c, b+d}.
  • 3 generates { a+b, b+c, c+d, a+c, b+d, a+d}.

Default

10

Usage

100 is a generally a good number for models used for call routing applications. The value is probably large enough to include all possible word pairs in an utterance.

So however large window size you set, for each particular utterance, the actual window size will not exceed its utterance length.

Performance

Larger values of ssm_ngram_window yield higher potential accuracy but also additional computation. There is no additional cost If the value exceeds the number of possible word pairs.

The window size is the maximum distance of two words in a utterance that can be extracted as a word pair. Adjacent words have a distance of 1. So a window size of 0 extracts nothing, a window size of 1 extracts adjacent words, a size of 2 includes adjacent words as well as word pairs where there is one word in between, and so on. The definition of a word-pair is a set of two words, and their relative order in the utterance does not matter (A, B and B, A are the same word-pair feature.)

For example:

<param name="ssm_ngram_window">
    <value>1</value>
</param>

ssm_num_meanings_out

This parameter specifies how many SSM meanings are returned for each n-best item computed by Recognizer. The value must be a positive integer. The default is 3, which generates semantic classification entries for each n-best item.

During recognition of an SSM, a single sentence spoken by a caller might have more than one meaning. For example, if a caller says, "New product support", the intended meaning might be one of these:

  • I need technical support for a new product.
  • I need help purchasing a new product.

The SSM technology classifies the most likely meanings, and returns the best choice in the SWI_meaning key. The ssm_num_meanings_out parameter allows you to retrieve additional possible meanings for each utterance on the n-best list. Recognizer stores the additional meanings in additional keys. Thus, instead of returning one entry for each item on the n-best list, Recognizer returns a number of sub-entries (the number is determined by this parameter) for each item. For example:

<param name="ssm_num_meanings_out">
    <value>2</value>
</param>

For any value greater than 0, Recognizer adds the SWI_ssmMeanings and SWI_ssmConfidences keys to the recognition result. These keys contain the top n SSM labels and their confidences. For example, if ssm_num_meanings_out is set to 2, the output for a single n-best item might appear as follows:

<SWI_ssmMeanings>
    <slot2>
        v2::v1
    </slot2>
</SWI_ssmMeanings>
<SWI_ssmConfidences>
    <slot2>
        53::47
    </slot2>
</SWI_ssmConfidences>

ssm_output_filename

This parameter specifies the output filename for the trained SSM. The value must be a string, which will serve as the base filename for the output file. Do not include the .ssm extension, which will be added automatically. If no name is specified, the file is name trained.ssm by default.

The example below results in a model named foobar.ssm:

<param name="ssm_output_filename">
    <value>foobar</value>
</param>

test_results_filename

This parameter specifies a file to which the training program will write detailed statistics on test error rates. The value must be a string for the filename. There is no default. If no filename is specified, statistics are not written. If the <test> section is missing or left blank, the corresponding file will be generated, but it will be empty.

Also see test_results_num_best, which controls the amount of detail written to the file.

Note: The training program also writes simple statistics to the diagnostic error log file after every iteration.

The example given below writes test results to a file named details.txt:

<param name="test_results_filename"> 
    <value> details.txt </value>
</param>

The test results file includes the SSM labels for every sentence along with their scores, accuracy, and precision per label, and top confusions per label. See Testing and tuning SSMs.

test_results_num_best

Controls the amount of details written to the test results file. The value is a positive integer indicating how many hypotheses and confusions to describe in the file (default 3). The maximum reasonable range equals the number of possible <SSM> meanings. For example:

<param name="test_results_num_best">
    <value>10</value>
</param>

use_prior_weight

Considers the prior attribute when training the SSM. The value is a boolean, true or false.

Each <meaning> can have a prior attribute to specify prior (log) probabilities. By default, the training program uses them as preliminary values and adjusts them during processing. This parameter cancels that default behavior. For example:

<param name="use_prior_weight">
    <value>false</value>
</param>