2009年4月11日星期六
if only
2009年4月7日星期二
少有人走的路:与心灵的对话
2009年4月2日星期四
少有人走的路---通向心智成熟的旅程

2008年3月28日星期五
有价值的paper
有价值的paper
从 笑对人生,傲立寰宇
CVPR 2008的审稿期刚刚结束了。今年,我对于所审的paper,采取了更加宽容的态度。
Vision依旧很热闹,但是,我感觉这个领域在喧嚣的背后似乎有点疲态了。年复一年,每年成百上千的paper仍旧是在那几个旧的舞台上唱着老调 子。比如object recognition,无数打着”novel framework”旗号的车子,仍旧挤在local feature extractor + classifier (SVM/AdaBoost …)的独木桥上,难道,这是唯一的方法么?
在没有看到有人开辟新的道路的时候,我更欣赏那些专注解决于一个具体的小问题,并且提出了有见地的方法的文章。对于那种表面华美的,而内里却仅仅是把A feature换成B feature,C model换成D model的,我一般评价很低。
这里的一位教授在谈到写paper的时候,提到了一种很多人都会犯的毛病。还是用object recognition的工作为例子,为了完成实验,你必须做大量的工作,把整个framework搭建起来,从data到feature到 classifier,要写很多很多的code,花很多很多的时间去debug。为了对得起这些付出,很多人想把这些努力都写到paper上去,因此形成 了很多并不新颖的工作每年都在投。而事实上,这些工作并不完全是没有新的东西,但是,那一点新的东西,在整个framework式的表述中被喧宾夺主了。
要写一篇有吸引力的文章,必须有取舍的决断。有些为了完成实验必须做的工作,你即使在上面付出了半年时间,但是如果缺乏真正的学术价值,在 paper中应该尽量简省,把大部分的篇幅着力于那些真正的有意义的地方(哪怕那个地方其实你只花了3个小时想出来)。评paper不是评劳模(当然有些 reviewer可能有这种倾向),不能把工作量的因素拿来布局paper的篇幅,不能把对某些工作“舍不得”的情绪带到paper的 presentation当中。
CVPR审稿落幕了,我们的reading group又开始了。这个学期,John决定让大家自己轮流选paper,lead每个星期的reading。他说,除非有充分的理由,不要选近五年的文 章。他上学期其实就是这样的风格,选的很多都是五六十年代的文章——信息论和统计学习的奠基者们那种seminal的经典著述。这些paper让我感慨前 辈们的工作是多么有生命力,今天无数的主流算法仍旧发源于40年前的某篇文章,而且事实上没有走远多少。科技日新月异,其核心学理的进化则缓慢得多,艰难 得多。
在paper里面通过比较几个近期工作来claim自己的东西是新的很容易,但是,要让一个工作放在这个学科的整个发展历史中去考量却依然有价值, 则是非常艰难。这个学期,我开始要参加Alan的meeting, 他是MIT另外一个大实验室LIDS的director。有一次和Alan meeting的时候,大家提到一些最新发表的算法,他说,这些东西has been done 40 years ago。他人很nice,但是一项工作要得到他的认同很难。那次,我在他面前present了40分钟我的新工作,很多的东西都被他认为是在数学领域已经 解决的(虽然vision里面没有出现这样的publication),不过庆幸的是,还是有一个point,被他指出I have never seen people working on this。后来两个星期,我在这个point上投入了很多时间去思考,发现这确实是一个很有价值的问题。
我在这里所接触的教授都很nice,平常对学生的工作也不干涉太多,但是对于一项工作的评价非常挑剔。John告诉我,要解决最困难的问题,容易解 决的问题让别人做去。这半年来,脱离了CVPR的指挥棒,在沿着自己的道路一点一点的缓慢前进着,但是走的很踏实。刚来的时候,对MIT的氛围有点不太习 惯,好像CVPR也好,NIPS也好,都没什么要紧的。现在才慢慢觉得,只有从conference的指挥棒中走出来,才能脱离浮躁,实实在在的进行有意 义的探索。
两个星期后,将轮到我挑选reading group上讨论的paper。这么长时间大家都讨论的是信息论和统计方面的文章,我说,我要变一下,找vision的paper,John答应了,不过 条件是paper必须是经得住考验的真正的好paper。我现在不知道哪篇能达到这个要求。
2008年2月18日星期一
Kernels, distances and strings
Kernels and distances are closely related. Given a kernel K(x,z), this induces an RKHS H such that K(x,z)=
On the other hand, we also know how to turn distance metrics into kernels. If (X,d) is a metric space (i.e., X is a space and d is a metric on X), then K(x,z)=exp(-d(x,z)) is positive semi-definite when x,z are drawn from X.
Now, there are three questions that arise. The first is: in the distance->kernel setting, what does the RKHS "look like." I think the sense here is that it's basically the same as the RKHS induced by the Gaussian kernel: it's an infinite-dimensional feature space where different dimensions look like distances to some point. In practice, this "some point" is going to be one of the training points.
The second question follows the fact that we can iterate this construction. One way to ask this is: if we use a kernel to induce a distance, then use this distance to introduce a new kernel, what does this new kernel look like. Or, alternatively, if we have a distance, kernelize it to induce a new distance, then what does this distance look like. I don't have a good intuitive sense for the answer to any of these. Obviously it's straightforward to write out what these things look like, but that doesn't directly give me a sense of what's going on.
The final question is a bit "off topic" from the above two, but still relevant. There's been a lot of work in kernels for discrete data, like strings. The most popular string subsequence kernel is based on counting how many subsequences match between two strings, down-weighted by the length of the subsequences. It's well known, and recognized in string kernel papers, that a kernel of the form K(x,z) = 1-ned(x,z), where ned is a normalized string edit distance is not a valid kernel. However, from what we know about distance metrics, K(x,z) = exp(-sed(x,z)) should be a valid kernel. Yet I'm not aware of this being used anywhere. Is there any reason why? The reason I ask is because it's a much more intuitive than the subsequence kernel, which I only have a vague sense about.
Posted by hal at 2/10/2008 09:23:00 AM
Labels: machine learning
Quick comment on your 3rd point: K(x,z) is proportional to the probability x -> z in a probabilistic mutation model with the log-odds of mutations given by the edit costs. Hum...
don't you mean exp(-d^2), rather than exp(-d) ?
also, what about the Haussler convolution kernel for strings ?
suresh: right, d^2.
fernando: so let's say we use edit distance to induce a kernel. based on your comment, we can think of the kernel value to be the probability of an automata mapping one string to the other. the kernel-induced distance then looks like some distance between (probabilistic) automata that do the mapping. that actually sounds kind of interesting :). i have no idea what happens if you iterate again, though, and create a new kernel based on this.
For applications in which token reorderings are likely, basic subsequence comparison works better than simple edit distance. You get good character n-gram subsequence relations between "Smith, John" and "John Smith" even though they're miles apart in terms of character-level edit distances.
There are richer probabilistic edit distances like the ones introduced by Brill and Moore for spelling and by McCallum, Bellare and Pereira for word skipping and other general edits. These don't, in general, don't have negative logs that (when offset from match cost) form a proper metric like Levenshtein distance.
I don't know much about kernels, but if K(x,y) = exp(-d(x,y)**2) always produces a kernel if d is a proper metric, then the question arises of when a probabilistic string transducer defining p(s1|s2) defines a metric. I think that reduces to when:
d(s1,s2) = - log p(s1|s2) + log p(s2|s2)
forms a metric (the second term is so that d(s,s) = 0.0).
Plain Levenshtein distance with uniform edit costs defines a distance metric, but needs some fiddling to turn into a probability distribution (sum of all operations, including matching, must have probabilty 1.0).
bob:
"For applications in which token reorderings are likely, basic subsequence comparison works better than simple edit distance." -- is this true or is it just plausible? I.e., has this effect actually been verified? I definitely find it plausible, but are there cases where it actually works out that way? What about when you're talking about words instead of just characters?
There are also a ton of edit distances that William Cohen has proposed and even more that he's compared. If they're actually metrics, then these could also be easily kernelized.
Yes, if you mean do character n-grams work better than edit distance for matching.
Last year, we worked on a database linkage and deduplication problem for film names and actor names, and indeed found character n-grams with TF/IDF weighting a reasonable comparison metric. It put almost all the string matching true positives above an easily identified threshold, with only a few residuals where you had things like names transliterated from the original language versus translated.
We've also used this technique for entity transliteration detection, as in finding variants of "Al Jazeera". These probably would've worked OK with edit distance, too.
Substring character n-grams neatly deal with issues such as diacritics (only a small penalty for mismatch), minor case variation (e.g. "University Of Michigan" vs. "Univ. of Michigan") for varying spellings of titles (e.g. "Star Wars IV" vs. "Star Wars Four"), and for various token orders (e.g. "La Traviata" vs. "Traviata, La").
I've also used them for word-sense disambiguation in our tutorial, using both a TF/IDF form of classification and a k-nearest neighbors built on character n-gram dimensions. Again, you get significant robustness boosts over whole word matchers.
Note that we extract character n-grams across word boundaries, so you get some higher-order token-like effects for free. The bag of words assumption is particularly bad for text classifiers.
Character n-grams also work very well for general robust search over text. I'd like to see them compared to character n-gram language models for search. They're actually the norm for languages like Chinese that are impossible to tokenize reliably (i.e. state of the art is 97-98%). And they're also common for transcribed speech at a phonemic or syllabic lattice level.
There'd obviously be rule-based ways to handle all the things mentioned above, as well as variations due to pronunciation, whole word re-orderings, deletions (e.g. the affine edit distances used for genomic/proteomic matching).
I like the idea behind Cohen et al.'s soft TF/IDF:
http://www.cs.cmu.edu/~wcohen/postscript/kdd-2003-match-ws.pdf
But I can't understand either where the IDF is computed or whether the resulting "distance" is even symmetric.
The Jaro-Winkler string comparison is a custom model designed by Jaro and modified by Winkler for matching individual first or last names.
String Kernels are highly popular for protein sequence classification problems (as an example). Here are some references below. The second is some of my doctoral work involving use of string kernels with a biological similarity. Using such a biological measure -makes the kernel not positive semi-definite. We work around this using an eigen value transformation.
Christina S. Leslie , Eleazar Eskin , Adiel Cohen , Jason Weston , and William Stafford Noble - Mismatch string kernels for discriminative protein classification Bioinformatics 20: 467-476.
Huzefa Rangwala, George Karypis. Profile-based Direct Kernels for Remote Homology Detection and Fold Recognition in BIOINFORMATICS, 21(23):4239-4247 (2005)
It is not true that "if (X,d) is a metric space then K(x,z)=exp(-t * d^2(x,z)) is positive definite". d must be a "Hilbertian distance", that is, a distance arising from a inner product in a RKHS; not any metric (under the axioms of nonnegativity, symmetry and triangle inequality) is allowed. In particular the string edit distance is NOT Hilbertian, therefore, K(x,z)=exp(-t * sed^2(x,z)) is not pd. See for example:
Corinna Cortes, Patrick Haffner and Mehryar Mohri, "Positive Definite Rational Kernels", Proceedings of The 16th Annual Conference on Computational Learning Theory (COLT 2003)