AdBlockLearner

intent: the Ad Block extension (http://adblock.mozdev.org) to the Firefox browser allows the user to specify a list of regular expressions that, when matching the URL of a an image contained in a Web page, allow to filter it and not display it. The problem is to come up and maintain such a list of regular expressions.

AdBlockLearner (http://adblocklearner.mozdev.org) learns which parts of a given URL are predictors of whether the URL should be blocked or not, thus only relying on the user's basic feedback (click to block an image, select to unblock an image).

The learning technique is a simple weighted majority vote. The Javascript code below shows how the weight of the "experts" (i.e. the URL chunks obtained by tokenization) are updated when a user decides to block a given image:

	for (var i = 0; i < Items_Table.length; i++) {
		if ( imgUrl.indexOf(Items_Table[i]) != -1) {
			//it matches: promote the expert
			Weights_Table[i] = (1/beta) * Weights_Table[i];
		}
		else {
			// the coward abstained! punish him mildly
			Weights_Table[i] = ( (1 + (beta * beta))/ (2 * beta) ) * Weights_Table[i];
		}
	}

for (var i = 0; i < NegItems_Table.length; i++) { if ( imgUrl.indexOf(NegItems_Table[i]) != -1) { //it matches: punish the expert NegWeights_Table[i] = beta * NegWeights_Table[i]; } else { // the coward abstained! punish him mildly NegWeights_Table[i] = ( (1 + (beta * beta))/ (2 * beta) ) * NegWeights_Table[i]; } }

refs: [1] [2]


(last edited October 10, 2006)
Find Page by browsing or searching