Challenge Overview


This Marathon Match is part of the March Madness Marathon Match Series and will have the following prizes and bonuses:

Prize Distribution

1st place - $10,000

2nd place - $5,000

3rd place - $2,500

4th place - $1,500

5th place - $1,000

In addition to the main prizes there are special prizes of $250 each for the highest scoring

  • first-time marathon participant,

  • participant who hasn't submitted since 2016, and

  • first-time sponsored marathon participant.

See here for details.


Introduction

Named-Entity Recognition (NER) refers to the task of identifying both abstract and physical real-world objects in unstructured text. NER has numerous applications including, but not limited to, search, summarization, and question answering.

 

In this competition, you will be provided a dataset of annotated Arabic Wikipedia text data. The annotated entity types are: Person (“PER”), Organization (“ORG”), Location (“LOC”), and Miscellaneous (“MIS”). The goal is to develop an NER model that can accurately output position and entity type for all named entity mentions recognized within given input text.

 

Input files

We are using a public dataset in this challenge. The details can be found here: http://www.cs.cmu.edu/~ark/ArabicNER/. The corpus contains 28 hand-annotated Arabic Wikipedia articles. In total, this amounts to 74,000 tokens.

Every article has its own input file. Each of these files has one line per token, and each line consists of the token in UTF-8 encoding and the corresponding tag. The tags are in “BIO” format. For example, “B-PER” indicates that the token is the first token of a “Person” entity mention, “I-PER” indicates that the token is inside a multi-token “Person” entity mention but is not the first token of the entity mention, and “O” indicates that the token does not belong to an entity mention. The Miscellaneous annotations are broken down by subtype (“MIS0”, “MIS1”, “MIS2”, “MIS3”). For this competition, we will lump all of these entities into one entity type, “MIS”.

We have split the dataset into the train, dev, and test sets as follows.

  1. Train (14 files): Computer_Software.txt, Ibn_Tolun_Mosque.txt, Linux.txt, Soccer_Worldcup.txt, Crusades.txt, Imam_Hussein_Shrine.txt, Periodic_Table.txt, X_window_system.txt, Damascus.txt, Islamic_Golden_Age.txt, Portugal_football_team.txt, Enrico_Fermi.txt, Light.txt, Real_Madrid.txt

  2. Dev (7 files): Atom.txt, Football.txt, Raul_Gonzales.txt, Richard_Stallman.txt, Computer.txt, Nuclear_Power.txt, Razi.txt

  3. Test (7 files): Christiano_Ronaldo.txt, Islamic_History.txt, Solaris.txt, Ummaya_Mosque.txt, Internet.txt, Physics.txt, Summer_Olympics2004.txt

