The present invention relates to evaluating models and algorithms. In particular, the present invention relates to evaluating models and algorithms that produce text.
There are several types of systems that produce text as an output. For example, speech recognition systems convert acoustic signals into text. In pinyin-to-character conversion systems, phonetic strings, known as pinyin, that describe the pronunciation of Chinese words are converted into Chinese characters. In Kana-Kanji conversion systems, Kana characters that represent the phonetics of Japanese words are converted into a string of Kanji characters. In spell checking systems, an improperly spelled text is converted into a properly spelled text. In machine translation systems, a sequence of characters in a first language is converted into a sequence of characters in a second language. In annotation systems, a text is tagged with textual annotations such as part-of-speech tags. In information retrieval systems, a text is returned based on a query.
The models or algorithms used in these systems are updated from time to time in order to try to reduce the number of errors produced in the output text. In the past, the performance of the models or algorithms has been measured based on the absolute number of errors in the output text.
Unfortunately, when changing a model or an algorithm, it is possible to introduce side effects, which are new errors that were not present in the previous model or algorithm. As a result, even if a new model or algorithm produces fewer errors, it may introduce a new error that was not present before.
In the prior art, it has not been possible to measure the relative performance of a new model in such a way so as to take into account side effects introduced by the model. Therefore, a new metric is needed for comparing new models and algorithms to previous models and algorithms that produce output text.
A method and apparatus for generating a score for a system that generates text is provided. The method and apparatus identify errors in the text generated by the system and identify errors in a second text generated by a second system. The number of errors that are generated by the system but not generated by the second system is divided by the number of errors that are generated by the second system but not by the system to generate the score.
The invention is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and/or configurations that may be suitable for use with the invention include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, telephony systems, distributed computing environments that include any of the above systems or devices, and the like.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention is designed to be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules are located in both local and remote computer storage media including memory storage devices.
With reference to
Computer 110 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 110 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by computer 110. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
A user may enter commands and information into the computer 110 through input devices such as a keyboard 162, a microphone 163, and a pointing device 161, such as a mouse, trackball or touch pad. Other input devices (not shown) may include a joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 120 through a user input interface 160 that is coupled to the system bus, but may be connected by other interface and bus structures, such as a parallel port, game port or a universal serial bus (USB). A monitor 191 or other type of display device is also connected to the system bus 121 via an interface, such as a video interface 190. In addition to the monitor, computers may also include other peripheral output devices such as speakers 197 and printer 196, which may be connected through an output peripheral interface 195.
The computer 110 is operated in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, a hand-held device, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 110. The logical connections depicted in
When used in a LAN networking environment, the computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user-input interface 160, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 110, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
Memory 204 is implemented as non-volatile electronic memory such as random access memory (RAM) with a battery back-up module (not shown) such that information stored in memory 204 is not lost when the general power to mobile device 200 is shut down. A portion of memory 204 is preferably allocated as addressable memory for program execution, while another portion of memory 204 is preferably used for storage, such as to simulate storage on a disk drive.
Memory 204 includes an operating system 212, application programs 214 as well as an object store 216. During operation, operating system 212 is preferably executed by processor 202 from memory 204. Operating system 212, in one preferred embodiment, is a WINDOWS® CE brand operating system commercially available from Microsoft Corporation. Operating system 212 is preferably designed for mobile devices, and implements database features that can be utilized by applications 214 through a set of exposed application programming interfaces and methods. The objects in object store 216 are maintained by applications 214 and operating system 212, at least partially in response to calls to the exposed application programming interfaces and methods.
Communication interface 208 represents numerous devices and technologies that allow mobile device 200 to send and receive information. The devices include wired and wireless modems, satellite receivers and broadcast tuners to name a few. Mobile device 200 can also be directly connected to a computer to exchange data therewith. In such cases, communication interface 208 can be an infrared transceiver or a serial or parallel communication connection, all of which are capable of transmitting streaming information.
Input/output components 206 include a variety of input devices such as a touch-sensitive screen, buttons, rollers, and a microphone as well as a variety of output devices including an audio generator, a vibrating device, and a display. The devices listed above are by way of example and need not all be present on mobile device 200. In addition, other input/output devices may be attached to or found with mobile device 200 within the scope of the present invention.
The present invention provides a new metric that allows more useful comparison of the performance of an existing model to a new model. This metric is formed based on the number of new errors produced by the new model and the number of errors produced by the exiting model that are corrected by the new model.
In step 300 of
At step 302 of
At step 304, an error detector 414 identifies the position of errors in existing model output 406 and new model output 412 using an expected output 416. Expected output 416 indicates the proper sequence of characters that should have been produced given test input 400. These errors can include deletion, insertion and substitution of characters that are found in the expected output 416. Based on this process, error detector 414 produces existing model error positions 418 and new model error positions 420. Under some embodiments, the errors are also tagged with weights so that different errors can be weighted differently according to their severity.
At step 306, an error ratio calculator 422 determines the number of errors that are present in existing model output 406 that are not present in new model output 412 using existing model error positions 418 and new model error positions 420. This number represents the number of errors corrected by the new model. An error that is found in both the existing model and the new model is not counted. For embodiments that apply different weights to different errors, the weights of the errors are summed instead of simply counting the errors. At step 308, error ratio calculator 422 determines the number of errors in new model output 412 that are not present in existing model output 406 using existing model error positions 418 and new model error positions 420. This represents the number of side effect or new errors introduced by the new model. Again, for embodiments that apply different weights to different errors, the weights of the errors are summed instead of just counting the errors.
At step 310, error ratio calculator 422 determines an error ratio 424 by dividing the number of errors in new model output 412 that are not present in existing model output 406 by the number of errors in existing model output 406 that are not present in new model output 412. Thus, the error ratio is determined as:
where ER is the error ratio, |EA| is the number of errors found in only new model output 412, and |EB| is the number of errors found only in existing model output 406. Note that in other embodiments, the inverse of ER can be used as the metric. Similarly, log-based values may be calculated to form the metric using |EA| and |EB|. In embodiments were different errors have different weights, |EA| is the sum of the weights for the errors found only in new model output 412 and |EB| is the sum of the weights for the errors found only in existing model output 406.
The error ratio of EQ. 1 can be viewed as the ratio of the number of new errors introduced by the new model over the number errors corrected by the new model that had been present in the existing model.
The error ratio provides a strong metric for indicating the side effects associated with a new model relative to an existing model. In particular, if the error ratio is greater than 1, the new model creates more new errors than it corrects and thus should not be adopted over the existing model. Error ratios that are less than 1 indicate that the new model corrects more errors than it introduces. In general, new models that have lower error ratios perform better than models with higher error ratios. A new model with an error ratio of 0, for instance, indicates that the new model corrects at least 1 error in the existing model while not introducing any new errors.
In
Using the error ratio, it is possible to make a more informed decision as to which of two new models to select. In particular, although a new model may have more relative error reduction, if its error ratio is too high, it may be undesirable to adopt the new model since it may cause the system to generate new errors where the system had not produced errors in the past. For example, in a spelling system, a system may not correctly identify the spelling of a word that it had previously been able to identify. Introducing such new errors into a system is undesirable since it frustrates users and causes them to lose confidence in the system.
The error metric of the present invention can also be used to identify when a model has been over trained.
In the past, it has been difficult to provide a metric that would indicate which of two sets of model parameters should be selected when both model parameters provide the same character error rate. For example, in
As described above, the present invention provides a new metric known as the error ratio for measuring the relative performance of a new model to an existing model to determine whether the new model should be implemented in place of the existing model. In addition, the new metric can be used to determine the performance of two separate new models relative to a base model. Using the error ratios of the two new models, one of the new models can be selected over the other new model.
Although the present invention has been described with reference to particular embodiments, workers skilled in the art will recognize that changes may be made in form and detail without departing from the spirit and scope of the invention.