We will merge these files and shuffle the sentence order into three files, i.e., train.txt, dev.txt, and test.txt (the link to processed data: https://www.dropbox.com/s/holwu4hsbpsxw6l/to_contestant_V2.zip?dl=1). You must train your model based on the provided train.txt only. But you can use any unlabeled dataset to train word embedding or language model, as long as the licenses of the datasets allow us to use the developed model commercially. More importantly, the hyper-parameter tuning should not rely on the dev.txt and test.txt, while you can use the train.txt for cross-validations.


Output file

We expect your model will produce a csv file (solution.csv) containing text filename, corresponding start and end positions (the line number in the text file), entity types (3-letter code), confidence scores (0 to 1), and extracted named entity mentions, as follows.

 

Text filename, start position, end position, entity type, score, Named entity mention 1

Text filename, start position, end position, entity type, score, Named entity mention 2

 

Here is an example:
Filename,Start,End,Type,Score,Surface

train.txt,7,7,PER,1.0,"������������������"

train.txt,29,29,LOC,1.0,"����������������������"

train.txt,49,49,LOC,1.0,"����������"

train.txt,56,56,PER,0.8,"��������"

 

Please note that the “extracted named entity mentions” is only listed for reference and will not be used in evaluation.

Submission format

This match uses a combination of the "submit data" and "submit code" submission styles. Your submission must be a single ZIP file with the following content:

 

/solution

   solution.csv

/code

   dockerfile

   <your code>

 

, where

  • /solution/solution.csv is the output your algorithm generates on the provisional test set. The format of this file is described above in the Output file section.

  • /code contains a dockerized version of your system that will be used to reproduce your results in a well defined, standardized way. This folder must contain a dockerfile that will be used to build a docker container that will host your system during final testing. How you organize the rest of the contents of the /code folder is up to you, as long as it satisfies the requirements listed below in the Final testing section.

Your zip file should not be larger than 500 MB. If you want to use huge libraries or model files, you should not package them into your submission, you must make sure that your docker build process fetches them from the net via wget, curl, git install or similar methods.

Notes:

  • During provisional testing only your solution.csv file will be used for scoring, however the tester tool will verify that your submission file confirms to the required format. This means that at least the /code/dockerfile must be present from day 1, even if it doesn't describe any meaningful system to be built. However, we recommend that you keep working on the dockerized version of your code as the challenge progresses, especially if you are at or close to a prize winning rank on the provisional leader board.

  • You must not submit more often than once every 4 hours. The submission platform does not enforce this limitation, it is your responsibility to be compliant to this limitation. Not observing this rule may lead to disqualification.

  • During final testing your last submission file will be used to build your docker container.

  • Make sure that the contents of the /solution and /code folders are in sync, i.e. your solution.csv file contains the exact output of the current version of your code.

  • To speed up the final testing process the contest admins may decide not to build and run the dockerized version of each contestant's submission. It is guaranteed however that if there are N main prizes then at least the top 2*N ranked submissions (based on the provisional leader board at the end of the submission phase) will be final tested.

Scoring

During scoring your solution.csv file (as contained in your submission file during provisional testing, or generated by your docker container during final testing) will be matched against expected ground truth data using the following algorithm.

 

If your solution is invalid (e.g. if the tester tool can't successfully parse its content, or if it contains an unknown filename), you will receive a score of 0.

 

Otherwise, we will calculate the F1 score based on locations and entity types of recognized named entities. Formally, we will transfer the recognized entities as a string: “$TextFilename@[$StartPosition,$EndPosition]@$EntityType”. Suppose the ground truth strings forms a set GTs = {GT_1, GT_2, .. GT_n}, while the predicted strings are Preds = {<Pred_1, Score_1>, <Pred_2, Score_2>, <Pred_m, Score_m>}. The F1 score is calculated as follows.

 

Pred_Total, GT_Total = 0, n

Overlaps = 0

For <Pred, Score> in Preds:

    Pred_Total += Score

    If Pred in GTs:

        Overlaps += Score

Precision = Overlaps / Pred_Total

Recall = Overlaps / GT_Total

F1 = 2 * Precision * Recall / (Precision + Recall)

 

Final testing

This section describes the final testing work flow and the requirements against the /code folder of your submission. You may ignore this section until you decide you start to prepare your system for final testing.

 

To be able to successfully submit your system for final testing, some familiarity with Docker is required. If you have not used this technology before then you may first check this page and other learning material linked from there. To install docker follow these instructions. In this contest it is very likely that you will work with GPU-accelerated systems, see how to install Nvidia-docker here.

Contents of the /code folder

The /code folder of your submission must contain:

  • All your code (training and inference) that are needed to reproduce your results.

  • A Dockerfile (named dockerfile, without extension) that will be used to build your system.

  • All data files that are needed during training and inference, with the exception of

    • the contest’s own training and testing data. You may assume that the contents of the /training and /testing folders (as described in the Input files section) will be available on the machine where your docker container runs, zip files already unpacked,

    • large data files that can be downloaded automatically either during building or running your docker script.

  • Your trained model file(s). Alternatively your build process may download your model files from the network. Either way, you must make it possible to run inference without having to execute training first.

 

The tester tool will unpack your submission, and the

nvidia-docker build -t <id> .

command will be used to build your docker image (the final ‘.’ is significant), where <id> is your TopCoder handle.

 

The build process must run out of the box, i.e. it should download and install all necessary 3rd party dependencies, either download from internet or copy from the unpacked submission all necessary external data files, your model files, etc.

 

Your container will be started by the

nvidia-docker run -v <local_data_path>:/data:ro -v <local_writable_area_path>:/wdata -it <id>

command (single line), where the -v parameter mounts the contest’s data to the container’s /data folder. This means that all the raw contest data will be available for your container within the /data folder. Note that your container will have read only access to the /data folder. You can store large temporary files in the /wdata folder.

Training and test scripts

Your container must contain a train and test (a.k.a. inference) script having the following specification:

 
  • train.sh <data-folder> should create any data files that your algorithm needs for running test.sh later. The supplied <data-folder> parameters point to a folder having training image and annotation data in the same structure as is available for you during the coding phase. The allowed time limit for the train.sh script is 4 days. You may assume that the data folder path will be under /data.

  • As its first step train.sh must delete the your home made models shipped with your submission.

  • Some algorithms may not need any training at all. It is a valid option to leave train.sh empty, but the file must exist nevertheless.

  • Training should be possible to do with working with only raw Opensetface data and publicly available external data. This means that this script should do all the preprocessing and training steps that are necessary to reproduce your complete training work flow.

  • A sample call to your training script (single line):
    ./train.sh /data/training/
    In this case you can assume that the training data looks like this:
     data/
       training/
         TODO

 
  • test.sh <data-folder> <output_path> should run your inference code using new, unlabeled data and should generate an output CSV file, as specified by the problem statement. The allowed time limit for the test.sh script is 24 hours. The testing data folder contain similar data in the same structure as is available for you during the coding phase. The final testing data will be similar in size and in content to the provisional testing data. You may assume that the data folder path will be under /data.

  • Inference should be possible to do without running training first, i.e. using only your prebuilt model files.

  • It should be possible to execute your inference script multiple times on the same input data or on different input data. You must make sure that these executions don't interfere, each execution leaves your system in a state in which further executions are possible.

  • A sample call to your testing script (single line):
    ./test.sh /data/test/ solution.csv
    In this case you can assume that the testing data looks like this:
     data/
       test/
         TODO

 

Code requirements

  • Your training and inference scripts must output progress information. This may be as detailed as you wish but at the minimum it should contain the number of epochs processed so far.

  • Your testing code must process the test and validation data the same way, that is it must not contain any conditional logic based on whether it works on documents/sentences/tokens that you have already downloaded or on unseen data.

Verification workflow

  1. First test.sh is run on the provisional test set to verify that the results of your latest online submission can be reproduced. This test run uses your home built models.

  2. Then test.sh is run on the final validation dataset, again using your home built models. Your final score is the one that your system achieves in this step.

  3. Next train.sh is run on the full training dataset to verify that your training process is reproducible. After the training process finishes, further executions of the test script must use the models generated in this step.

  4. Finally test.sh is run on the final validation dataset (or on a subset of that), using the models generated in the previous step, to verify that the results achieved in step #2 above can be reproduced.

 

A note on reproducibility: we are aware that it is not always possible to reproduce the exact same results. E.g. if you do online training then the difference in the training environments may result in different number of iterations, meaning different models. Also you may have no control over random number generation in certain 3rd party libraries. In any case, the results must be statistically similar, and in case of differences you must have a convincing explanation why the same result can not be reproduced.

Hardware specification

Your docker image will be built and run on a Linux AWS instance, having this configuration:

  • p2.xlarge

Please see here for the details of this instance type.

General Notes

  • This match is rated.

  • Use the match forum to ask general questions or report problems, but please do not post comments and questions that reveal information about the problem itself or possible solution techniques.

  • Teaming is not allowed. You must develop your solution on your own. Any communication between members beyond what is allowed by the forum rules is strictly forbidden.

  • In this match you may use any programming language and libraries, including commercial solutions, provided Topcoder is able to run it free of any charge. You may also use open source languages and libraries, with the restrictions listed in the next section below. If your solution requires licenses, you must have these licenses and be able to legally install them in a testing VM (see “Requirements to Win a Prize” section). Submissions will be deleted/destroyed after they are confirmed. Topcoder will not purchase licenses to run your code. Prior to submission, please make absolutely sure your submission can be run by Topcoder free of cost, and with all necessary licenses pre-installed in your solution. Topcoder is not required to contact submitters for additional instructions if the code does not run. If we are unable to run your solution due to license problems, including any requirement to download a license, your submission might be rejected. Be sure to contact us right away if you have concerns about this requirement.

  • You may use open source languages and libraries provided they are equally free for your use, use by another competitor, or use by the client.

  • If your solution includes licensed software (e.g. commercial software, open source software, etc), you must include the full license agreements with your submission. Include your licenses in a folder labeled “Licenses”. Within the same folder, include a text file labeled “README” that explains the purpose of each licensed software package as it is used in your solution. Please make sure all these licenses will allow us for a commercial purpose.

  • External data sets and pre-trained models are allowed for use in the competition provided the following are satisfied:

  • The external data and pre-trained models are unencumbered with legal restrictions that conflict with its use in the competition.

  • The data source or data used to train the pre-trained models is defined in the submission description.

Final prizes

In order to receive a final prize, you must do all the following:

  • Achieve a score in the top five according to final system test results. See the "Final testing" section above.

  • Once the final scores are posted and winners are announced, the prize winner candidates have 7 days to submit a report outlining their final algorithm explaining the logic behind and steps to its approach. You will receive a template that helps creating your final report.

  • If you place in a prize winning rank but fail to do any of the above, then you will not receive a prize, and it will be awarded to the contestant with the next best performance who did all of the above.