You are on page 1of 124

COMMUNICATIONS

ACM
cACM.acm.org OF THE 05/2011 VOL.54 NO.5

Brain-Computer
Interfaces
Weapons of
Mass Assignment
Online Advertising,
Behavioral Targeting,
and Privacy
The Future of
Microprocessors
I, Domestic Robot
Proving Program
Termination

Association for
Computing Machinery
8th ACM Conference on

Creativity & Cognition


http://dilab.gatech.edu/ccc/index.html
November 3-6, 2011
Georgia Institute of Technology,
Atlanta, Georgia, USA

The theme of Creativity & Cognition 2011 is Creativity and Technology.


We seek to understand human creativity in its many manifestations,
to design new interactive techniques and tools to augment
and amplify human creativity, and to use computational media technologies
to explore new creative processes and artifacts in all human endeavors
ranging from the arts to science, from design to education.
The conference features scholarly talks, artworks, tutorials, a graduate student
symposium, and workshops.
Keynote Speakers:
Guy Claxton (Creativity and Learning)
Sara Diamond (Creativity and Visual Arts)
Atau Tanaka (Creativity and Music)

General Chair:
Ashok Goel

Program Co-Chairs:
Ashok Goel, Georgia Institute of Technology, USA
Fox Harrell, Massachusetts Institute of Technology, USA
Brian Magerko, Georgia Institute of Technology, USA
Yukari Nagai, Japan Advanced Institute of Science and Technology, Japan
Jane Prophet, Goldsmiths College, University of London, UK
THE ACM A. M. TURING AWARD
by the community ◆ from the community ◆ for the community

ACM, Intel and Google congratulate

LESLIE G. VALIANT
for transformative contributions to the theory of computation,
including the theory of probably approximately correct (PAC)
learning, the complexity of enumeration and of algebraic compu-
tation, and the theory of parallel and distributed computing.

“Leslie Valiant’s research in the theory of computa- “Google joins in honoring Leslie Valiant for his profound
tion has revolutionized both machine learning and impact on computer science research and his inspired
artificial intelligence, making machines almost innovations in machine learning, an area of growing
think. His approach invites comparison with importance in computing. We are pleased to sponsor
Alan Turing himself—a novel formulation starting this award, which motivates and recognizes the great
from a deep fundamental insight. Intel is pleased advances in computing that together have had such a
to support this year’s ACM Turing Award.” beneficial impact on the world.”

Shekhar Borkar Alfred Spector


Intel Fellow, Microprocessor Technology Lab Vice President, Research and Special Initiatives
Intel Corporation Google Inc.

For more information see www.intel.com/research. For more information, see http://www.google.com/corporate/
index.html and http://research.google.com/.

Financial support for the ACM A. M. Turing Award is provided by Intel Corporation and Google Inc.
communications of the acm

Departments News Viewpoints

5 Editor’s Letter 13 Sorting Through Photos 25 Economic and Business Dimensions


Technology Has Teaching computers to understand Online Advertising, Behavioral
Social Consequences pictures could lead to search engines Targeting, and Privacy
By Moshe Y. Vardi capable of identifying and organizing Studying how privacy regulation
large datasets of visual information. might impact economic activity on
6 Letters To The Editor By Neil Savage the advertising-supported Internet.
Preserve Privacy in By Avi Goldfarb and
Statistical Correlations 16 I, Domestic Robot Catherine E. Tucker
With recent advances in laser
9 In the Virtual Extension rangefinders, faster algorithms, 28 Education
and open source robotic operating Reaching Learners Beyond
10 BLOG@CACM systems, researchers are increasing our Hallowed Halls
Stonebraker on Data Warehouses domestic robots’ semantic and Rethinking the design of computer
Data warehouses are not only situational awareness. science courses and broadening
increasing in size and complexity, By Gregory Goth the definition of computing
but also in their importance to education both on and off campus.
business. Michael Stonebraker 18 Data Optimization in By Brian Dorn
shares 10 key ideas on the topic. Developing Nations
Artificial intelligence and machine 31 Law and Technology
12 CACM Online learning could expand access Bell Labs and Centralized Innovation
Let ACM Help You Find to health care, improve the quality Replaying the long-term costs
Your Next Job ‘Online’ of education, and respond of monopolized innovation.
By Scott E. Delman effectively to natural disasters By Tim Wu
in the developing world.
41 Calendar By Leah Hoffmann 34 Interview
An Interview with Steve Furber
118 Careers 22 Deus Ex Machina Steve Furber, designer of the seminal
Computational metaphysics BBC Microcomputer System and the
is helping philosophers answer widely used ARM microprocessor,
Last Byte age-old questions, such as reflects on his career.
whether God exists. By Jason Fitzpatrick
120 Puzzled By Marina Krakovsky
Games, Roles, Turns 40 Viewpoint
By Peter Winkler 23 Web Science Meets Network Science The Importance of
A pair of divergent scientific Reviewing the Code
communities discusses their Highlighting the significance of the
similarities and differences, and often overlooked underlying software
search for common ground. used to produce research results.
About the Cover: By Alex Wright By Juan A. Añel
Technologies that allow
users to communicate
or control devices by
‘thought’ were once
the stuff of science
fiction. Today, however,
extraordinary strides in
the field of brain-computer
interfaces (BCI) are
very real and having a
huge impact on people
with neuromuscular
disorders and injuries.
This month’s cover
story by Dennis McFarland and Jonathan Wolpaw
(p. 60) explores the science that translates electric
signals produced by the brain into action or words.
Photograph by Justin Stephens.

2 commun ic ations of the ac m | may 2 0 1 1 | vol . 5 4 | no. 5


05/2011 vol. 54 no. 05

Practice Contributed Articles Review Articles

60 Brain-Computer Interfaces for 88 Proving Program Termination


Communication and Control In contrast to popular belief, proving
The brain’s electrical signals enable termination is not always impossible.
people without muscle control to By Byron Cook, Andreas Podelski,
physically interact with the world. and Andrey Rybalchenko
By Dennis J. McFarland
and Jonathan R. Wolpaw
Research Highlights
67 The Future of Microprocessors
Energy efficiency is the new 100 Technical Perspective
fundamental limiter of processor Complex Financial Products:
performance, way beyond Caveat Emptor
numbers of processors. By David C. Parkes
By Shekhar Borkar
and Andrew A. Chien 101 Computational Complexity
and Information Asymmetry
44 The One-Second War 78 Privacy-Preserving Network Forensics in Financial Products
Finding a lasting solution to Privacy-preserving attribution of IP By Sanjeev Arora, Boaz Barak,
the leap seconds problem has packets can help balance forensics Markus Brunnermeier, and Rong Ge
become increasingly urgent. with an individual’s right to privacy.
By Poul-Henning Kamp By Mikhail Afanasyev,
Tadayoshi Kohno, Justin Ma, 108 Technical Perspective
49 Mobile Application Development: Nick Murphy, Stefan Savage, Images Everywhere
Web vs. Native Alex C. Snoeren, and Looking for Models
Web apps are cheaper to develop and Geoffrey M. Voelker By Guillermo Sapiro
deploy than native apps, but can they
match the native user experience? Challenges and Business Models 109 Self-Similarity-based
By Andre Charland and Brian LeRoux for Mobile Location-based Services Image Denoising
and Advertising By Antoni Buades, Bartomeu Coll,
54 Weapons of Mass Assignment Mobile advertising will become and Jean-Michel Morel
A Ruby on Rails app highlights more pervasive and profitable,
some serious, yet easily avoided, but not before addressing key
security vulnerabilities. technical and business challenges.
By Patrick McKenzie By Subhankar Dhar
and Upkar Varshney
Articles’ development led by
queue.acm.org Is Open Source Security a Myth?
What does vulnerability
and patch data say?
By Guido Schryen

Invisible Work in Standard


Bibliometric Evaluation
of Computer Science
Most of a computer scientist’s
Illust ratio n by Gary neill

production can go uncounted


if a standard bibliographic service
is used.
By Jacques Wainer, Siome Goldenstein,
Association for Computing Machinery
and Cleo Billa Advancing Computing as a Science & Profession

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f the acm 3


communications of the acm
Trusted insights for computing’s leading professionals.

Communications of the ACM is the leading monthly print and online magazine for the computing and information technology fields.
Communications is recognized as the most trusted and knowledgeable source of industry information for today’s computing professional.
Communications brings its readership in-depth coverage of emerging areas of computer science, new trends in information technology,
and practical applications. Industry leaders use Communications as a platform to present and debate various technology implications,
public policies, engineering challenges, and market trends. The prestige and unmatched reputation that Communications of the ACM
enjoys today is built upon a 50-year commitment to high-quality editorial content and a steadfast dedication to advancing the arts,
sciences, and applications of information technology.

ACM, the world’s largest educational STA F F editoria l B oard


and scientific computing society, delivers  
resources that advance computing as a Director of Group P ublishi ng E ditor-i n -c hief
science and profession. ACM provides the Scott E. Delman Moshe Y. Vardi ACM Copyright Notice
computing field’s premier Digital Library publisher@cacm.acm.org eic@cacm.acm.org Copyright © 2011 by Association for
and serves its members and the computing Executive Editor News Computing Machinery, Inc. (ACM).
profession with leading-edge publications, Diane Crawford Co-chairs Permission to make digital or hard copies
conferences, and career resources. Managing Editor Marc Najork and Prabhakar Raghavan of part or all of this work for personal
Thomas E. Lambert Board Members or classroom use is granted without
Executive Director and CEO Senior Editor Hsiao-Wuen Hon; Mei Kobayashi; fee provided that copies are not made
John White Andrew Rosenbloom William Pulleyblank; Rajeev Rastogi; or distributed for profit or commercial
Deputy Executive Director and COO Senior Editor/News Jeannette Wing advantage and that copies bear this
Patricia Ryan Jack Rosenberger notice and full citation on the first
Director, Office of Information Systems Web Editor Viewpoints page. Copyright for components of this
Wayne Graves David Roman Co-chairs work owned by others than ACM must
Director, Office of Financial Services Editorial Assistant Susanne E. Hambrusch; John Leslie King; be honored. Abstracting with credit is
Russell Harris Zarina Strakhan J Strother Moore permitted. To copy otherwise, to republish,
Director, Office of Marketing and Rights and Permissions Board Members to post on servers, or to redistribute to
Membership Deborah Cotton P. Anandan; William Aspray; lists, requires prior specific permission
David M. Smith Stefan Bechtold; Judith Bishop; and/or fee. Request permission to publish
Director, Office of SIG Services Art Director Stuart I. Feldman; Peter Freeman; from permissions@acm.org or fax
Donna Cappo Andrij Borys Seymour Goodman; Shane Greenstein; (212) 869-0481.
Director, Office of Publications Associate Art Director Mark Guzdial; Richard Heeks;
Bernard Rous Alicia Kubista Rachelle Hollander; Richard Ladner; For other copying of articles that carry a
Director, Office of Group Publishing Assistant Art Directors Susan Landau; Carlos Jose Pereira de Lucena; code at the bottom of the first or last page
Scott E. Delman Mia Angelica Balaquiot Beng Chin Ooi; Loren Terveen or screen display, copying is permitted
Brian Greenberg provided that the per-copy fee indicated
ACM C ou nci l Production Manager P ractice in the code is paid through the Copyright
President Lynn D’Addesio Chair Clearance Center; www.copyright.com.
Alain Chesnais Director of Media Sales Stephen Bourne
Vice-President Jennifer Ruzicka Board Members Subscriptions
Barbara G. Ryder Public Relations Coordinator Eric Allman; Charles Beeler; David J. Brown; An annual subscription cost is included
Secretary/Treasurer Virgina Gold Bryan Cantrill; Terry Coatta; in ACM member dues of $99 ($40 of
Alexander L. Wolf Publications Assistant Stuart Feldman; Benjamin Fried; which is allocated to a subscription to
Past President Emily Williams Pat Hanrahan; Marshall Kirk McKusick; Communications); for students, cost
Wendy Hall Erik Meijer; George Neville-Neil; is included in $42 dues ($20 of which
Chair, SGB Board Columnists is allocated to a Communications
Theo Schlossnagle; Jim Waldo
Vicki Hanson Alok Aggarwal; Phillip G. Armour; subscription). A nonmember annual
Co-Chairs, Publications Board Martin Campbell-Kelly; The Practice section of the CACM subscription is $100.
Ronald Boisvert and Jack Davidson Michael Cusumano; Peter J. Denning; Editorial Board also serves as
Members-at-Large Shane Greenstein; Mark Guzdial; the Editorial Board of . ACM Media Advertising Policy
Vinton G. Cerf; Peter Harsha; Leah Hoffmann; Communications of the ACM and other
Mari Sako; Pamela Samuelson; C on tributed Articles
Carlo Ghezzi; Co-chairs ACM Media publications accept advertising
Anthony Joseph; Gene Spafford; Cameron Wilson in both print and electronic formats. All
Al Aho and Georg Gottlob
Mathai Joseph; Board Members advertising in ACM Media publications is
Kelly Lyons; C on tact P oi n ts at the discretion of ACM and is intended
Copyright permission Yannis Bakos; Elisa Bertino; Gilles Brassard;
Mary Lou Soffa; Alan Bundy; Peter Buneman; Andrew Chien; to provide financial support for the various
Salil Vadhan permissions@cacm.acm.org activities and services for ACM members.
Calendar items Peter Druschel; Blake Ives; James Larus;
SGB Council Representatives Igor Markov; Gail C. Murphy; Shree Nayar; Current Advertising Rates can be found
Joseph A. Konstan; calendar@cacm.acm.org by visiting http://www.acm-media.org or
Change of address Lionel M. Ni; Sriram Rajamani;
G. Scott Owens; Marie-Christine Rousset; Avi Rubin; by contacting ACM Media Sales at
Douglas Terry acmhelp@acm.org (212) 626-0654.
Letters to the Editor Krishan Sabnani; Fred B. Schneider;
Pub licatio n s Board letters@cacm.acm.org Abigail Sellen; Ron Shamir; Marc Snir;
Larry Snyder; Veda Storey; Manuela Veloso; Single Copies
Co-Chairs
Michael Vitale; Wolfgang Wahlster; Single copies of Communications of the
Ronald F. Boisvert; Jack Davidson W eb S I TE
Andy Chi-Chih Yao ACM are available for purchase. Please
Board Members http://cacm.acm.org contact acmhelp@acm.org.
Nikil Dutt; Carol Hutchins; Joseph A. Konstan;
Ee-Peng Lim; Catherine McGeoch; Aut h or G u ide l in es Research High lights
Comm unicatio ns of the ACM
M. Tamer Ozsu; Holly Rushmeier; http://cacm.acm.org/guidelines Co-chairs
(ISSN 0001-0782) is published monthly
Vincent Shen; Mary Lou Soffa David A. Patterson and Stuart J. Russell
by ACM Media, 2 Penn Plaza, Suite 701,
Adv ertis i ng Board Members
ACM U.S. Public Policy Office New York, NY 10121-0701. Periodicals
Martin Abadi; Stuart K. Card; Jon Crowcroft;
Cameron Wilson, Director postage paid at New York, NY 10001,
ACM Advertisi n g Department Shafi Goldwasser; Monika Henzinger;
1828 L Street, N.W., Suite 800 and other mailing offices.
2 Penn Plaza, Suite 701, New York, NY Maurice Herlihy; Dan Huttenlocher;
Washington, DC 20036 USA Norm Jouppi; Andrew B. Kahng;
10121-0701 PO STMASTER
T (202) 659-9711; F (202) 667-1066 Gregory Morrisett; Michael Reiter;
T (212) 869-7440 Please send address changes to
Computer Science Teachers Association F (212) 869-0481 Mendel Rosenblum; Ronitt Rubinfeld;
Communications of the ACM
Chris Stephenson David Salesin; Lawrence K. Saul;
Director of Media Sales 2 Penn Plaza, Suite 701
Executive Director Guy Steele, Jr.; Madhu Sudan;
Jennifer Ruzicka New York, NY 10121-0701 USA
2 Penn Plaza, Suite 701 Gerhard Weikum; Alexander L. Wolf;
jen.ruzicka@hq.acm.org Margaret H. Wright
New York, NY 10121-0701 USA
T (800) 401-1799; F (541) 687-1840 Media Kit acmmediasales@acm.org
W eb
Association for Computing Machinery Co-chairs
(ACM) James Landay and Greg Linden
2 Penn Plaza, Suite 701 Board Members A
SE
REC
Y

New York, NY 10121-0701 USA Gene Golovchinsky; Marti Hearst;


E

CL
PL

T (212) 869-7440; F (212) 869-0481 Jason I. Hong; Jeff Johnson; Wendy E. MacKay Printed in the U.S.A.
NE
TH

S
I

Z
I

M AGA

4 commun ications of the ac m | may 2 0 1 1 | vol . 5 4 | no. 5


editor’s letter

DOI:10.1145/1941487.1941488 Moshe Y. Vardi

Technology Has who serves on one PC per year as com-

Social Consequences pared to someone who serves on mul-


tiple PCs per year. Indeed, in the 1980s
it was typical to see every submission
A conference program committee (PC) read by five to six PC members, today
member received a paper for review. the norm is often three to four review-
ers for submission. Furthermore,
He distributed the manuscript to his these reviewers are often not PC
research group to “solicit their opinions members but “subreviewers.” In fact,
while the concept of subreviewer was
originally developed with the purpose
of the paper” and the group embarked ond, junior PC members had a chance of bringing additional expertise to
on improving the results of the paper to interact intensively with senior PC PCs, today it is viewed as an opportu-
under review. The research group then members. There was nontrivial social nity to train junior researchers in the
submitted their own paper to another pressure on junior PC members to art of paper reviewing. Thus, the role
conference, their submission occur- demonstrate their competence in PC of a PC member seems to have evolved
ring three months before the first meetings. Thus, PC service provided from that of a reviewer to that of “re-
paper was to be presented at a con- important socializing experience, view orchestrator.”
ference. When eventually confronted where unwritten norms and customs What has been the outcome of this
(the short gap between the appear- were learned by observation. development? Many of us are quite fa-
ance of the two papers triggered ques- With the emergence of the World- miliar with this outcome. The quality of
tions), the PC member responded Wide Web in the mid-1990s, physical conference reviewing has declined and
with “Was that wrong? Should I have PC meetings suddenly seemed waste- the selection process has become far
not done that?’’ (The reader may want ful, as it became possible to conduct more random. Two years ago, I wrote
to search for this phrase on YouTube.) virtual meetings without incurring in this space about “Conferences vs.
Amazingly, this PC member was travel expenses and headaches. Con- Journals in Computing Research.” The
not aware that a conference paper ference-management software tools declining quality of conference review-
submission constitutes privileged emerged and many communities ing was one of triggers that spurred me
communication. In theory, review- abandoned physical meetings in favor to write that editorial.
ers should immediately “forget” what of virtual ones. I was very much in fa- The loss in quality of conference re-
they have read. For reviewers to use vor of this change back then! It took, viewing is just one result of the move
such privileged material for their own however, a few years for the adverse to virtual PC meetings. Another out-
work immediately creates a blatant consequences of this change to be- come is the loss of socialization that
conflict of interest. How did this PC come visible. took place in PC meetings. It is this
member, a full professor in a respect- Economists would tell you that a lost socialization that contributed to
ed university, not know such a funda- commodity priced too low would end a senior researcher being ignorant of
mental rule of scholarly reviewing? up being overconsumed. PC service is one of the most basic rules of schol-
To understand how the ethics of a commodity with positive utility. Our arly reviewing.
program committees has declined, community views PC service as a form We all know that technology has
one must review the history of com- of professional recognition; in fact, social consequences. This applies to
puter science program committees it is one of the few markers of profes- us as well. The switch to purely vir-
over the last 50 years. Until the mid- sional recognition available to junior tual meetings did not serve us well.
1990s, program committees met in researchers. Since the “cost” of PC Many communities have already real-
face-to-face meetings. This had two service has dropped with the switch to ized that and are combining virtual
significant consequences. First, PC virtual meetings, “consumption” has and physical meetings to merge the
members bore the cost of attending gone up. Indeed, it is quite common strengths of both formats. Such prac-
PC meetings, leading them to be care- today to see researchers serving on sev- tices, I believe, should be widely ad-
ful with accepting PC service commit- eral PCs per year. opted. Technology can be managed!
ments. It was rare then for one to serve Of course, one cannot expect the
on more than one PC per year. Sec- same level of effort from someone Moshe Y. Vardi, editor-in-chief

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f the ac m 5


letters to the editor

DOI:10.1145/1941487.1941489

Preserve Privacy in Statistical Correlations

M
any thanks for Cyn- What came through clearly in “Re- In addition, the assignment of oldTop
thia Dwork’s article “A birth of Worlds” is the author’s nostal- at line 13 creates a reference to the top
Firm Foundation for gia for the experience of those worlds— node, keeping it alive until the return
Private Data Analysis” their realities and possibilities. Such from the function.
(Jan. 2011), explaining compelling emotional, perceptual, ex- This is of interest because if any of
why, in trying to formalize what is per- istential content may indeed be gone these constraints is not true, the pop
fect privacy, we cannot use the late Uni- for good. Loss of an appealing game operation would not work. In particu-
versity of Stockholm economist Tore world is lamentable, but it is even more lar, if one would naively implement
E. Dalenius’s criterion that asking al- disheartening with engineering and a push-and-pop mechanism along
lowed queries of a statistical database, scientific content, where we require the these lines in a language like C++, and
we should not be able to learn new (pri- durability and reproducibility of our in- let the clients provide the object to be
vate) information about a particular teractive 3D digital content—models, pushed, and returned that object to
individual. When preparing to discuss behaviors, worlds, and scenarios—for the clients when the pop occurred, the
Dwork’s article at a recent colloquium decades to come. program would be wrong. This is be-
in our computer science department, Enterprise-scale adopters, along cause after fetching oldTop (line 13)
we came up with an even simpler expla- with many others, also feel the pain of and newTop (line 17) other threads
nation of such an impossibility: virtual-world babelization, as develop- could remove the top node, remove
One important purpose of collect- ing and maintaining innovative assets or push other nodes, then push the
ing statistical data is to help identify like worlds, avatars, and business log- top node again. The compareAnd-
correlations between, say, weight and ic across platforms become increas- Set would then succeed, even though
blood pressure. Suppose, for exam- ingly complex. Content models and newTop was no longer the correct new
ple, it turns out that blood pressure network protocols are fragmented, value. Similarly, if the implementation
is equal to weight, and we know that making it difficult to create integrated allocated a node in push, and freed it in
person A (not in this database) weighs information spaces and a compelling pop, the program would be wrong be-
180 pounds. Without the database, A’s user experience. In the tumult of pro- cause the freed-node storage might be
blood pressure might be private, but prietary virtual-world technology, lack reused in a subsequent push, leading
once we learn the perfect correlation of reuse is a major obstacle to achiev- to the same error.
from it, we can conclude that A’s blood ing improved efficiencies and econo- The Java implementation also in-
pressure is 180. mies of scale. volves hidden costs, including allo-
In real life, we never see such perfect In the face of this market churn is cation and garbage collection of the
correlation, but, by analyzing the data- a proven path for interactive 3D envi- node objects and concurrency control
base and discovering some correlation, ronments that includes royalty-free, required in the memory-allocation
we know more about the probability of extensible content models designed system to make it work. These costs
different values of blood pressure than for the Web and semantic integration. must be considered, as they are essen-
we would otherwise know. Consumers and computer profession- tial to the correctness of the program.
Vladik Kreinovich and Luc Longpre, als alike should therefore demand and Be warned about not using apparently
El Paso, TX participate in the development of in- identical algorithms that do not satisfy
ternational standards needed to raise the hidden constraints.
the greatest common denominator of Marc Auslander,
Recall the Lost Frontiers future-proof 3D content. Yorktown Heights, NY
of Virtual Worlds Nicholas F. Polys (president of
The Future Tense essay “Rebirth of Web3D Consortium), Blacksburg, VA
Worlds” (Dec. 2010) lamented the de- Protect Software Consumers
mise of historic, online interactive 3D Like Everyone Else
destinations. Since 1997 when they first Let Implementation I regret that Joel F. Brenner responded
appeared on the Web, virtual worlds Semantics Unlock the Pop to my letter to the editor “Hold Manu-
have inspired artists, engineers, and The lock-free pop operation Nir Shavit facturers Liable” (Feb. 2011) concern-
scientists alike to explore and build the described in his article “Data Struc- ing his Viewpoint “Why Isn’t Cyber-
emerging frontiers of cyberspace. As tures in the Multicore Age” (Mar. 2011) space More Secure?” (Nov. 2010) with
Rumilisoun (a.k.a William Sims Bain- depends on the semantics of the Java two strawman arguments and one out-
bridge) wrote, despite the wonderful implementation in an important way. right misstatement.
destinations across entertainment, The push operation allocates a new Brenner said software “is sold pur-
education, and community, we are left node object during the call, and it is suant to enforceable contracts.” As
to ask, “How can I still get there?” this object that is placed on the stack. the Viewpoint “Do You Own the Soft-

6 communicat ions of the ac m | may 2 0 1 1 | vo l . 5 4 | no. 5


letters to the editor

ware You Buy?” by Pamela Samuelson means toward the end of meeting the
(Mar. 2011) made clear, software is not basic standards of non-harm and re-
“sold.” Every EULA insists software is li- liability taken as a given for all other
censed and only the media on which it products. In any case, Brenner did not
is recorded are sold; a series of court de- say why he thinks a different process
cisions, of which the Vernor v. Autodesk should be used for setting functional
decision Samuelson cited is the most safety and reliability standards for soft-
recent and one of the most conclusive, ware than for other consumer goods.
have upheld this stance. Simply asserting “software is different”
This mischaracterization by Brenner is not a reasoned argument.
is one of the keys to understanding how L Peter Deutsch, Palo Alto, CA
manufacturers of such shoddy goods
get off essentially scot-free. If software
were actually sold, the argument that Author’s Response:
it should be exempt from the protec- Thanks to Deutsch for correcting my error.
tions of the Uniform Commercial Code Software is of course licensed rather
would be much more difficult to main- than sold. As Deutsch says, this is why
tain, in addition to other benefits thor- UCC product-liability standards for
oughly discussed elsewhere (including purchased goods haven’t improved
by Samuelson in her column). software quality. But his point strengthens
Even though EULAs have been held my argument. I was explaining, not
enforceable, such a determination defending, the status quo, which is
comes at the expense of the consumer. lamentable precisely because liability
Almost without exception, EULAs have is weak. I cannot fathom why Deutsch
the effect of stripping the consumer of thinks I’m indifferent to higher engineering
essentially all reasonable rights and ex- standards for software. They represent the
pectations, compared with other goods only basis on which a liability regime can ACM’s
and services. And while click-through be founded, even for licensed products.
interactions
and shrink-wrap EULAs have indeed Joel F. Brenner, Washington, D.C.
been found to be enforceable, many magazine explores
reasonable people (including me) be- critical relationships
lieve it should not be the case, since Correction between experiences, people,
the vast majority of consumers do not Sarah Underwood’s news story “Brit-
read these “contracts” and do not un- ish Computer Scientists Reboot” (Apr. and technology, showcasing
derstand their consequences. Brenner 2011) incorrectly attributed statements emerging innovations and industry
apparently does not consider them a by King’s College London professor leaders from around the world
significant problem. Michael Luck to King’s College Lon-
Finally, Brenner simply reiterated don professor Andrew Jones. This has across important applications of
his assertion that “Congress shouldn’t been corrected in the online article. We design thinking and the broadening
decide what level of imperfection is apologize for the error. field of the interaction design.
acceptable.” I agree. There are basic
Our readers represent a growing
consumer protections that apply to Communications welcomes your opinion. To submit a
all other goods, as embodied in the Letter to the Editor, please limit your comments to 500
words or less and send to letters@cacm.acm.org.
community of practice that
UCC. Neither a further act of Congress is of increasing and vital
nor detailed specifications of product © 2011 ACM 0001-0782/11/05 $10.00
global importance.
construction are required to give con-
sumers the right to expect, say, a stove, Coming Next Month in
properly used and maintained, will
not burn down their house. The corre-
Communications
e

sponding right of freedom from gross A Profile of ACM’s 2010


ib
cr

harm, like the other protections of A.M. Turing Award Recipient,


s
ub

the UCC, is not available for software,


/s

Les Valiant.
rg

though it and they should be; Brenner


.o
cm

apparently disagrees. Advancing the State


a
w.

I emphasized good engineering of Home Networking


w
w

practices in my February letter not be-


://
tp

cause (as Brenner seems to believe) I Also, the latest news on digital
ht

thought they were sufficient to guaran- journalism, flexible plastic displays,


and fruit fly-inspired network
tee a reasonable level of product quality, breakthroughs.
but because they are well-established

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f the acm 7


in the virtual extension

DOI:10.1145/1941487.1941490

In the Virtual Extension


To ensure the timely publication of articles, Communications created the Virtual Extension (VE)
to expand the page limitations of the print edition by bringing readers the same high-quality
articles in an online-only format. VE articles undergo the same rigorous review process as those
in the print edition and are accepted for publication on merit. The following synopses are from
articles now available in their entirety to ACM members via the Digital Library.

contributed article contributed article contributed article


DOI: 10.1145/1941487.1941515 DOI: 10.1145/1941487.1941516 DOI: 10.1145/1941487.1941517

Challenges and Business Is Open Source Security a Myth? Invisible Work in Standard
Models for Mobile Location-based Guido Schryen Bibliometric Evaluation
Services and Advertising During the past few decades we became of Computer Science
Subhankar Dhar and Upkar Varshney accustomed to acquiring software by Jacques Wainer, Siome Goldenstein,
Location-based services have attracted procuring licenses for a proprietary or and Cleo Billa
considerable attention due to their binary-only immaterial object. We regard Multidisciplinary committees routinely
potential to transform mobile software as a product we have to pay make strategic decisions, rule on subjects
communications and the potential for, just as we would pay for material ranging from faculty promotion to grant
for a range of highly personalized and objects. However, in more recent years, awards, and rank and compare scientists.
context-aware services. Since the days of this widely cultivated habit has begun Though they may use different criteria
early location-tracking functionalities to be accompanied by a software model for evaluations in subjects as disparate as
introduced in Japan in 2001 and in some characterized by software that comes history and medicine, it seems logical for
U.S. networks, location-based services have with a compilable source code. This type academic institutions to group together
made considerable progress. of software is referred to as open source mathematics, computer science, and
The potential for location-based software (OSS). electrical engineering for comparative
services is evident from powerful and While there is consensus that opening evaluation by these committees.
ubiquitous wireless devices that are up source code to the public increases These evaluations will be more frequent
growing in popularity. Many surveys the number of reviewers, the impact as the number of scientists increases. Since
predict billions of dollars in revenues of open source on software security the number of funding sources grows more
for mobile advertising. Mobile network remains controversial. While the security slowly, and research practices vary among
operators are well positioned to take up a discussion is rife with beliefs and different subjects, using the same criteria
significant percentage of this advertising guesses, only a few quantitative models in different areas may produce notable
revenue as they negotiate deals with and some empirical studies appear in injustices. The ongoing discussion on CS
content providers. Recent deals between the literature; and most of those studies research evaluation helps build the case for
media companies, advertising agencies, examine only one or a few packages. the CS community defending itself from
and the Internet/software industry also This article presents a comprehensive expected injustices in future comparative
demonstrate significant optimism for empirical investigation of published evaluations.
future growth. vulnerabilities and patches of 17 Traditional assessment criteria
However, there are many challenges widely deployed open source and are based on Thomson Reuters’ Web
that have slowed down the deployment, closed source software packages. The of Science (WoS) indexing service,
offering, and wide-scale adoption of empirical analysis uses comprehensive quantifying the production and number of
location-based services. The challenges vulnerability data contained in the NIST citations of individual scientists, university
include emerging technologies, suitable National Vulnerability Database and a departments, whole universities, countries,
applications, and business models. This newly compiled data set of vulnerability and scientific areas.
article addresses both technical- and patches. Based on these comprehensive Here, the authors provide some
business-related challenges in location- data sets, this study is capable of quantitative evidence of unfairness,
based services, specifically in mobile providing empirical evidence that open defining researchers’ invisible work
advertising. The authors explore how source and closed source software as an estimation of all their scientific
location-based mobile advertising can development do not significantly differ publications not indexed by WoS or
generate revenues and sustain successful in terms of vulnerability disclosure Scopus. Thus, the work is not counted as
business models. However, they are quick and vendors’ patching behavior—a part of scientists’ standard bibliometric
to note that while mobile advertising will phenomenon that has been widely evaluations. To compare CS invisible
become more pervasive and profitable, it assumed, but hardly investigated. work to that of physics, mathematics, and
will not happen before key technical and electrical engineering, they generated a
business challenges are addressed. controlled sample of 50 scientists from
each of these fields and focused on the
distribution of invisible work rate for each
of them using statistical tests.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f the ac m 9


The Communications Web site, http://cacm.acm.org,
features more than a dozen bloggers in the BLOG@CACM
community. In each issue of Communications, we’ll publish
selected posts or excerpts.

Follow us on Twitter at http://twitter.com/blogCACM

doi:10.1145/1941487.1941491 http://cacm.acm.org/blogs/blog-cacm

Stonebraker on The problem with row stores is they


store data in the fact table, row by row,

Data Warehouses
on disk. A typical business intelligence
query requires half-a-dozen attributes
or less (e.g., find me the average price of
widgets by store by month for the past
Data warehouses are not only increasing in size two years). A row store will read all 200
and complexity, but also in their importance to business. attributes, even though only six are re-
Michael Stonebraker shares 10 key ideas on the topic. quired. In contrast, a DBMS that orga-
nized data by column will read only the
six required, a savings of a factor of 33.
Michael Stonebraker (what), along with attributes of the sale Since fact tables are getting fatter
From “My Top 10 (e.g., price, sales tax, credit card, etc.). over time as business analysts want ac-
Assertions About One should organize such data as cess to more and more information, this
Data Warehouses” shown in the figure here. Such a sche- architectural difference will become in-
http://cacm.acm.org/ ma is called a star schema, with a cen- creasingly significant. Even when “skin-
blogs/blog-cacm/98136 tral fact table and surrounding dimen- ny” fact tables occur or where many at-
Data warehouses, business intelli- sion tables. If stores are organized into tributes are read, a column store is still
gence, business analytics, and complex divisions, then the star schema has an- likely to be advantageous because of its
analytics are the subject of increasingly other table between store and fact, and superior compression ability.
intense marketing wars, seemingly ac- becomes a snowflake schema. Star and For these reasons, over time, col-
celerated by Oracle’s introduction of snowflake schemas are clean, simple, umn stores will clearly win.
the Exadata appliance. Here is my spin easy to parallelize, and usually result in 3. The vast majority of data warehous-
on the situation. Please note that I have very high-performance database man- es are not candidates for main memory
a financial interest in several database agement system (DBMS) applications. or flash memory.
companies, and may be biased in a If you are a data warehouse design- Data warehouses are increasing in
number of ways. The reader should al- er and come up with something other size faster than storage is getting cheap-
ways keep this in mind. than a snowflake schema, you should er. Business analysts have an appetite
1. Star and snowflake schemas are a probably rethink your design. for as much attribute data as they can
good idea in the data warehouse world. However, you will often come up get their hands on, and want to keep
In short, data warehouses store with a design having a large number increasingly long periods of history.
a large collection of facts. The over- of attributes in the fact table; 40 at- Hence, data warehouse problems are
whelming majority of these facts are tributes are routine and 200 are not getting “net harder,” not “net easier.”
the “five Ws” (who, what, where, when, uncommon. Current data warehouse Put differently, most data warehouses
and why) along with a collection of at- administrators usually stand on their are measured in Gbytes today, Tbytes
tributes about the fact. For example, a heads to make “fat” fact tables perform tomorrow, and Pbytes the next day.
typical retail organization stores facts on current relational database man- 4. Massively parallel processor (MPP)
about historical transactions. These agement systems (RDBMSs). systems will be omnipresent in this
facts include the customer (who), the 2. Column stores will dominate the market.
retail store (where), the time of the sale data warehouse market over time, re- Massively parallel processor sys-
(when), and the purchased product placing row stores. tems are the only kind of computer ar-

10 commun ic ations of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


blog@cacm

chitecture that will scale to Pbytes. All pliances are a packaging exercise—i.e., task. Hence, HA is used for recovery,
vendors, with a very few exceptions, are preconfigure general-purpose hard- not the DBMS log. Obviously, this re-
or will soon support MPP. Don’t bet on ware and preload the DBMS on it. This quires the DBMS to support HA; oth-
anything that is not in the MPP camp. results in a software-only appliance. erwise, it is a manual DBA hassle to ac-
5. “No knobs” is the only thing that 7. Hybrid workloads are not optimized complish the same thing in user code.
makes any sense. by “one size fits all.” 9. DBMSs should support online re-
It is pretty clear that human opera- If one has a workload that is part on- provisioning.
tional costs dominate the cost of run- line transaction processing (OLTP) and Not always, but often, I hear a re-
ning a data warehouse. This is mainly part data warehouse, then he or she quest for online reprovisioning. In
the system administration and data- has two options: 1) Run a general-pur- other words, one initially allocates 10
base administration that is involved in pose RDBMS that stores both kinds of nodes to accomplish warehouse pro-
keeping a MPP system up and in man- data; and 2) Run two systems, an OLTP cessing. The load later rises, and the
aging a Pbyte-sized warehouse. Data- engine and a data warehouse engine, desire is to allocate 20 nodes to the task
base administrator (DBA) costs include coupled together with a high-speed originally done by 10. This requires the
designing schemas, reprovisioning da- interchange to move operational data database to be repartitioned over dou-
tabases to add or drop resources, add- into the data warehouse. ble the number of nodes.
ing and dropping users, etc. Row stores are not good at data ware- Hardly anybody wants to take the re-
Almost all DBMSs have 100 or more house applications (see #1). Column quired amount of downtime to dump
complicated tuning “knobs.” This re- stores are optimized for data warehous- and reload the DBMS. A much better
quires DBAs to be “4-star wizards” and es and are not good at OLTP. Hence, nei- solution is for the DBMS to support re-
drives up operating costs. The only thing ther is a good candidate for a one-size- provisioning, without going offline.
that makes sense is to have a program fits-all implementation. Instead, there 10. Virtualization often has perfor-
that adjusts these knobs automatically. are a number of interesting new ideas to mance problems in a DBMS world.
In other words, look for “no knobs” as accelerate OLTP, including main-mem- I hear many users say their long-term
the only way to cut down DBA costs. ory SQL engines, main memory caches, goal is to move to the cloud, whether us-
6. Appliances should be “software only.” and flash systems. When coupled with a ing the public cloud or inside the fire-
In my 40 years of experience as a column store in a two-system configura- wall on “an enterprise cloud.” Here, a
computer science professional in the tion, I assert the result will be a factor of collection of servers is allotted to sev-
DBMS field, I have yet to see a special- 50 or so faster than solution 1. eral-to-many DBMS applications inside
ized hardware architecture—a so- 8. Essentially all data warehouse in- an enterprise firewall. Often, such sys-
called database machine—that wins. stallations want high availability (HA). tems are managed by using virtualiza-
In other words, one can buy gener- If there is data corruption in a 10 tion software to present virtual nodes
al-purpose CPU cycles from the major Tbyte warehouse, recovering the da- to the DBMS and its applications.
chip vendors or specialized CPU cycles tabase from the database log will take My experience is that CPU resources
from a database machine vendor. Since a very long time. Of course, the exact can be virtualized with modest over-
the volume of the general-purpose ven- amount of time depends on log for- head (say, 10%). However, data ware-
dors are 10,000 or 100,000 times the mats, number of disks allocated to the houses entail disk-based data. In this
volume of the specialized vendors, log, and so on. However, restoring a 10 world, all MPP DBMSs “move the query
their prices are an order of magnitude Tbyte dump from 10 disks is likely to to the data.” Obviously, this requires
under those of the specialized vendor. take hours, not minutes, and then one knowing the physical data distribution.
To be a price-performance winner, the has to perform a roll forward from the Virtualization will destroy this knowl-
specialized vendor must be at least a dump. Hardly anybody is interested in edge, and turn what were originally
factor of 20−30 faster. taking this kind of downtime. reads to a local disk into reads to non-
I have never seen a specialized hard- Instead, most installations use rep- local disks. In other words, local I/O
ware architecture that is faster by this lication and fail over to a replica if there gets replaced by remote I/O, with an ob-
amount. is data corruption. Then, the corrupted vious significant performance hit.
Put differently, I think database ap- copy can be rebuilt as a background Until better and cheaper network-
ing makes remote I/O as fast as local
A Diagram of a Star Schema. I/O at a reasonable cost, one should be
very careful about virtualizing DBMS
software.
Customer (c-key, c-attributes) Time (t-key, t-attributes) Of course, the benefits of a virtual-
ized environment are not insignificant,
and they may outweigh the perfor-
Fact (c-key, s-key, t-key, p-key, attributes)
mance hit. My only point is to note that
virtualizing I/O is not cheap.
Store (s-key, s-attributes) Product (p-key, p-attributes)
Michael Stonebraker is an adjunct professor at the
Massachusetts Institute of Technology.

© 2011 ACM 0001-0782/11/05 $10.00

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he ac m 11
cacm online

ACM
Member
News
DOI:10.1145/1941487.1941492 Scott E. Delman Judith S. Olson
Named 2011–2012

Let ACM Help You Find Athena Lecturer


In an age of

Your Next Job ‘Online’


telecommuting,
distributed work
teams, and
social media,
getting
coworkers who are geographi-
According to a Harris Interactive Poll of over 2,400 hiring managers and human cally dispersed to work well
resource professionals conducted in late 2010, recruiting in the information tech- together has never been more
nology and technology sectors is expected to increase 26% and 19% over 2010 re- important. As a leader in
computer science and
spectively. This is not only good news for the economy in general, but excellent psychology, Judith S. Olson, the
news for our industry and ACM’s membership specifically. But even though hir- Donald Bren Professor of
ing and recruiting are on an upswing, finding the right position and the perfect Information and Computer
Sciences at the University of
match between candidates and employers is not an easy task.
California, Irvine, has greatly
There are literally hundreds of online resources posting jobs in the technology improved society’s understand-
sector and academia with hundreds of thousands of candidates competing for ing of the factors that make
those positions worldwide. However, for the most coveted jobs and for those or- some geographically dispersed
teams succeed while others fail
ganizations looking to hire the most experienced and talented employees, facul- miserably. In recognition of her
ty, managers, and executives few online resources are more valuable than ACM’s fundamental contributions to
own Career and Job Center (http://jobs.acm.org), which is the engine driving the computer science, ACM’s
Careers section of Communications Web site. Council on Women in Comput-
ing has named Olson the
This site provides basic, but well-organized career-oriented resources, such as 2011–2012 Athena Lecturer.
the ability to post your résumé or vitae, the ability to search an active database of Trained as a cognitive
hundreds of open positions, and the ability to set up alerts and feeds of positions psychologist, she entered the
new field of informatics in 1983
that fit your personalized criteria. Over the past three years, 1,500+ employers have to learn how people could better
posted more than use emerging technologies
1,782 jobs on ACM’s like personal computers and
Job Board, nearly videoconferencing. Through lab
and field experiments, Olson
14,000 ACM mem- found that, despite increasingly
bers have signed up collaborative technology,
to use the free service, it is still difficult for a team
separated by distance to work
and over 4,800 ACM
as well as a team that shares a
members have post- common space. Some of the
ed their résumés in biggest issues: building trust and
the secure database understanding among teams.
In one instance, she found
made available to that instant messaging builds
employers. The site trust better than exchanging
is among the most curriculum vitae or other work-
heavily trafficked of related documents. “The level
of trust was much higher with
all ACM Web sites online chat and conversation
with over 72,000 than it was by just seeing
unique visitors from someone’s background,” says
Olson. “It’s humanizing, and
over 181 countries us- you react to each other and build
ing the site over the on each other. The interaction
past year generating turns out to be very important.
nearly 150,000 visits It’s like a digital water cooler.”
Olson has created a checklist
and 550,000 page views. Our users spend on average over three minutes on the site of 25 items, which will be
during each visit and the site attracts a significant amount of repeat business from part of a Web service to be
many of the most respected employers from both academia and industry around launched later this year, to help
telecommuting groups evaluate
the world. If you haven’t already visited the site at http://jobs.acm.org, check it out! and improve their long-distance
This is one of the most valuable benefits you have as an ACM member, and it just working relationships.
may prove a key resource as you take the next step in your career. —Graeme Stemp-Morlock

12 communications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


N
news

Science | doi:10.1145/1941487.1941493 Neil Savage

Sorting Through Photos


Teaching computers to understand pictures could lead
to search engines capable of identifying and organizing
large datasets of visual information.

T
he number of photos on
the Internet is large and rap-
idly getting larger. The pho-
to-hosting Web site Flickr
uploaded its five-billionth
picture on September 18, 2010, and
Pingdom, a Swedish company that
monitors Internet performance, esti-
mated last year that Facebook is add-
ing photos at a rate of 30 billion a year.
Such numbers present both a chal-
lenge and an opportunity for scien-
tists focused on computer vision. The
challenge lies in figuring out how to
MIT’ s Visual dictiona ry by Antonio Torralba , Hector J. Berna l, R ob F ergu s a nd Ya ir We iss

design algorithms that can organize


and retrieve these photos when, to a
computer, a photograph is little more
than a collection of pixels with differ-
ent light and color values. The opportu-
nity comes from the enormous wealth
of data, both visual and other types,
which researchers can draw on.
“If you think of organizing a photo MIT’s Visual Dictionary project, which is creating a large dataset of labeled images, relies on
collection purely by the image content, humans’ ability to recognize images even when they are just 32 x 32 pixels.
it’s sort of a daunting task, because
understanding the content of pho- the picture but their relative sizes, any But scientists are finding ways to
tos is a difficult task in computer sci- interactions between the objects, and extract the hidden information, using
ence,” says Jon Kleinberg, professor even broad understandings of the sea- machine learning algorithms to first
of computer science at Cornell Univer- son, time of day, or rough location of identify objects and then to uncover
sity. People look at two-dimensional the scene. When computers look at a relationships between them, and by re-
pictures and immediately conjure a photo, “they’re seeing it as a huge col- lying on hints provided by users’ photo
mental three-dimensional image, eas- lection of points drawn on a plane,” tags, associated text, and other rela-
ily identifying not only the objects in notes Kleinberg. tionships between different pictures.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 13


news

“In the old days we used to do image Fei-Fei Li, an assistant professor at the the next objective will be to recognize
matching,” says Nuno Vasconcelos, Stanford Vision Lab, starting develop- associations between those objects.
head of the Statistical Visual Comput- ing such a dataset in ImageNet, along Noticing context can aid in object rec-
ing Laboratory at the University of Cali- with Kai Li, a computer scientist at ognition, she explains. “If we see a car
fornia, San Diego. Computers would Princeton University. on the road, we don’t keep thinking ‘Is
derive some statistical model of an ex- They started with WordNet, a hier- it a boat? Is it an airplane?’ ”
ample image and then look for match- archical database of English words in
es with other images. “It works to which distinct concepts are grouped Using Human Recognition
some extent,” says Vasconcelos, “but it into sets of synonyms called synsets; The Visual Dictionary project at the
doesn’t work very well.” The programs there are 80,000 synsets just for nouns. Massachusetts Institute of Technol-
would find low-level matches, based The researchers entered each of the ogy (MIT) also seeks to develop a large
on factors such as color or texture. A synonyms into Internet search engines dataset of labeled images, but relies
beach scene, all sand and sky, might be to collect about 10,000 candidate im- on the fact that humans can recognize
matched with a picture of a train, with ages per synset. Then, using labor pro- images even when they’re only 32 × 32
an equal amount of sky and a color vided by Amazon Mechanical Turk, in pixels. A Web page displays a mosaic
similar to sand. which people earn small payments for representing 7.5 million images asso-
Nowadays, Vasconcelos says, the em- tasks that require human input, they ciated with 53,464 terms, with closely
phasis is on trying to understand what had people verify whether a candidate related words placed near each other
the image is about. Starting with a set of image contained the object listed in on the mosaic. Each tile on the mosaic
images labeled by humans, a machine the synset. The goal is to have 500 to shows the average color of all the pic-
learning algorithm develops a statisti- 1,000 images per synset. So far, they’ve tures found for that term, and clicking
cal model for an entire class of images. amassed more than 11 million labeled on it displays a box containing a defini-
The computer calculates the probability images in about 15,500 categories, put- tion and a dozen associated images. As
that a picture is a beach scene—based ting them between a third and halfway people click on each tiny picture to ver-
on labels such as “beach,” “sand,” toward their goal. ify that it matches the word, the com-
“ocean,” and “vacation”—and then About 100 people participated in puter records those labels. In another
matches the picture with other images the ImageNet Challenge last summer MIT project, LabelMe, the labeling gets
with the same probability. to see if they could use the dataset to even more specific, identifying not just
To train such algorithms, scien- train computers to recognize objects a person, but heads, legs, and torsos, as
tists need large sets of labeled images. in 1,000 different categories, from well as roads, cars, doors, and so on.
While datasets with a few thousand “French fries” to “Japanese pagoda The small size of these photos helps
photos exist, the algorithms become tree.” Once the computers have shown keep down the demand on computing
more accurate with much larger sets. they can identify objects, Fei-Fei says capacity, but it also reveals something

Milestones

Ben Franklin Medal and Other CS Awards


The Franklin Institute, Anita Women of Vision Awards individual levels for increasing on Computer Human Interaction
Borg Institute for Women The Anita Borg Institute underrepresented groups, and presented the Lifetime Practice
and Technology, and other presented its 2011 Women of particularly for researchers Award, which recognizes the
organizations recently honored Vision awards. Chieko Asakawa, in the gay, lesbian, bisexual, very best and most influential
leading computer scientists for an IBM Fellow at IBM Research- and transgendered computing applications of human-computer
their research and leadership Tokyo, was honored with the community. The CRA Board of interaction, to Larry Tesler, an
qualities. Leadership Award; Mary Lou Directors also selected Jeannette independent consultant, for
Jepsen, CEO of Pixel Qi, the M. Wing, President’s Professor his “work at Xerox PARC and
Ben Franklin Medal Innovation Award; Karen Panetta, of Computer Science and Head, Apple [which] has impacted
The Franklin Institute presented professor of electrical and Computer Science Department, literally every computer user
the 2011 Benjamin Franklin computer engineering at Tufts Carnegie Mellon University, to today.” The Lifetime Research
Medal in Computer and Cognitive University, the Social Impact receive the 2011 Distinguished Award was presented to Terry
Science to John Anderson, R. Award; and IBM received the Service Award for her national Winograd, a computer science
K. Mellon University Professor Anita Borg Top Company For and international thought professor at Stanford University,
of Psychology and Computer Technical Women Award. leadership with respect to for “fundamental contributions
Science at Carnegie Mellon Computational Thinking, and for to the design of interactive
University, for the development CRA Awards her extraordinary performance computer systems by taking a
of Adaptive Control of Thought. Computing Research Association as National Science Foundation broad view of HCI, considering it
His work reflects the first large- (CRA) board of directors selected Assistant Director for Computer in the context of natural language
scale computational theory of Charles Lickel, retired executive and Information Science and processing, machine and human
the process by which humans vice president, IBM, to receive Engineering from 2007–2010. intelligence, cognitive science,
perceive, learn, and reason, the 2011 A. Nico Habermann human-machine communication,
and its application to computer Award for his accomplishments ACM SIGCHI Awards design, and software design.”
tutoring systems. at the national, local, and The ACM Special Interest Group —Jack Rosenberger

14 commun ic ations of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


news

stance, in one area the most outstand- In Memoriam


ing word is Boston. Focusing on that
Scientists are
extracting the hidden
region at the 100-meter scale finds the
peak term to be Fenway Park. Pictures
David E.
information in photos
so labeled might actually be pictures
of a car outside Fenway Park, or your
Rumelhart
by using machine
learning algorithms
dad at the ball game, or a pigeon on
the Green Monster (the left-field wall at 1942–2011
Fenway), but when the computer com-
to identify objects and pares all the labeled photos to find the
David E. Rumelhart, a pioneer
biggest cluster that are mutually simi-
uncover relationships lar to each other, a photo of the base-
in computer simulations of
perception, died on March
between them, and ball diamond emerges as the typical 13 in Chelsea, MI, at the age
of 68 after suffering from
image of Fenway Park. “There was no
by relying on users’ a priori knowledge built into the algo-
a debilitating neurological
condition.
photo tags and rithm by us,” Kleinberg says. A psychologist, Rumelhart
Even with the growing datasets, made many contributions to
associated text. more powerful processors, and con- the formal analysis of human
cognition, working mainly
stantly improving algorithms, re- within the frameworks of
searchers say the ability of computers mathematical psychology,
to identify and organize photographs artificial intelligence, and
parallel distributed processing.
is still in its early stages. “There’s so While working at the
important about vision, says Antonio much stuff that we still need to do, University of California, San
Torralba, an associate professor at but it’s also true that we are doing a lot Diego, Rumelhart developed
MIT who heads the project. “If humans more than we were doing 10 years ago,” a computer simulation of
how three or more layers of
are able to do recognition at such low Vasconcelos says. “It really looks like neurons could work together
resolution, there are two possibili- 10 years from now we will be able to do to process information, which
ties. Either the human visual system is a lot better than we can do today.” is necessary for the brain
to perform complex tasks.
amazing or the visual world is not that
This system, which was more
complex,” he says. In fact, he adds, the sophisticated than previous
world is complex. “Most of the infor- Further Reading models, was described in a
mation is because you know a lot about landmark paper he wrote in
Deng, J., Dong, W., Socher, R., Li, L.-J., 1986 with Geoffrey Hinton and
the world,” he says. Li, K., and Fei-Fei, L. Ronald Williams for Nature,
The fact that much of the semantic ImageNet: A large-scale hierarchical image and led to new, more powerful
content of a photo is actually supplied database, IEEE Conference on Computer systems for visual object
Vision and Pattern Recognition, Miami, FL, recognition and handwritten
by the human viewing it leads research- June 20–25, 2009. character classification.
ers to try to derive clues about the con- Rumelhart was also well
Crandall, D., Backstrom, L., Huttenlocher, D.,
tent from what humans do with the known for his textbook,
and Kleinberg, J.
pictures. Kleinberg makes the analogy Parallel Distributed
Mapping the world’s photos, Proceedings
Processing: Explorations in the
with Web search, which not only looks of the 18th International World Wide Web Microstructure of Cognition,
at the textual content of Web pages, but Conference, Madrid, Spain, April 20–24, 2009. written with Jay McClelland,
also their structure, such as how they Hays, J. and Efros, A.A. says Hinton, the Raymond
are organized and what hyperlinks they IM2GPS: estimating geographic information Reiter Distinguished Professor
from a single image, Proceedings of the of Artificial Intelligence in the
contain. Kleinberg uses the geotagging computer science department
IEEE Conference on Computer Vision and
of photos to learn what they’re about, at the University of Toronto.
Pattern Recognition, Anchorage, AK, June
with the tags supplied either by Flickr Parallel Distributed Processing
23–28, 2008.
described the authors’
users clicking on the Web site’s map
Torralba, A., Fergus, R., and Freeman, W.T. computer simulations of
or by GPS-based tags automatically cre- 80 million tiny images: a large dataset for perception, and provided the
ated by a user’s camera. It turns out that non-parametric object and scene recognition, first testable models of neural
sorting location tags on a 60-mile scale IEEE Transactions on Pattern Analysis and processing. It is regarded as
Machine Intelligence 30, 11, Nov. 2008. a central text in the field of
identifies population centers, and on a cognitive science.
100-meter scale identifies landmarks— Vasconcelos, N. The Robert J. Glushko and
the things people like to take pictures of. From pixels to semantic spaces: advances Pamela Samuelson Foundation
For each of those scales, Kleinberg in content-based image retrieval, IEEE honored Rumelhart in 2000
Computer 40, 7, July 2007. with the creation of the David
has the computer comb the textual de- E. Rumelhart Prize, an annual
scription looking for the words whose award given to an individual
use peaks most—not the most com- Neil Savage is a science and technology writer based in or team making a significant
Lowell, MA. David A. Patterson, University of California, contemporary contribution to
monly used words but the words that Berkeley, contributed to the development of this article. the theoretical foundations of
are used more in one particular geo- human cognition.
graphic area than any other. For in- © 2011 ACM 0001-0782/11/05 $10.00 —Bob Violino

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 15


news

Technology | doi:10.1145/1941487.1941494 Gregory Goth

I, Domestic Robot
With recent advances in laser rangefinders, faster algorithms,
and open source robotic operating systems, researchers are increasing
domestic robots’ semantic and situational awareness.

I
n dus t r i a l robots, f ixe d - lo- ed range of likely valid facial height
cat i o n and single-function helps the Bonn researchers discern
machines, have long been sta- false positive returns.
ples of advanced manufactur- Steve Cousins, CEO of Willow Ga-
ing settings. Medical robots, rage, which manufactures the open
which can help surgeons operate with platform general-purpose PR2 robot,
smaller incisions and cause less blood says further advances in perceptual ca-
loss than traditional surgical methods, pabilities may be even more likely with
are making fast inroads in metropoli- the recent debut of sensing technology
tan and suburban hospitals. Rescue ro- that enables a computer to analyze an
bots, included wheeled and snake-like area in three dimensions and then to
robots, are increasingly common, and create what the technology’s manufac-
were deployed in the search for survi- turer, PrimeSense, calls a synchronized
vors in the aftermath of the earthquake depth image. The technology sells for
and tsunami that recently struck Ja- less than 1/20th of the de facto stan-
pan. On the other hand, the promise of dard research rangefinder, which costs
multipurpose domestic assistance ro- about $5,000. Both Cousins and Kemp
bots, capable of a wide range of tasks, believe the low cost of the PrimeSense
has been a distant goal. sensor (it is a key component of Micro-
However, recent advances in hard- soft’s Kinect gaming system) may lead
ware such as laser rangefinders, open to a surge in situational and semantic
source robotic operating systems, and Willow Garage’s PR2, an open source robotic research. Kemp says his team
faster algorithms have emboldened re- robotics research and development platform. recently installed one of the new sen-
searchers. Robots are now capable of sors to its PR2.
folding laundry, discerning where to semantic tags on common objects In essence, Kemp says its real-time
place an object on cluttered surfaces, such as light switches, and by combin- technology greatly simplifies a robot’s
and detecting the presence of people ing sensor data taken from both two- data-gathering process.
in a typical room setting. dimensional camera data and three- Prior to installing the new sensor,
“It’s easy for me to be optimistic, dimensional point clouds gathered by on projects such as the work on mak-
but if robots aren’t actually being use- laser rangefinders. ing the robot discern clutter, he says
ful and fairly widespread in 10 years, University of Bonn researchers Jörg “we had to tilt the laser rangefinder
then I will be fairly disappointed,” says Stückler and Sven Behnke also dem- up and down, then snap a picture and
Charles Kemp, assistant professor of onstrated success, using a combina- relate those two things. That’s a pretty
biomedical engineering at Georgia tion of 2D laser and camera sensors. slow process and really expensive.”
Tech University. They programmed a mobile service
robot to combine laser rangefinder A Semantic Database
Sensors Enable Awareness data that hypothesizes the presence of Kemp says there are two distinct re-
In recent months, numerous research a person’s legs and torso with 2D fron- search areas for similar problem sets
teams have published papers detail- tal and profile images of the detected in domestic robotics: those related to
ing advances in robots’ perceptual ca- face. perceptual problem sets, and those
pabilities. These perceptual advances Stückler and Behnke also mod- related to mechanical awareness. For
PhotoGra ph court esy of Willow Ga rage

enable the robots’ mechanical compo- eled the semantic probability of de- example, a roving robot meant to help
nents to complete domestic tasks hith- tecting a person’s presence in dif- a person with basic housekeeping
erto impossible. ferent locations of a room—high chores must not only know how to dif-
Kemp and his research team have probability in a chair and low prob- ferentiate a refrigerator door handle
pioneered semantic and situational ability on a bookshelf, for instance— from a light switch, but it must also be
awareness in robots through several and supplied the robot with that able to calculate which approach its
methods, including the creation of knowledge. The prior knowledge of arms must take, and how firmly it must
radio frequency identification (RFID) the room semantics and precalculat- grip the respective levers.

16 commun ications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


news

In the experiment using RFID tags, lizing a new approach: rather than rely process and bring the price down. A
Kemp created a semantic database heavily upon onboard perceptual data, single app won’t be enough.”
the robot could refer to after identify- Abbeel has performed parallel compu- Cousins says the combination of
ing an object. The database contains tations on the Amazon cloud on mesh falling hardware prices for devices
instructions on how the robot should models. Those models, he says, are such as the PrimeSense sensor, and
act upon an object. For example, under “triangles essentially put together like the blooming ROS ecosystem might be
“actions,” after a robot identifies and people using computer graphics or analogous to the personal computer
contacts a light switch, the commands physics-based simulations. Once you research of the early 1970s, specifically
are “off: push bottom” and “on: push have that mesh model, you can do a comparing the PR2 to the iconic Xerox
top.” Each of these actions is further simulation of how this article of cloth- Alto desktop computer. List price on
sub-programmed with a force thresh- ing would behave depending on where the PR2 is $400,000.
old the robot should not exceed. you pick it up.” “Right now the PR2 is the platform
Kemp is also investigating another The new approach, he says, relies to work on if you want to do mobile
approach to providing robots with on observations that the bottommost manipulation research,” Cousins says.
such situational awareness that entails point of any hanging article is usually “It’s a little expensive, but in today’s
equipping human subjects with touch a corner. Two consecutive grasps of a dollars it’s about the same as the Alto.
sensors. The sensors are held during towel, he says, will be highly likely to It’s not going to be the robot you put
the completion of common tasks such yield two diagonally opposed corners. into your grandmother’s home, but the
as opening refrigerators and cabinet For t-shirts, he says, likely consecutive software we develop on the PR2 will
doors in multiple settings. The infor- grasps will be at the end of two sleeves likely be a key component of the mar-
mation on the kinematics and forces of for a long-sleeved shirt or the end of ket. I think ROS is going to be driving
such actions is then entered into a da- one sleeve and diagonally across at the those future personal robots.”
tabase a service robot can access when hip for a short-sleeved shirt.
it approaches one of these objects en “There are a few of these configura-
route to performing a task. tions you are very likely to end up in, Further Reading
“If the robot knows it is a refrigera- then all you need to do perception-wise Stückler, J. and Behnke, S.
tor, it doesn’t have to have worked with is to differentiate between these very Improving people awareness of service
that specific refrigerator before,” he few possibilities,” Abbeel says. robots by semantic scene knowledge,
says. “If the semantic class is ‘refrigera- Proceedings of RoboCup International
Symposium, Singapore, June 25, 2010.
tor’ it can know what to expect and be ROS is Boss
more intelligent about its manipula- Another hallmark advance of the do- Maitin-Shepard, J., Cusumano-Towner, M.,
Lei, J., and Abbeel, P.
tion. This can make it more robust and mestic robot community is the growth Cloth grasp point detection based on
introduces this notion of physically of an open-source ecosystem, built multiple-view geometric cues with
grounded common sense about things around the BSD-licensed Robot Operat- application to robot towel folding, 2010
like how hard you should pull when ing System (ROS), largely maintained by IEEE International Conference on Robotics
opening a door.” Willow Garage and Stanford University. and Automation, Anchorage, AK, May 3–8,
2010.
Offboard computation akin to the “Our goal has basically been to set
kinematic database is also being done the foundation for a new industry to Schuster, M.J., Okerman, J., Nguyen, H.,
Rehg, J.M., and Kemp, C.C.
to improve already successful robotic start,” Cousins says. “We want two
Perceiving clutter and surfaces for object
tasks. A team of researchers led by Pi- people to be able to get together in a placement in indoor environments, 2010
eter Abbeel, an assistant professor of garage and get a robotics business off IEEE-RAS International Conference on
computer science at the University of the ground really quickly. If you have Humanoid Robots, Nashville, TN, Dec. 6–8,
California, Berkeley, programmed a to build software as well as hardware 2010.
general-purpose Willow Garage PR2 ro- from scratch, it’s nearly impossible to Yamazaki, A., Yamazaki, K., Burdelski, M.,
bot to fold towels randomly laid down do that.” Kuno, Y., and Fukushima, M.
Coordination of verbal and non-verbal
on a tabletop by using a dense optical Abbeel says the ROS ecosystem may
actions in human–robot interaction at
flow algorithm and high-resolution go a long way to taking the robots out museums and exhibitions, Journal of
stereo perception of the towels’ edges of the lab and into real-world locations. Pragmatics 42, 9, Sept. 2010.
and likely corners. Abbeel’s experiment “In order for these robots to make Attamimi, M., Mizutani, A., Nakamura, T.,
yielded a perfect 50-out-of-50-attempt their way into houses and become Sugiura, K., Nagai, T., Iwahashi, N.,
success rate; the robot was able to recal- commercially viable, there will need Okada, H., and Omori, T.
culate failures in the 22 instances that to be some sort of bootstrapping,” Ab- Learning novel objects using out-of-
vocabulary word segmentation and object
were not initially successful by dropping beel says. “It will be very important
extraction for home assistant robots, 2010
the towel, regrasping a corner, and car- for people to do some applications ex- IEEE International Conference on Robotics
rying on until the task was completed. tremely well, and there has to be more and Automation, Anchorage, AK, May 3–8,
Abbeel says his team has been able than one. So I hope what may be hap- 2010.
to greatly reduce the amount of time pening, with robots in different places,
necessary to fold each towel in subse- is that different schools will develop a Gregory Goth is an Oakville, CT-based writer who
specializes in science and technology.
quent experiments, from 25 minutes true sensibility for the robot, and these
to approximately four minutes, by uti- things could potentially bootstrap the © 2011 ACM 0001-0782/11/05 $10.00

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 17


news

Society | doi:10.1145/1941487.1941495 Leah Hoffmann

Data Optimization in
Developing Nations
Artificial intelligence and machine learning could expand
access to health care, improve the quality of education, and respond
effectively to natural disasters in the developing world.

B
y now, many scientists and
CEOs have begun to seize the
opportunities that lie within
the exabytes of data being
generated each day. Banks
trawl data to detect criminal fraud,
marketers to spot emerging trends, re-
searchers to uncover new patterns, and
governments to reduce crime and pro-
vide better services.
Most data analyses thus far have
focused on developed societies. Yet, a
growing community of computer sci-
entists is calling for new applications
that would harness these data-analysis
methods to improve the lives of people
in developing nations. Machine learn-
ing and artificial intelligence, they say,
are perfectly poised to promote socio-
economic development, respond more
effectively to natural disasters, expand
access to health care, and improve the Nathan Eagle (above), Eric Horvitz, and others are creating an Artificial Intelligence for
quality of education. Now, thanks to the Development community to address problems in economically developing countries.
efforts of Eric Horvitz, a distinguished
scientist at Microsoft Research, and Na- Development (SIGDEV), which held economic indicators like income and
than Eagle, a researcher who lives in Ke- its first conference at the University of education? As it turns out, they did:
nya and holds faculty appointments at London in December. What Horvitz, Regions with a higher volume of geo-
the Massachusetts Institute of Technol- Eagle, and others aim to do is foster the graphically diverse calls scored lower
ogy (MIT) Media Lab and Northeastern creation of a subfield within ICT-D to on the Index of Multiple Deprivation, a
University, a small but diverse group of address these deficiencies. The name statistical study that covers factors like
computer scientists is banding togeth- they’ve proposed for it: Artificial Intel- employment, crime, and health care.
er to share ideas and information, and ligence for Development, or AI-D. Horvitz was intrigued. “I’m passion-
to define itself as a community. It began two years ago at a Princeton ate about machine intelligence and its
Interest about the developing world University conference called Study- applications,” he explains. “And I real-
has been growing in the field of Infor- ing Society in a Digital World, which ized there’s a lot we can do to stimulate
mation and Communication Technol- was organized by Edward W. Felton, thought.” Horvitz was president for the
ogy for Development (ICT-D), which director of the university’s Center for Association for the Advancement of Ar-
encompasses projects that range from Information Technology Policy. Eagle tificial Intelligence (AAAI); with Eagle’s
managing the delivery of basic services presented a paper about using large help, he set up an AAAI symposium
like health care and education to devel- data sets—in this case, phone calls in titled Artificial Intelligence for Devel-
oping network infrastructure, but ICT- Britain—to test American sociologist opment at Stanford University, which
Photogra ph by J ef f K ubina

D has rarely focused on opportunities Mark Granovetter’s “The Strength of took place last March.
to apply artificial intelligence or mine Weak Ties” theory, which argues that “Our idea was that we have so
data from developing nations. Last innovation often travels most effec- much data, and the majority of it is
year, ICT-D experts set out to rectify tively via weak social connections. Did being generated by people in the de-
that situation with the formation of the factors like the geographical distance veloped world,” says Eagle. “There’s
ACM Special Interest Group on Global between callers correlate with socio- a real opportunity for us to repurpose

18 communications of th e ac m | m ay 2 0 1 1 | vo l . 5 4 | n o. 5
news

a real opportunity for us to repur- cratic Republic of the Congo from three that customizing each student’s experi-
pose that data and serve these under- years of mobile phone data in neigh- ence could increase her or his engage-
served communities.” boring Rwanda. “By watching anoma- ment by reducing the likelihood that a
The diverse set of projects pre- lous call behavior, we could infer the single student dominated the game.
sented at the Artificial Intelligence epicenter of the earthquake,” Horvitz
for Development symposium under- explains. The researchers could then Constraints, Costs, Challenges
scored his point. Much of the research make inferences about which areas in While AI-D research methods may be
was preliminary, but the initial re- the Lac Kivu region were likely to have the same as they are in mainstream
sults were promising. Shawndra Hill, suffered the greatest damage and be Western science, other factors in de-
an assistant professor in Operations of higher priority for emergency assis- veloping nations are quite different.
and Information Management at the tance workers. Eagle has used the same First and foremost are the technol-
Wharton School of the University of data to better understand the dynam- ogy constraints. Access to electricity,
Pennsylvania, who has also taught at ics of urban slums and model the ef- computers, and the Internet is limit-
Addis Ababa University (AAU), spoke fects of social networks on infectious ed in many areas. Language presents
of efforts to improve Ethiopia’s road disease outbreaks. And University of another barrier, as does cost. “The
safety. Ethiopia has the world’s high- California, Berkeley postdoctoral re- design considerations are much dif-
est rate of traffic fatalities, according search fellow Emma Brunskill spoke of ferent,” says Lakshmi Subramanian,
to the World Health Organization, using traveling salesman techniques to an assistant professor at the Courant
with a reported 114 deaths per 10,000 help community health workers in the Institute of Mathematical Sciences
vehicles per year. By comparison, the developing world—some of whom can at New York University. Subrama-
U.K. has one death per 10,000 vehicles be responsible for up to 4,000 people— nian’s research includes the use of
per year. improve the efficiency and timing of document classification and focused
“The Ethiopian Traffic Enforce- their visits to patients in rural areas. crawling methods to build offline
ment Agency collects data on every ac- The data analysis was exploratory, but educational portals, and computer
cident that’s reported,” Hill explains. Brunskill says she is encouraged by vision techniques to detect diabetic
“Where did the accident happen, what the potential of existing techniques. retinopathy, the world’s leading cause
did the intersection look like, what’s Another area she finds promising is of adult blindness. Yet, according to
the road quality, was it raining, and so education. Schools in developing na- Subramanian, constraints are what
on.” Working with AAU lecturer Tibebe tions often rely on a single computer make the problems interesting. “If
Beshah, Hill investigated the role of per classroom. In experimental trials in you can only use SMS, what can you
road-related factors in accident sever- Bangalore, India, Brunskill and a team do? Turns out, you can do a lot, thanks
ity. The researchers tested classifica- of researchers built on foundational to semantic compression and other
tion models to predict the severity of studies in multi-input interfaces to test tools,” he says. “In fact, we’ve built an
more than 18,000 car accidents and the efficacy of an adaptive multi-user SMS search engine in Kenya.”
used a projective adaptive resonance learning game. Initial trials suggested Gaining access to useful data can
theory algorithm to identify the data’s also be a challenge. “There’s no cul-
significant patterns. One research ture of data like there is in the West,”
finding: Severe physical injuries were “Our idea was says Hill. “Even businesses in Ethiopia
more likely to occur on straight, flat aren’t collecting data like we are.” As a
roads than on all other types of roads that we have so result, one of Horvitz and Eagle’s pri-
in the same area. much data, and the orities is to create a central data reposi-
“The methods don’t change,” says tory to support new research projects.
Hill. “You could do the same analysis majority of it is being They began by compiling a list of useful
with data from the United States.” In generated by people resources at the AI-D symposium Web
a country that has the highest rate of site, http://www.ai-d.org, from orga-
traffic fatalities in the world, howev- in the developed nizations like the World Bank, World
er—and those accidents being among world,” says Nathan Trade Organization, and UNICEF. They
the nation’s leading causes of death— are also working with regional organi-
the potential socioeconomic impact is Eagle. “There’s a zations, such as telephone companies,
huge. In the future, Hill and her fellow real opportunity to share additional data.
researchers hope to develop new pre- “We’re trying to set up a Switzerland
dictive models that combine road data for us to repurpose for data sets,” says Horvitz.
with driver information, and develop a that data and serve Beyond that, Horvitz and Eagle
decision support tool for the Ethiopian hope to get more computer scientists
Traffic Office. these underserved involved. Not surprisingly, in such a
At the Artificial Intelligence for De- communities.” young field, there are differences of
velopment symposium, Eagle and Hor- opinion about research, strategies,
vitz presented research in which they and direction. “There is a tension in-
deduced the impact of seismic activ- herent in this area, as in the broader
ity in the Lac Kivu region of the Demo- computing for development com-

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 19


news

searchers in the community are none-


theless convinced there are possibili- Further Reading
ties for serious long-term science. “I believe computer Beshah, T. and Hill, S.
“For example, I believe computer scientists can lead Mining road traffic accident data to improve
safety: role of road-related factors on
scientists can lead the way in combin-
ing data- and model-centric methods to the way in combining accident severity in Ethiopia, Proc. AAAI
design proactive plans that can mitigate data- and model- Artificial Intelligence for Development,
Stanford, CA, Mar. 22–24, 2010.
the spread of diseases or the shortages
of food and water following a disaster,” centric methods Brunskill, E. and Lesh, N.
Routing for rural health: optimizing
Horvitz explains. “The idea is to use to design proactive community health worker visit schedules,
computational models and data from
similar situations to make inferences plans that can Proc. AAAI Artificial Intelligence for
Development, Stanford, CA, Mar. 22–24, 2010.
about actions that promise to have a mitigate the spread Eagle, N. and Horvitz, E.
high expected value. Partial plans might Artificial intelligence for development
be generated proactively with the goals of diseases or (AI-D), Proc. the CCC Workshop on
of maximizing the survival of people the shortages Computer Science and Global Development,
Berkeley, CA, Aug. 1–2, 2009.
who have been injured or are trapped.
The details of such ‘contingency plans’ of food and water Kapoor, A, Eagle, N. and Horvitz, E.
People, quakes, and communications:
for transporting medications, food, and following a disaster,” inferences from call dynamics about
water could be instantiated in real time
based on sensor data.” says Horvitz. a seismic event and its influences on
a population, Proc. AAAI Artificial
In the meantime, the field’s lack of Intelligence for Development, Stanford,
definition suits many scientists just CA, March 22–24, 2010.
fine. “Fundamental research in this Silberman, N., Ahrlich, K.,
domain is about understanding the Fergus, R., and Subramanian, L.
Case for Automated Detection of
ground realities,” says Subramanian, Diabetic Retinopathy, Proc. AAAI Artificial
who points out that in “the 1970s, you seeking a ‘noble profession’ like med- Intelligence for Development, Stanford,
didn’t have specialties like architec- icine or law, where they can directly CA, March 22–24, 2010.
ture or networking. You were trying help people,” says Eric Horvitz. “This
to get things done.” area of research highlights how com- Leah Hoffmann is a technology writer based in Brooklyn,
NY.
“It’s been said that computer sci- puter scientists can touch the lives of
ence has failed to attract young people people in need.” © 2011 ACM 0001-0782/11/05 $10.00

Cybersecurity

Microsoft Dismantles Rustock Botnet


Microsoft has shut down what a shutdown of the botnet in March, providers in the U.S. longer a bunch of guys deciding
spokesperson for the company’s email-monitoring agencies Microsoft worked on the they don’t like a botnet and
Digital Crimes Unit described reported a significant downturn Rustock initiative with several taking technical measures to
as a notorious botnet that was in junk email. As one example organizations, including the shut it down,” Ullrich says.
sending some 30 billion junk of the message volume Rustock Dutch High Tech Crime Unit, Still, it remains to be seen
email messages each day. Botnets was capable of achieving, a single to dismantle command servers whether this two-pronged
typically consist of thousands Rustock computer that Microsoft outside the U.S. and China’s approach, consisting of legal
of compromised computers researchers monitored leading Computer Emergency Response and technical components,
remotely controlled for the up to the botnet shutdown was Team to block the registration of will be more viable in the
purpose of executing denial- reportedly sending email at the domains that Rustock-infected future than purely technical
of-service attacks, spreading rate of 10,000 pieces per hour. computers could have contacted countermeasures. In assessing
malware, or participating in The shutdown strategy for future directives. Microsoft’s the long-term impact of such
other nefarious activities. In the involved a two-pronged Digital Crimes Unit is now efforts, Ullrich likens botnets to
case of Rustock, which reportedly approach: A legal initiative working with Internet service home burglaries, which technical
consisted of hundreds of to seize the botnet’s control providers to identify and cleanse means, such as locks, and legal
thousands of infected computers servers and a technical initiative the computers infected with the repercussions, such as jail time,
controlled by several command to block the infected client Rustock malware. make manageable but don’t
servers, the main activity was to computers from establishing “It is impressive that eliminate altogether. Ullrich
send junk email. connections to new command Microsoft managed to get this says a similar approach may
Rustock’s anonymous servers. After an investigation by operation working so smoothly,” help mitigate the botnet threat,
operators used the botnet to Microsoft’s Digital Crimes Unit says Johannes Ullrich, chief making it manageable.
hawk low-cost pharmaceuticals, and successful legal pleadings, research officer at the SANS “Look at it like home
urge recipients to participate Microsoft’s Operation b107 Institute. According to Ullrich, burglaries,” he says. “Don’t ask
in fake lotteries, and otherwise resulted in the simultaneous the initiative’s legal aspect shows for absolute security but for
clutter inboxes with unsolicited seizure by the U.S. Marshals maturity about the process of reasonable security.”
missives. Following the Service of servers at five hosting shutting down a botnet. “It’s no —Kirk L. Kroeker

20 communications of th e ac m | m ay 2 0 1 1 | vo l . 5 4 | n o. 5
AdvAnCe Your CAreer wiTh ACM TeCh PACkS…

For Serious
Computing Professionals.

Searching through technology books, magazines, and websites


to find the authoritative information you need takes time.
That’s why ACM created “Tech Packs."
• Compiled by subject matter experts to help serious Current topics include Cloud Computing and
computing practitioners, managers, academics, and Parallel Computing. In development are
students understand today’s vital computing topics. Gaming, Globalization/Localization, Mobility, Security,
and Software as a Service (SaaS).
• Comprehensive annotated bibliographies: from ACM
Digital Library articles, conference proceedings, and
Suggestions for future Tech Packs? Contact:
videos to ACM Learning Center Online Books and Courses
to non-ACM books, tutorials, websites, and blogs. Yan Timanovsky
ACM Education Manager
• Peer-reviewed for relevance and usability by computing timanovsky@hq.acm.org
professionals, and updated periodically to ensure currency.

Access to ACM resources in Tech Packs is available


to ACM members at http://techpack.acm.org
or http://learning.acm.org.
news

Philosophy | doi:10.1145/1941487.1941496 Marina Krakovsky

Deus Ex Machina
Computational metaphysics is helping philosophers
answer age-old questions, such as whether God exists.

A
fa m o us ly tr icky argu-
ment for the existence of
God proposed by the Brit-
ish theologian Anselm in
the 11th century recently
got simpler with help from an automat-
ed reasoning engine. In a forthcom-
ing paper in the Australasian Journal
of Philosophy, Stanford philosophers
Paul Oppenheimer and Edward Zalta
discuss how they used a program called
Prover9 to not only validate Anselm’s
ontological argument from its admit-
tedly dubious premises, but also greatly
reduced the number of premises neces-
sary to reach that conclusion.
This result is one of the more in-
teresting discoveries in the new field
of computational metaphysics, which
uses computers to reason through
problems in metaphysics. “Lots of
fields are using computers to explore
outstanding questions, and that’s true
in philosophy no less than in other can work from (and then interpreting tight. “In philosophy you’re not always
fields,” says Zalta, a senior research the program’s output). But accom- sure that’s true,” says Fitelson, noting
scholar at Stanford University’s Center plishing that is a nontrivial process, that metaphysics can be difficult to rea-
for the Study of Language. says Fitelson. Since statements in son about with the kind of intuition one
Philosophers have used computers metaphysics use second-order logic, might apply to, say, geometry.
before Oppenheimer and Zalta did, for which there is no guarantee of a Zalta had no doubt when Anselm’s
but its application is remarkable in proof for valid claims, “you’re outside premises were fed into Prover9 that it
metaphysics, a branch of philosophy the realm of being able to do things would find a valid proof. “However,
dealing with the ultimate nature of re- mechanically at all,” Fitelson explains. when we looked at the actual proof the
ality. Lofty questions about existence, To get around this problem of undecid- machine spit out, we saw that it didn’t
causation, and identity might seem ability, metaphysicians who want the use all three premises!” Prover9 had
too abstruse for automated reasoning; aid of computers must first translate found a way to derive Anselm’s conclu-
however, when formulated with math- higher-order claims into the first-order sion using just one premise.
ematical precision, metaphysical prop- claims of classical logic. But that usu- Whether Anselm’s argument is sound,
ositions become ideal candidates for ally leads to complicated sets of formu- as opposed to merely valid, depends on
computer-assisted proofs in much the las that are hard for humans to work whether that premise itself is true—a
same way that mathematical theorems with. What’s more, philosophers must question that philosophers will con-
are, says Rutgers University philoso- represent those formulas in the syntax tinue to debate. Nonetheless, having
pher Branden Fitelson, who’s used au- of their automated reasoning system. one premise gives would-be refuters a
tomated reasoning in his specialties, From there, by using tree search al- much clearer target. And, says Zalta, as
logic and the philosophy of science. gorithms, the software can reliably find philosophers develop more results us-
When software is doing the philoso- a proof or show a counterexample. And ing automated reasoning, the tools’ use
Illust ratio n by gwen vanh ee

pher’s work of axiomatic reasoning— there’s no beating the rigor that com- should become more widespread.
stepping logically from the premises puters provide to philosophers, finding
to the desired conclusion—much of logical holes that might not otherwise Based in San Francisco, Marina Krakovsky is the
co-author of Secrets of the Moneylab: How Behavioral
what’s left for the philosopher is the be apparent. Because a computer stops Economics Can Improve Your Business.
task of translating the airy language once it hits a gap in the logic, for it to val-
of philosophy into a form the software idate a proof the argument has to be air- © 2011 ACM 0001-0782/11/05 $10.00

22 communicat ions of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


news

Emerging Fields | doi:10.1145/1941487.1941497 Alex Wright

Web Science Meets


Network Science
A pair of divergent scientific communities discusses their similarities
and differences, and search for common ground.

E
ve r si n ce World Wide Web science at the University of Southamp-
inventor Sir Tim Berners- ton, who is one of the cofounders of the
Lee announced the Web Sci- Web Science Research Initiative and
ence Research Initiative in now the managing director of its suc-
2006, researchers have been cessor, the Web Science Trust.
trying to map the boundaries of Web Like so many good ideas, the idea for
science, which spans a dizzying range the workshop originated over drinks at
of disciplines including computer sci- a hotel bar. Hall remembers having a
ence, economics, government, law, lively conversation with network theo-
and psychology. rist Manuel Castells during a meeting
Complicating matters further has of the European Research Council.
been the parallel evolution of a mark- “We realized that we were coming at
edly similar-sounding field: Network the same thing from different angles,”
science, whose devotees explore the Hall says. Soon afterward, Castells in-
characteristics of all types of networks, troduced Hall to Contractor, initiating
from neural networks to social net- a series of conversations that led to the
works to, yes, the Web. Northwestern workshop.
Where do these two emerging fields The workshop organizers hoped to
overlap? Where do they diverge? These frame a new research agenda by leverag-
are some of the questions a group of ing the commonalities and distinctive
scholars broached in the Third Inter- Collaboration network map of the participants
contributions of Web science and net-
national Workshop on Network Theo- of the Northwestern University workshop. work science, and to formulate ques-
ry, hosted last March at Northwestern tions of interest to both communities.
University. Contractor, “but aspirationally, they The two-day conference covered a
“In one sense, Web science is a are not different.” wide range of broadly related topics
subset of network science. In another Given their overlapping areas of in- such as debating the merits of network
sense, network science is a subset of terest, it might seem surprising that science’s “pure” scientific approach vs.
Web science,” says workshop co-chair many of the leading researchers in the more applied, engineering-oriented
Noshir Contractor, a professor of be- each field remained largely unaware tactics of Web science; analyzing the ef-
havioral sciences at Northwestern. of the others’ work before they met fects of scale on network behaviors; ex-
Proponents of the former view ar- for the first time at the Northwestern ploring questions of causality, correla-
Visua liz aton Created by Yun H ua ng, © SON IC at N orthwest ern Univ ersit y 2 011

gue that the Web is just one network workshop. tion, and inference; and discussing the
among many that share certain com- “This was a coming together of two possibility of a Web index, an idea cur-
mon properties; for example, they are different communities,” says Dame rently being promoted by Berners-Lee.
open, scale-free, and exhibit emergent Wendy Hall, a professor of computer Looking ahead, plenty of room ex-
properties like power laws. Proponents ists for continuing dialogue between
of the latter view tend to argue that the the two camps, who will almost cer-
Web is fundamentally different from Where do these two tainly continue to probe each other’s
other networks in that it encompasses boundaries while searching for com-
a broad range of human concerns that emerging fields mon ground.
have little to do with a macro under- overlap? Where do “Is Web science a subset of net-
standing of networks, such as issues work science or is it the same thing?”
of government policy, commerce, and they diverge? asks Hall. “The answer is, It doesn’t
human factors. matter.”
“In practice, Web science is fo-
cused on how we could do things bet- Alex Wright is a writer and information architect based in
Brooklyn, NY.
ter, while network science is more
focused on how things work,” says © 2011 ACM 0001-0782/11/05 $10.00

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 23


ACM TechNews Goes Mobile
iPhone & iPad Apps Now Available in the iTunes Store
ACM TechNews—ACM’s popular thrice-weekly news briefing service—is now
available as an easy to use mobile apps downloadable from the Apple iTunes Store.
These new apps allow nearly 100,000 ACM members to keep current with
news, trends, and timely information impacting the global IT and Computing
communities each day.

TechNews mobile app users will enjoy:


•  Latest News: Concise summaries of the most
relevant news impacting the computing world
•  Original Sources: Links to the full-length
articles published in over 3,000 news sources
•  Archive access: Access to the complete
archive of TechNews issues dating back to
the first issue published in December 1999
•  Article Sharing: The ability to share news
with friends and colleagues via email, text
messaging, and popular social networking sites
•  Touch Screen Navigation: Find news
articles quickly and easily with a
streamlined, fingertip scroll bar
•  Search: Simple search the entire TechNews
archive by keyword, author, or title
•  Save: One-click saving of latest news or archived
summaries in a personal binder for easy access
•  Automatic Updates: By entering and saving
your ACM Web Account login information,
the apps will automatically update with
the latest issues of TechNews published
every Monday, Wednesday, and Friday

The Apps are freely available to download from the Apple iTunes Store, but users must be registered
individual members of ACM with valid Web Accounts to receive regularly updated content.
http://www.apple.com/iphone/apps-for-iphone/  http://www.apple.com/ipad/apps-for-ipad/

ACM TechNews
V
viewpoints

doi:10.1145/1941487.1941498 Avi Goldfarb and Catherine E. Tucker

Economic and
Business Dimensions
Online Advertising, Behavioral
Targeting, and Privacy
Studying how privacy regulation might impact
economic activity on the advertising-supported Internet.

D
ata o n t h e online behavior
of consumers has allowed
companies to deliver online
advertising in an extraor-
dinarily precise fashion.
For example, a Lexus dealership can
target advertising so that its ads are
shown only to people who have been
recently browsing high-end cars on
auto Web sites. Such behavioral tar-
geting has obvious benefits to adver-
tisers because fewer ad impressions
are wasted. Instead, advertisers focus
their resources on the consumers
most likely to be influenced by the ads.
For consumers, however, ads that are
behaviorally targeted can appear un-
authorized and even creepy. As a result
there have been calls in the U.S. and
elsewhere for new regulation to re-
strict the collection and use of online
Illust ratio n by gluekit

data for advertising purposes.


Unfortunately, there has been little
empirical evidence about the conse-
quences of such regulation for the fu-
ture of advertisers and Web publishers

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 25


viewpoints

on the advertising-supported Internet. effectiveness of different ads. In this


In a recent research paper2 we begin to “a/b” test, some randomly selected peo-
fill this gap by examining how earlier Online advertising ple are exposed to the ad for a certain
privacy regulation in Europe affected became much less product, while others were exposed to
the performance of online display ad- a placebo ad, usually for a charity. The
vertising in Europe relative to the U.S. effective in Europe market research firm then surveyed
and elsewhere. In this column we sum- relative to elsewhere these Web users about their likelihood
marize the key findings and discuss of purchasing the advertised product.
how our results inform recent propos- after the regulation This allows a clean measurement of
als for privacy regulation in the U.S. was enacted. the effect of the ad: Because these peo-
ple are randomly selected, any increase
Background in expressed purchase intent toward
Advertisers spend $8 billion each year the product for the group exposed to
on online display advertising and even the ad relative to those who were not
more on search engine advertising. exposed can be attributed to advertis-
At the heart of this industry is the de- Directive (2002/58/EC—sometimes ing. We use data on 3.3 million of these
tailed collection, parsing, and analysis known as the E-Privacy Directive) on survey responses for 9,596 different
of consumer data, often without con- online advertising in Europe. Specifi- online display advertising campaigns
sumers’ consent or knowledge. This cally, we looked at how consumer re- conducted on hundreds of different
data allows firms to target their adver- sponses to advertising changed in Eu- Web sites across many countries.
tising to specific groups who might be rope after it came into effect, relative Our research links changes in pri-
most influenced by advertising, and to to changes in consumer responses to vacy protection in Europe to changes in
measure how well the advertising then advertising in the U.S. and elsewhere. the advertising-induced lift in purchase
performs as they track the subsequent Several provisions of the Privacy Di- intentions. Specifically, we use regres-
behavior of users who were exposed to rective limited the ability of companies sion analysis to compare and contrast:
an ad. There are growing concerns that to track user behavior on the Internet. ˲˲ People who were randomly ex-
such unregulated data collection may These changes made it more difficult posed to the ad and those who were not;
harm consumers. Specifically, the re- for the Lexus dealership in our earlier ˲˲ The EU and elsewhere; and
cent Federal Trade Commission (FTC) example to collect and use data about ˲˲ Before and after privacy regulation
preliminary staff report, “Protecting consumers’ browsing behavior on oth- was enacted in Europe.
Consumer Privacy in an Era of Rapid er Web sites.
Change,” (see http://www.ftc.gov/ The interpretation of this E-Privacy Our Results
os/2010/12/101201privacyreport.pdf) Directive has been somewhat contro- We found that in Europe, after privacy
identifies three groups of consumers versial as it relates to behavioral target- protection was enacted, the difference
who might be harmed in the current ing. For example, it is not clear the ex- in stated purchase intent between
environment: tent to which a provision that requires those who were exposed to ads and
˲˲ Consumers troubled by the collec- companies who use invisible tracking those who were not dropped by ap-
tion and sharing of their information. devices such as Web bugs to use them proximately 65%. There was no such
˲˲ Consumers who have no idea that only with the “knowledge” of consum- change for countries outside Europe.
any of this information collection and ers means that companies need explic- In other words, online advertising be-
sharing is taking place. itly to obtain opt-in consent. This is came much less effective in Europe
˲˲ Consumers—some teens for ex- one of the reasons why, in the recent relative to elsewhere after the regula-
ample—who may be aware of the shar- “Telecoms Reform Package,” the EU tion was enacted.
ing that takes place, but may not appre- amended the current regulation to re- One possible explanation for this
ciate the risks it poses. quire a user’s explicit consent before result is that our estimates reflect a
The FTC document then argues that placing a cookie on a computer. There- change in attitudes among Europeans
there might be benefits to increased fore our estimates also capture busi- toward targeted advertising, rather
regulation. At the same time, the docu- ness responses when there is some than something that can be causally
ment makes it clear that another ob- ambiguity over how privacy regulation attributed to the change in law. To
jective of any policy is “preserving the should be interpreted. examine this possibility, we looked at
ability of companies to innovate, com- To measure online advertising ef- the behavior of Europeans on non-Eu-
pete, and offer consumer benefits.” fectiveness, we use unusual data from ropean Web sites and of non-Europe-
Given this objective, it is important a marketing research company that ans on European Web sites. We found
to understand how privacy regulation ran various “a/b” tests of online display no drop in ad effectiveness for Europe-
might impact economic activity on the ads across the world over eight years. ans browsing non-European Web sites
advertising-supported Internet. The research company developed a and a substantial drop in advertis-
straightforward methodology that per- ing effectiveness for non-Europeans
Our Study mitted comparison of different adver- browsing European Web sites. The
We examined the effect of the EU Pri- tising campaigns over time in order drop does not appear to be a result of
vacy and Electronic Communications to allow advertisers to benchmark the changing consumer attitudes in Eu-

26 communications of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


viewpoints

rope. Instead, it suggests that, coinci- may be unusual in dimensions we do


dent with the timing of the enactment not observe. Therefore, a conservative
of European privacy regulation, adver- interpretation of our results is that we Any decline
tising at Web sites in Europe became measure a decline in a measurement in advertising
less effective. of advertising effectiveness commonly
This drop in ad effectiveness was used by the online advertising industry. effectiveness that
not uniform across all types of Web ˲˲ The campaigns we study are rep-
results from the new
sites and advertisements. In fact, many resentative of those launched by large
Web sites and ad formats were barely firms who had substantial resources. regulation will not
affected. We did not see any significant We do not know how privacy regula- be borne equally
decline in ad effectiveness on Web tion affected smaller firms. On the one
sites that had specialized content, such hand, the costs of compliance may by all Web sites.
as baby and automotive Web sites. It have been higher for such firms. On the
was Web sites that did not have con- other hand, small firms may have been
tent that was easily matched to a spe- less careful about compliance.
cific product (Web sites like CNN.com ˲˲ The campaigns we study were
and Dictionary.com) that drove the placed directly by the advertiser on our estimates suggest that one could
measured drop in advertising effective- particular Web sites rather than being reasonably expect a large drop in ad-
ness. We believe this result is driven by distributed through an advertising net- vertising effectiveness for consumers
the difficulty of matching a customer work—a common distribution chan- who choose to opt out of targeting.
to an ad on such Web sites because the nel for online advertising. It is possible Therefore, the likely effects of the
Web site content does not reveal specif- that advertising networks were better proposed regulation depend on the
ic preferences. In contrast, it is easy to able to invest resources to mitigate the number of consumers who would ulti-
target advertising to a visitor at a Web effects of privacy regulation, and there- mately choose to persistently opt out,
site for parents of babies, even without fore experienced less of a decline. which in turn will be driven by the spe-
data on browsing behavior. ˲˲ We do not know whether the cifics of the regulatory framework.
Large, intrusive ads also showed change in advertising effectiveness Crucially, our empirical findings
little decline in effectiveness. Instead, affected advertising revenues. This suggest any decline in advertising ef-
the fall in ad effectiveness in Europe would depend on substitution patterns fectiveness that results from the new
was largely driven by plain banner ads. between online and offline media. regulation will not be borne equally
This makes sense because more dis- ˲˲ It is not clear whether our results by all Web sites. In the long run, this
creet ads rely on the inherent interest generalize to Web sites that explicitly may change the kind of Web sites and
of a customer in that kind of product, offer users control over their privacy firms that prosper on the advertising-
rather than on a striking ad design.1 settings, such as Facebook. Such pro- supported Internet, perhaps leading
prietary opt-in Web sites may even to fewer free (ad-supported) general-
Limitations benefit from regulation of this kind, if interest Web sites. Our results also
Before concluding, we clarify some of it means they are more efficient at de- suggest that advertisers may move
the limitations of this analysis: livering ads than their competitors. toward more visually arresting types
˲˲ Our measures of advertising ef- of advertising in order to compensate
fectiveness are representative only for What It Means for their inability to target. Therefore,
people who are willing to answer an Notwithstanding these limitations, the potential benefits to consumers of
online market survey. Though respon- our results provide some of the first increased privacy should be weighed
dent demographics seem representa- empirical evidence about the likely against the consumer benefits of a
tive of the general population, they consequences of privacy regulation. potentially broader advertising-sup-
This is important because of recent ported Internet that has fewer visually
developments in the U.S. concerning distracting ads.
Our results provide regulation. In their preliminary staff
report, the FTC made the following
some of the first
References
1. Goldfarb, A. and Tucker, C. Online display advertising:
proposal: The most practical method of Targeting and obtrusiveness. Marketing Science.
empirical evidence providing such universal choice would Forthcoming.
2. Goldfarb, A. and Tucker, C. Privacy regulation and
likely involve the placement of a persis-
about the likely tent setting, similar to a cookie, on the
online advertising. Management Science 57, 1 (Jan.
2011), 57–71.

consequences of consumer’s browser signaling the con-


sumer’s choices about being tracked and
privacy regulation.
Avi Goldfarb (agoldfarb@rotman.utoronto.ca) is an
associate professor of Marketing in the Rotman School of
receiving targeted ads. Commission staff Management at the University of Toronto.
supports this approach, sometimes re-
Catherine Tucker (cetucker@mit.edu) is Douglas Drane
ferred to as “Do Not Track.” Career Development Professor of Information Technology
Obviously this persistent “opt-out” and Management and an assistant professor of Marketing
at the MIT Sloan School of Management, Cambridge, MA.
is a different approach from the EU
regulation that we study. However, Copyright held by author.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 27


V
viewpoints

doi:10.1145/1941487.1941499 Brian Dorn

Education
Reaching Learners Beyond
our Hallowed Halls
Rethinking the design of computer science courses and broadening
the definition of computing education both on and off campus.

T
he vast majority of
our efforts able programs? Put simply, software
in computing education re- written by informally trained pro-
volve around formal learn- These end-user grammers has a user base, and coding
ing environments. By virtue programmers provide mistakes can cost valuable resources.
of where computing courses The educational and training needs of
and programs are offered, much of our a canonical example this significant group of learners ap-
work is centered on the undergraduate of people engaged in pear largely underserved by academic
curriculum in colleges and universi- institutions today.
ties. Recently, increased attention has informal computing
been given to computing education education. An Example in Graphic
throughout elementary and secondary and Web Design
education in efforts to broaden par- Over the course of the last five years,
ticipation in the field and address con- my colleagues and I have conducted a
cerns about the student pipeline. How- series of studies to better understand
ever, by focusing exclusively on these other than computing. Their knowl- how to support the educational needs
formal settings, we may be missing an edge of the computing fundamentals, of a group of informally trained pro-
opportunity to reach the millions of and more specifically programming, grammers. We have focused our atten-
people who find computing outside of is built largely from self-taught experi- tion on professional graphic and Web
academia’s hallowed halls and are left ences and advice from peers. designers who actively write code in
to teach themselves through informal Why should we be interested in some aspect of their job.3 With educa-
educational activities. these domains? At the very least, tional backgrounds rooted in art and
In this column, I focus on adults these informally trained individuals visual communication (and notably,
actively working in a traditionally non- account for a substantial portion of very little STEM), the participants in
computing discipline who, nonethe- the “computing pie.” Estimates for our studies represent a unique outer
less, develop scripts or programs as the U.S. suggest there will soon be bound of those who have a need for
part of their activities. These end-user more than 13 million self-described computing/programming later in life.
programmers provide a canonical ex- programmers in the workplace, com- It seems quite natural to require pro-
ample of people engaged in informal pared to fewer than three million gramming instruction for engineering
computing education. Examples in- professionally trained programmers.5 majors, but rarely are similar require-
clude accountants who write spread- The difficulties of learning to program ments considered for art students.
sheet formulas and macros, biolo- are well documented, and informal One of the most striking observa-
gists who create programs to simulate learners are left to grapple with these tions about our study participants was
models or facilitate data analysis, and challenges in an environment very dif- the variety of their educational back-
graphic designers who produce scripts ferent from what best practices in edu- grounds. Even though those we inter-
to automate repetitive and tedious cation recommend. We have the same viewed shared similar job descriptions,
tasks. Disciplinary differences aside, concerns for these programmers as they were trained in a wide variety of
a common characteristic of people we have for those who are professional academic disciplines ranging from
in these examples is that their formal software developers. For example, do graphic design (as one might expect) to
academic training is in something they create correct, robust, and reus- the humanities and the social scienc-

28 commun ic ations of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


viewpoints

es. Further, very few of these designers tails. Despite the inherent problems looking for information. However,
had ever taken a course on program- and inefficiencies in learning this way, search results related to programming
ming or scripting as part of their sec- the designers we interviewed consis- questions can be difficult to interpret.
ondary, post-secondary, or even pro- tently preferred learning from code ex- When asked to read and modify a piece
fessional development activities. An amples to more general resources like of program code, participants often
intriguing (but admittedly anecdotal) books. Of utmost importance, then, is spent significant amounts of time
observation was that our participants the instructive quality of the examples studying search results that pointed
appeared considerably more gender being used (that is, with good explana- them to irrelevant code written in other
balanced and ethnically diverse than tions) and how obviously relevant the programming languages. Sometimes a
most demographic data reported for examples are. search might lead a user to a conceptu-
computer science. ˲˲ The Web as the Primary Resource. ally correct algorithm for their problem
Obviously this diversity poses a Closely related to the role of examples but implemented in an unfamiliar lan-
number of challenges for efforts to ad- is a heavy reliance on the Internet as the guage. This dissimilarity may cause the
dress the educational needs of these first line of support. Our participants example to be discarded altogether, or
designers in the future. That aside, we perceived the Internet as a complete cause the learner difficultly in making
took away two important lessons about resource—anything they might want the necessary adaptations to the cur-
current informal learning practices: must be in there somewhere. Given the rent context. The primary issues in us-
˲˲ Example-Driven Learning. The low cost associated with searching, the ing the Web as a resource for informal
main driver for our participants to Web is an attractive first option when learning about programming can be
learn something new about program- tied to difficulties in devising appropri-
ming derives directly from the needs ate search terms and judging the rele-
of the designer’s current project. With- The educational and vance of the resulting examples.4
in that context, the designer actively One underlying cause for these
seeks out examples related to the end training needs of this difficulties could be tied to our par-
goal in a somewhat piecemeal fashion. significant group ticipants’ lack of sufficient general,
Ideally, the designer learns as he or she abstract knowledge of the computing
sees examples that make use of new of learners appear and/or programming structures at play.
programming features. Unfortunately, largely underserved When a search based on purely syntac-
this doesn’t always happen due to the tic constructs fails, an expert would
unavailability of relevant examples, by academic fall back to a more general conceptual
Illust ratio n by F ra zer Huds o n

differences between the current goal institutions today. term (such as “exception handling”).
and that of the example, and the lack of The ability to see similarities between
explanation accompanying examples. algorithms implemented in different
The explanations found rarely draw languages often requires an ability to
out the computer science ideas used, abstract away from the concrete syn-
instead favoring specific practical de- tax. A recognized problem of highly

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 29


viewpoints

context-oriented learning, like what ˲˲ We need a better understanding of


informal learners do, is that the result- the information ecologies upon which
ing knowledge can become context- We see several various end-user programmers rely, so
bound and make it difficult to trans- ways to increase that we can provide useful information
fer to or from other similar settings.2 in ways that merge with their existing
Thus, there is a great opportunity for involvement in efforts informal learning strategies.
computing educators to explore how to support the vast ˲˲ New programming environments
to foster conceptual knowledge growth should be designed that recognize the
in such communities while at the same population of adults role of Web search and example code
time recognizing existing practices fa- engaging in informal (like Blueprint1). Furthermore, they
voring example-driven learning. should be evaluated not only for wheth-
In our work, we sought to balance computing education. er they enable users to complete a
these two issues by creating collections script, but also for the degree to which
of annotated scripting examples. Each they can promote learning of comput-
example project presents a solution to ing concepts.
a realistic programming task for graph- ˲˲ We can build on the roles that
ic designers (that is, using the same several ways to increase involvement Web-based forums, online communi-
tools and language). For example, one in efforts to support the vast popula- ties, and other forms of social media
project creates a script that manipu- tion of adults engaging in informal (for example, Twitter, Facebook) play
lates image layers in a Photoshop doc- computing education. in knowledge exchange among infor-
ument. The project outlines multiple First, educators can provide access mal learners.
versions of the script, moving from an to the curricular resources already be- A final charge for educators pertains
iterative solution to a recursive one as a ing generated for our classes. Informal to the future generation of young profes-
natural response to unexpected results learners are often concerned with the sionals. We must rethink the design of
discovered when the script is used on reliability and credibility of examples, our computer science courses to invite
various images. so our respected, well-known institu- students from other disciplines across
A key component of our projects tions have the opportunity to dissemi- campus to gain a solid foundation in
distinguishing them from other ma- nate high-quality information about computing as it pertains to their fields
terials a user might find on the Web is computing. MIT’s OpenCourseWare of study. A fundamental aspect of this
that each project includes a narrative initiative (http://ocw.mit.edu/cours- should be increased interdisciplinary
description of the code’s development, es/) is an excellent example. However, and collaborative educational offerings
explaining relevant programming con- given the diversity of the professional with other STEM and non-STEM depart-
cepts (for example, recursion) as they domains engaged in end-user pro- ments. By broadening our own defini-
are used in context. This narrative in- gramming and their respective differ- tions of computing education both on
terleaves explanations with progres- ences and contextual needs, it is un- and off campus we might ensure that
sively more complete example code, likely that providing online materials the next generation has the computa-
and failure drives the narrative forward. alone will be adequate. tional skills and general knowledge
Essentially, each project serves as a We should also actively lead the needed to succeed in their professions,
case study that learners can review to development of non-traditional edu- whatever those professions might be.
access example code as well as instruc- cational opportunities offering con-
tion. Our evaluation of this resource text-specific courses or seminars that References
1. Brandt, J. et al. Example-centric programming:
has shown that these explicit connec- include conceptual instruction in com- Integrating Web search into the development
tions to conceptual content can in fact puting. Rather than developing these environment. In Proceedings of the 28th International
Conference on Human Factors in Computing Systems
lead to measurable learning gains for in isolation, we must reach out and (CHI ‘10). ACM, New York, 2010, 513–522; http://doi.
end-user programmers.3 We were able collaborate with groups of informal acm.org/10.1145/1753326.1753402
2. Bransford, J. et al. How People Learn: Brain, Mind,
to promote learning by briefly articu- learners. Many end-user programming Experience, and School. National Academy Press,
lating details about concepts as they activities make use of scripting or pro- Washington, D.C., 2000.
3. Dorn, B. A case-based approach for supporting
were used in the code while not nega- gramming affordances within com- the informal computing education of end-user
tively impacting the overall usability mercial software packages, and most programmers. Doctoral dissertation, Georgia Institute
of Technology, 2010.
of the examples for those that did not cities have active user groups for such 4. Dorn, B. and Guzdial, M. Discovering computing:
need the explanations. software tools. Building collaborative Perspectives of Web designers. In Proceedings of the
Sixth International Workshop on Computing Education
partnerships with these groups to de- Research (ICER ‘10). ACM, New York, NY, 2010,
Roles for Educators velop, distribute, and disseminate con- 23–30; http://doi.acm.org/10.1145/1839594.1839600
5. Scaffidi, C. et al. Estimating the numbers of end users
Our work over the past several years textualized computing education has and end user programmers. IEEE Symposium on
has further convinced us of the im- the potential to impact many of these Visual Languages and Human-Centric Computing,
2005, 207–214.
portance of educators and others in- previously underserved adult learners.
volved in formal educational or train- There remain many open opportu- Brian Dorn (bdorn@hartford.edu) is an assistant
professor of computer science and multimedia Web design
ing institutions to actively consider nities in this space for computing edu- and development at the University of Hartford in West
the role informal learning is playing cation and human-computer interac- Hartford, CT.
in the computing landscape. We see tion researchers alike. Among them: Copyright held by author.

30 commun ications of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


V
viewpoints

doi:10.1145/1941487.1941500 Tim Wu

Law and Technology


Bell Labs and
Centralized Innovation
Replaying the long-term costs of monopolized innovation.

I
n e a rly 1 9 3 5,a man named
Clarence Hickman had a secret
machine, about six feet tall,
standing in his office. Hickman
was an engineer at Bell Labs,
and his invention was, at the time, a de-
vice without equal on earth, way ahead
of its time. Here’s how it worked: in the
event you called and Hickman was out,
the machine would beep and a record-
ing device would come on allowing the
caller to leave a message.
What was truly interesting about
Hickman’s answering machine was
not just the idea of a machine that an-
swered calls, but rather, what was in its
guts. For inside Hickman’s machine
was something new to the world: mag-
netic recording tape. Recall that be-
fore magnetic storage there were few
low-cost means to store sound other
than by pressing a record or making a
piano roll. Over the long run, magnetic
recording technology would not just
herald audiocassettes and videotapes,
but when used with the silicon chip,
make computer storage a reality. Mag-
netic recording technology must be
counted, in fact, as one of the most im-
portant inventions of the 20th century.
For, from the 1980s onward, firms from
Microsoft to Google—and by implica-
tion all the world—would become ut-
terly dependent on magnetic storage, light on central questions of innova- tance a technological age increasingly
otherwise referred to as the hard disk. tion in the 20th century that remain dominated by large firms like Google,
Yet, there is something different central in the 21st century. The history Microsoft, and Facebook.
about this story—the answering ma- of the answering machine forces us to
chine would not appear in American confront the costs and benefits of mo- Bell Labs
homes until the 1980s. What happened nopoly in the information industries. That Bell Labs played a major role in
in the meantime, as we shall see, sheds It is also a question of growing impor- inventing magnetic recording tape

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 31


viewpoints
CACM_TACCESS_one-third_page_vertical:Layout 1 6/9/09 1:04 PM Page 1

is, to any historian of technology, no force for good. It is the kind of thing,
surprise. Founded in 1925 for the spe- in fact, that gives monopoly a good
cific purpose of improving telephony, name. In current-era usage, the word
Bell Labs made good on their mis- “monopoly” is a scary concept, one
sion (saving AT&T billions with inven- that few would dare endorse publicly.
tions as simple as plastic insulation But AT&T was, in its time, a proud mo-
for telephone wires) and then some. nopolist, and even a critic is forced to
ACM By the 1920s the laboratories had ef- admit a system run by a beneficent mo-
fectively developed a mind of their nopolist had its advantages. While to
Transactions on own, carrying their work beyond better
telephones and into basic research to
some degree Bell Labs served AT&T’s
interests, it was also run, in part, out
Accessible become the world’s preeminent corpo-
rate-sponsored scientific body. It was
of a kind of noblesse oblige. For in a
corporate setting, it is often difficult

Computing a scientific Valhalla, hiring definitely


the right men (and later women) they
to imagine how funding theoretical
quantum physics research can be of
may find and leaving them relatively any immediate benefit to shareholder
free to pursue what interested them. value. More to the point, it is very dif-
When scientists are given such ficult to imagine a phone company to-
freedom, they are able to do amazing day hiring someone to be their quan-
things; Bell’s scientists did cutting- tum physicist, without rules and with
edge work in fields as diverse as quan- no boss.
tum physics and data theory. It was a The story of Bell Labs is, in many
Bell Labs employee named Clinton ways, the strongest case in support of
Davisson who would win a Nobel Prize the near-inevitable monopolies that
in 1937 for demonstrating the wave emerge in the information industries.
nature of matter, an insight more typi- Yet, despite all of the undeniable glo-
cally credited to Einstein than to a tele- ry of Bell Labs, when you look care-
phone company employee. In total, fully at the history there emerge little
Bell would collect seven Nobel Prizes, cracks inside the resplendent façade
more than any other corporate labora- of corporatism for the public good.
tory, including one awarded in 1956 For however many its breakthroughs,
for its most renowned invention—the there was a technique through which
transistor—which made the computer the institution was very different from
possible. Other Bell Labs creations, a research university. For when the in-
while obscure to the general public, terests of AT&T were at odds with the
◆ ◆ ◆ ◆ ◆
are certainly dear to Communications advancement of information, there
This quarterly publication is a readers, including Unix and the C pro- was no doubt as to which good pre-
quarterly journal that publishes gramming language. vailed. And so, interspersed between
refereed articles addressing issues In short, Bell Labs was a superb Bell Labs’ public triumphs were its se-
cret discoveries, the skeletons within
of computing as it impacts the
the imperial closet of AT&T. And here
The story of Bell
lives of people with disabilities. we clearly see the long-term costs of in-
The journal will be of particular dustrial rule by a single firm.
Labs is, in many
interest to SIGACCESS members Let’s return to Hickman’s magnet-
ways, the strongest
and delegrates to its affiliated
ic tape and the answering machine.
In the U.S. and in most of the world,
case in support of
conference (i.e., ASSETS), as well answering machines were not widely
the near-inevitable
as other international accessibility sold until the 1980s—almost 50 years
conferences. after Hickman’s invention. Why not?
monopolies Well, soon after Hickman had dem-
◆ ◆ ◆ ◆ ◆
www.acm.org/taccess that emerge in
onstrated his invention, AT&T or-
dered its Labs to cease all research
www.acm.org/subscribe the information into magnetic tape. In fact, Hickman
industries. is virtually unknown to history: his re-
search was so effectively suppressed
and concealed that it came to light
only in the 1990s, when a historian
named Mark Clark found Hickman’s
laboratory notebook in the Bell ar-
chives. Magnetic tape would come to

32 commun ic ations of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


viewpoints

America through imports of German never invented the Internet, even


technology after World War II. though it clearly had the chance. In
Why on earth would management Bell Labs was the 1960s, men like scientist Paul
bury such a vital and commercially never a place Baran spent years trying to convince
valuable discovery (one that, in fact, AT&T that packet-switching technolo-
could have aided the war effort)? Here that could originate gies were a step forward that would im-
AT&T had, in-house, the chance to technologies prove the network, but AT&T regarded
dominate a new and incredibly impor- the idea as preposterous. “Their atti-
tant market. What was it frightened that could, by the tude,” Baran said in a later interview
of? The answer, rather surreal, comes remotest possibility, “was that they knew everything and
from the corporate memoranda, also nobody outside the Bell System knew
unearthed by Clark. As odd as it may threaten the Bell anything. So here some idiot comes
sound, AT&T firmly believed magnetic system itself. along and talks about something be-
tape and the telephone were funda- ing very simple, who obviously doesn’t
mentally incompatible technologies. know how the system works.”
The widespread usage of magnetic Packet networking and the record-
recording technology, AT&T believed, ing machine are just two examples of
would lead Americans to abandon the technologies that AT&T, out of such
telephone. fears, would for years suppress or fail
In Bell’s imagination, the very haps will always be a strong allure to to market: other examples include fi-
knowledge that it was possible to re- what can be termed “centralized” in- ber optics, mobile telephones, digital
cord a conversation would “greatly novation as epitomized by Bell Labs. subscriber lines, facsimile machines,
restrict using the telephone,” with It is attractive to envision a planned, speakerphones—the list goes on and
catastrophic consequences for its systematic means of finding the fu- on. These technologies, ranging from
business. The firm specified two par- ture, as directed by a great centralized novel to revolutionary, were simply
ticular dangers. Businessmen might intelligence. too daring for Bell’s comfort. Without
fear the possible use of a recorded In contrast, the alternative, an a reliable sense of ways they would af-
conversation to undo a written con- open, decentralized approach to in- fect the Bell system, AT&T and its heirs
tract. Second, AT&T estimated that novation—hundreds or thousands would deploy each with painfully slow
the telephone was used for an enor- of solo inventors or small firms—is caution, if at all.
mous number (Clark quotes an es- superficially much less attractive. It
timate of approximately two-thirds seems so chaotic and underresourced Conclusion
of all calls) of obscene, indecent, or that it is hard to imagine anything of Can we expect the same kind of prob-
ethically dubious conversations. The real value being produced. And yet lems in our contemporary Internet
very possibility of a recording, AT&T when you look carefully at the history age? On the one hand, it seems dif-
reasoned, would scare off any such us- of the communications and comput- ficult to imagine, with a seemingly
ers. Hence magnetic recording would ing industries in particular, it is so never-ending parade of startups, that
“change the total nature of telephone often the outsider and even outcasts, any technology could ever be mar-
conversations” and “render the tele- working in attics or garages, who in- ginalized for that long. On the other
phone much less satisfactory and use- vent the “big ones.” That, at least, is hand, as the power of the main Inter-
ful inside the vast majority of cases the story, a minimum, behind the net platforms increase—like Face-
during which that’s employed.” telephone, radio broadcasting, the book, Google, and Apple—their re-
Here we a see great problem with television, cable television, the per- spective interests in discouraging or
monopolized invention: The enlight- sonal computer, and so many of the co-opting certain lines of innovation
ened planner of the future can also, Internet’s most important firms. may slowly increase. It is certainly
at times, prove a delusional paranoid. Centralized systems of innovation too early to raise any sort of alarm.
True, once magnetic tape arrived in are excellent for certain types of re- But we should never forget that the
America, there were several notorious search. Yet they also have, as it were, greatest threat to any dominant firm
examples—from Nixon to Lewinsky— one fatal flaw, one that we can see is a disruptive technology. As Joseph
where sordid secrets were exposed by clearly in the story of AT&T and its Bell Schumpeter once said of all indus-
it. But, amazingly enough, we all still Labs. Yes, Bell Labs was great. But at tries, when faced with anything truly
use telephones. Yet in the 1930s it the same time, Bell Labs was never a new, “the forces of habit raise up and
seemed safer to shut down an exhila- place that could originate technolo- bear witness against the embryonic
rating line of research than to risk the gies that could, by the remotest pos- project.’’
Bell system. sibility, threaten the Bell system itself.
The story of AT&T and the answer- The truly disruptive technologies— Tim Wu (wu@pobox.com) is a professor of law at Columbia
ing machine holds important lessons, those that might even cast a shadow of Law School and author of The Master Switch: The Rise and
Fall of Information Empires. Knopf Doubleday Publishing
both for how innovation happens, and uncertainty over the business model— Group, 2010.
the underlying questions of industrial were out of the question.
structure. There has been, and per- This is also why, for example, AT&T © 2011 ACM 0001-0782/11/05 $10.00

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 33


V
viewpoints

doi:10.1145/1941487.1941501 Jason Fitzpatrick

Interview
An Interview with
Steve Furber
Steve Furber, designer of the seminal BBC Microcomputer System
and the widely used ARM microprocessor, reflects on his career.

S
tephen Byram Furber is the a founder. I went along to the very first
ICL Professor of Com- meetings and started building com-
puter Engineering in the The BBC Micro was puters for fun, which was fairly scary
School of Computer Sci- just the front end in those days because the components
ence at the University of had to be ordered from California by
Manchester, U.K. Furber is renowned of something that mail order using a credit card. I was a
for his work at Acorn Computers Ltd., was designed as student so credit cards were fairly scary
where he was a principal designer of then; using them internationally was
the BBC Microcomputer System and a dual processor even scarier. But we got the micropro-
the ARM microprocessor, both of from the outset. cessors. My first machine was based
which have achieved unique historical on the Signetics 2650, which not many
significance. people have heard of these days. It
The BBC Micro platform was funda- had a full kilobyte of static RAM main
mental to computing in British educa- memory. I assembled the circuit board
tion in the 1980s and directly led to the using Verowire, which is a little wiring
development of the ARM architecture. of the information age (see http://www. pen where you hand-wired the things
The ARM architecture is the most wide- computinghistory.org.uk/.) A video of together; you soldered it, which melted
ly used 32-bit RISC architecture and the the interview is available at http://www. the insulation and made the connec-
ARM processor’s power efficiency—per- computinghistory.org.uk/det/5438/ tions. I understand it gave off carcino-
forming the same amount of work as Steve-Furber-Interview-17-08-2009/; a genic vapor, but it hasn’t got me yet.
other 32-bit processors while consum- condensed version of the interview is That’s how I built these things. I
ing one-tenth the amount of electric- presented here. built myself a small rack—I couldn’t
ity—has resulted in the widespread afford a commercial rack, so I made
dominant use of the ARM processor in I’d like to talk to you about your in- one and got the 2650 system going.
mobile devices and embedded systems. volvement with Acorn, and what it’s In the Processor Group, enthusiasts
Furber is a Fellow of the Royal Acad- led to today. exchanged notes with each other. I re-
emy of Engineering, of the Royal So- I was at the University [in Cam- member Sophie Wilson coming to my
ciety, the IEEE, the British Computer bridge]; I read maths as an under- house for one meeting of the Proces-
Society and the Institution of Engi- graduate and I went on to do a Ph.D. sor Group, looking at my machine and
neering and Technology (IET), and was in aerodynamics. During my Ph.D. I poking away at it—finding faults in
appointed Commander of the Order of got interested in aspects of flight, and the memory and stuff like that. Then
the British Empire (CBE) in 2008. then I heard about the formation of while I was still a Ph.D. student in the
Jason Fitzpatrick, a computer his- the Cambridge University Processor Engineering Department, Hermann
torian and the curator at the Centre Group. I thought maybe I should join Hauser came knocking on my door and
for Computing History at Suffolk, up with these guys and see if I could explained that he and Chris Curry were
U.K., conducted an extensive interview build myself a flight simulator or some- thinking of starting a consultancy com-
with Furber on behalf of the museum, thing like that. I was involved in the pany in the microprocessor business.
which is dedicated to creating a perma- University Processor Group from its They had been looking to the Univer-
nent public exhibition telling the story foundation although I wasn’t actually sity Processor Group as the source of

34 commun ic ations of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


viewpoints

technical people who might be able to you interfered with it, it should defi- think the Altair had probably appeared
help them; he asked me if I was inter- nitely not pay out. The things were about this time in the States.
ested. I said, “Well, I’m just a hobbyist. tested by plugging a mains adapter In the University Processor Group,
I’ve been doing this for fun. But if you into the wall, plugging the fruit ma- the real men built computers with TTL.
think I can help, I’m willing to give it a chine into one socket, and an arc weld- It was only the wimps like me that used
go.” That’s how I joined the embryonic ing transformer into the other. Some- newfangled microprocessors, which
Acorn, before it was Acorn. body welded metal together while you were kind of cheating because you got
operated the fruit machine to see if the too much functionality in one package.
Was it based inside Sinclair’s building thing was robust to sparking. But yes, microprocessors were just en-
at the time? tering the public consciousness, so the
Yes, the first things we did were in Fantastic! The feeling at that time was MK14 from Science of Cambridge was
the Science of Cambridge Building in very much of the hobbyist. You just en- an example of a microprocessor on a
King’s Parade. Chris Curry was set up joyed doing that kind of thing, and the printed circuit board with a hexadeci-
running Science of Cambridge with whole industry has pretty much come mal keypad and seven segment display;
Clive. Hermann and Chris did bits of out of that. Is that fair to say? you could put assembly code into it and
Acorn work in there. In fact the first Yes, that’s right. We are talking about make it run. Sophie saw the MK14 and
thing I did for Acorn was actually not for the late 1970s before the IBM PC started, said something which she said many
Acorn, it was for Science of Cambridge. before the Apple II had appeared. There times—basically, “I could do better
I hand-built the prototype MK14; I got were some very basic box machines. I than that.”— and she went home over
a circuit diagram and built one using
Verowire, soldering in my front room.
The MK14 was basically a copy of the
National Semiconductor SC/MP devel-
opment kit. They had taken what was
a masked program ROM from the de-
velopment kit and copied it into two
fusible link PROMS for the MK14, and
they managed to copy it wrong. So I de-
bugged this thing in my front room. That
was the first piece of work I did for them.
Then Chris and Hermann got a con-
tract to do some development work
on microprocessor controlled fruit
machines, which were very new at that
time. Up to that date fruit machines had
all been controlled by relays and so on;
this was an early attempt to do micro-
processor stuff. We used two SC/MPs
in a rack to control the fruit machine.
In fact, the software for that was boot-
strapped from the 2650 machine I built
in the Processor Group; it was used as
a dumb terminal into the SC/MP devel-
opment kit, and we brought this fruit
machine controller up. The main chal-
lenge in those days was to make these
things robust. Very early on people had
discovered if you just sparked electron-
ic cigarette lighters next to the fruit ma-
chine, they would often pay out.

Yes, the program counter jumps off


Photogra ph court esy of st ev e f urber

somewhere and anything can happen!


Yes. So that was when Sophie Wil-
son came in. She designed an FM re-
ceiver front end that would trigger
whenever you flicked one of these ciga-
rette lighters and cause the SC/MPS to
reset; it would definitely not pay out.
[laughs] That was the requirement—if

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 35


viewpoints

Easter holiday and came back with a neither Z80 nor CP/M, although a couldn’t let them in. Nobody was ex-
design she called the Hawk, which was little bit later you could buy a Z80 sec- pecting this, either.
6502-based. Hermann looked at this ond processor to run CP/M; we kind of The machine was first sold in Jan-
and thought he could sell it; that be- met the spec in the end. But no, they uary of 1982, so this may have been
came the Acorn System 1. The name were sufficiently convinced by what later in 1982.
Acorn was introduced originally just we could do with the 6502 that they
as a trading name. The company was moved the spec to the machine that And that was the first time you thought
called Cambridge Processor Unit Ltd. Acorn had already begun to get on the this is big?
drawing board. The Proton was always Well, this is when you first felt the
If you look at those machines today, designed as a dual processor. The fact scale of public interest. People were
the System 1 and the MK14, they are the BBC Micro had a second proces- prepared to hire a coach from Birming-
what most people would describe now sor connection was actually because ham to hear this bunch of techies, who
as unusable. But these things sold in a the BBC Micro was just the front end probably didn’t know how to speak in
big way. of something that was designed as a public, say something about this hob-
The System 1 and the MK 14 sold dual processor from the outset. byist computer thing. Of course, we
faster than people could put the kits to- I remember that when the BBC always had the education market in
gether. I think the System 1 was mainly was talking to Acorn—I wasn’t in- mind, but this was much bigger than
sold as a kit, so you got the parts and volved in the commercial discus- just the education market in terms of
you had to solder it together. But there sions, I was just a techie—they were interest. We actually went on tour with
was lots of interest. It was really the confident this machine would sell, this seminar. We gave it twice more
only way the general public could get and on the back of their programs at the IET to soak up demand. We did
their hands on anything that looked we’d sell 12,000 of these machines. a tour of the U.K. and Ireland. Every-
like a computer at that time. Real com- That was big numbers to Acorn. Not where we went there was a big turnout.
puters cost a million pounds, lived in huge numbers—we’d probably sold There was real, real interest.
clean rooms, and were only touched several thousand Atoms—but it was
by men in white coats; whereas these really worth going for. Nobody imag- What sort of people were coming to
things you could buy for £100 or £200 ined that that estimate would be off this?
and play with at home. by a factor of a hundred—one and A wide range of people. I think it is the
a half million were shipped in the same phenomenon as with the System 1
It was just the want to own and control end—because nobody really antici- but on a bigger scale. It was a bunch of
one of these things. A lot of it was driv- pated the wave of interest. people who recognized that computers
en by science fiction… I really realized that this was a phe- were about to come within their reach,
Of course, the real science-fiction nomenon when Sophie, Chris Turn- when they’d been behind closed doors
aspect is they got used as props in TV er, and I agreed to do a seminar at the throughout past history. There were
shows as well. So the Acorn System IET in Savoy Place in London. It has lots of companies building machines
1 was featured as the computer on a big central amphitheatre that sits at the time. We’ve mentioned Sinclair,
“Blake’s 7.” There was quite a lot of about 500 or 600 people. They asked but if you go and look at the machines
competition between Acorn and Sin- us to do a seminar on the BBC Micro. coming out, the 1980s was a real era of
clair at the time. Clive Sinclair had We went down there thinking this is diversity. Wonderful quirky machines of
proudly boasted that you could control a big room, I wonder if they’ll fill it? all shapes and flavors, all coming out of
a nuclear power station with his ZX81. Three times the number of people companies a bit like Acorn: small start-
Well, this was nothing compared with they could get in the room turned ups; enthusiasts the public couldn’t
controlling a 21st century interstellar up. People booked coaches from Bir- perhaps fully trust. Unless you were a
cargo ship [on the “Blake’s 7” televi- mingham; they had to be sent home hobbyist and a real enthusiast yourself,
sion program] with an Acorn System 1. because Health and Safety said they you didn’t know who to trust.
Then the BBC put their name on
You win, hands down. this machine from Acorn. I think that
That’s right! [laughs] We always had the really was the key to the success of
the BBC Micro, even though by the
Going forward to the BBC Micro, obvi- education market in standards of the competition it was
ously the BBC came to Acorn with the
specification for a machine? How did
mind, but this was a slightly expensive machine. It was
slightly higher spec and that was part-
that change things at Acorn? The Atom much bigger than just ly the BBC’s requirements. The BBC
was out and it was selling well. Then all
of a sudden you were shot into fame in
the education market imposed—no, imposed is the wrong
word—encouraged us to go with a par-
the computing industry. in terms of interest. ticular spec. The spec was all negoti-
The BBC Micro was a huge phe- ated and agreed; there was no imposi-
nomenon. Of course, when the BBC tion. But they were tough negotiations.
came their spec was a Z80 machine The BBC had a pretty clear idea of what
running CP/M. The BBC Micro was they wanted. The fact that we pushed

36 commun ications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


viewpoints

the technology a bit—you know, we ran them at that price. So it went up to


the memory a bit faster, we made an £299, £399. We were trying hard to keep
early use of semi-custom chips, we had The BBC imposed­— the price down. But really, how could
these two ULAs that gave us quite a lot no, imposed is you make the machine cheaper? If you
of excitement—all pushed the price of look at a Spectrum, then of course ev-
the machine up a bit. It was an expen- the wrong word— erything about it is cheaper, including
sive machine, but despite that, a much encouraged us the keyboard. The BBC had by today’s
broader market was comfortable with standards a stunningly high-quality
it because it had the BBC name. to go with a keyboard. Today’s keyboards are very
The machine itself was low level. If particular spec. cheap elastomeric. Every switch on the
you connected something to the back, BBC Micro keyboard had a pair of gold
like a joy stick, it was easy to communi- wires that touched when they crossed.
cate with it because you weren’t, as you When you pushed the key down they
would be with today’s PC, so high up in sprang together and touched, so you
the software stack. The BBC Micro was using microcontroller technology. In weren’t making the contact with the key
easy and anybody could read the user fact, you could probably make a BBC press; you were removing the obstruc-
guide; if they had a little bit of technical Micro in a single chip and sell it very tion that was preventing the contact.
know-how they could build their own cheaply. I can still run BBC Micro And BBC keyboards were formidably
electronics to go into the one mega- programs on my laptop. In fact I have robust. There were some manufactur-
hertz bus and program it. It was easy. BBC BASIC for Windows, which is a ing problems with them. There was a
I’m quite sad we’ve lost some of that. I very faithful emulation. It’s produced batch that were manufactured with the
think it’s much tougher now for teenag- by Richard Russell, who is one of the key switches about half a millimeter off
ers with technical interest to say, “I want people who worked for the BBC when the PCB; when you hammered on them
to build one of these things, plug it into we were negotiating with them in the the force got transmitted through to the
my computer and make it do stuff.” 1980s. I have an Archimedes emulator solder joints on the back then the PCB
that I run on the PC, and I have a BBC tracks broke. But when they were made
Yes, I had a BBC Micro and connected emulator that I run on the Archimedes properly, they would last 10 years of kids
up various different bits of equipment emulator that runs on the PC. thrashing them. The machine took a
to it and had to program this thing hammering. You know, mine still works.
down to the metal, talking directly to the Emulating emulation!
chips; you’re talking to the very pins that And it’s still faster than the original They’re fantastic machines. So what
you just wired up something to. Like you BBC Micro because that’s how much did the success of the BBC Micro do to
say, that’s completely gone. You have to compute power we’ve got now. So you Acorn?
go through layers and talk through Win- can still run the stuff, but you can’t in- Acorn grew rapidly. When the BBC
dows, etc. How does one get into hard- terface hardware to it so easily. contract was signed, I was still a re-
ware programming now? We’re running There’s an interest in actually build- search fellow at the University; my day
so fast that you can’t even make circuit ing something much more basic again job was doing aerodynamics. I guess
boards to connect to it because the fre- around today’s microcontroller tech- Acorn at that stage employed maybe 30
quency just won’t have it. nology. My guess the market for that is people. I joined them full time in Oc-
You’re right; the problem isn’t sim- small but not insignificant. tober 1981, and by 1983 the company
ply the stacks of software. The prob- I think the nearest thing you get at had grown to 400 people, just to man-
lem is the hardware now...the signal- the moment is a PIC development kit age this stuff. There was no real sales
level hardware is very difficult to work for about £20; with a PC you can write activity involved because the stuff sold
with and requires a lot of skill and PIC Assembly code, load it into the faster than you could make it—it just
knowledge. But of course, you could PIC, and do all sorts of stuff with it. I do walked off the shelves. So it was really
still build a slow interface. If you want know quite a few people who use PICs building the technical team up; and
an interface at a megahertz, then con- this way. That’s probably the nearest we had a strong manufacturing team.
necting to a megahertz is no harder you get. But with a PIC, in some sense If you’re going to make millions, you
now than it was in 1980. Actually, a you’re going to a lower-level interface want to know something about pro-
megahertz means you can do a mil- than on a BBC Micro. curement. Acorn didn’t actually man-
lion things a second, which is quite a ufacture; it was all sub-contracted. We
lot for many purposes. So how would To go back to the point about the price had to build skills in manufacturing.
people access that? I guess they get of the BBC, it was expensive. You had The BBC contract also required lots
some of it through the Lego robotic Spectrums, which were under half the of exotic technology beyond the basic
systems and so on. But in a sense, a price. Was a big part of the negotia- machine. The Prestel telesoftware re-
bit too much of that is prefabricated. tions trying to keep the price down? ceiver was a bit of unknown technolo-
It’s a bit too ready-to-go. But you are Yes. You may remember that we gy we had to make; the second proces-
talking at quite a low level to the mi- launched (I may get the numbers wrong sors including the Z80 running CPM.
crocontroller. There’s no reason now here) the Model A at £239 and the B There were a lot of things to go around
why we can’t make BBC- like products at £339, but really we couldn’t make it, so we grew technical teams.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 37


viewpoints
CACM_JOCCH_one-third_page_vertical:Layout 1 7/30/09 5:50 PM Page 1

We also realized the price point very involved in this. We were already
was quite good for schools and pro- thinking the BBC Micro has been a big
fessional users, but it was too high success; we need to build on this. We
for hobbyist and most home users, could put second processors on, which
so we developed the Electron, which tided us over for a bit. But really we
was a cost-reduced BBC Micro - not needed to be thinking about the next
ACM an entirely happy story. There wasn’t
much wrong with the machine, but
big machine. It was clear that we were
going to step up from 8 bits. 16-bit pro-

Journal on for Christmas 1983 when there would


have been a huge market we couldn’t
cessors were already around and going
into some competing products.
get the electronics reliable enough. We looked at the 16-bit processors
Computing and By 1984 when we cracked it and could that were around and we didn’t like
make lots of them, the market had them. We built test bench prototype
Cultural gone. We ended up with a quarter of a
million of them in the warehouse that
machines with these. We didn’t like
them for two reasons. Firstly, they were
Heritage were eventually sold below cost.
But yes, the company went from a
all going to 16 bits by adopting mini-
computer-style instruction sets, which
small, experimental start-up to big, es- meant they had some very complex
tablished...well, is 400 big—medium- instructions. The anecdote I always re-
sized maybe? member is that the National Semicon-
ductor 32016 had a memory-to-memo-
What was the atmosphere like with ry divide instruction that took 360 clock
the people that worked there? Or was cycles to complete; it was running at 6
the excitement lost in the numbers of megahertz, so 360 clock cycles was 60
people? microseconds; it was not interruptible
No, there was a core group who did while the instruction was executing.
the really ambitious technical stuff. Single density floppies, if you handled
We did begin to get the idea that we them chiefly with interrupts, give an in-
could take on anything. We knew terrupt every 64 microseconds, double
there was competition. We were a bit density every 32. Hence you couldn’t
over- focused on Sinclair as the com- handle double density floppy disks.
◆ ◆ ◆ ◆ ◆ petition. Standard problem: seeing The complex instruction sets gave
the parochial competition and miss- them very poor real-time response.
JOCCH publishes papers of ing the real competition from much The second problem we had was
significant and lasting value in further away. Technically we felt very that none of them kept up with mem-
much on top of what we were trying to ory. Commodity memory at the time
all areas relating to the use of ICT
do, and we kept taking on bigger and was, as it still is today, DRAM—it was
in support of Cultural Heritage, bigger challenges. We felt we’d devel- rather smaller DRAM chips—and this
seeking to combine the best of oped the Midas touch when it came DRAM had a certain bandwidth. If you
computing science with real to advanced technology; that’s a lot of ran the DRAM at full spec, you get a
attention to any aspect of the the background to the development certain bandwidth. We deduced from a
of the ARM microprocessor. This was number of experiments that compute
cultural heritage sector. a very short period of time when you power goes with memory bandwidth.
look back. The first sale of the BBC Mi- But these microprocessors wouldn’t
◆ ◆ ◆ ◆ ◆ cro was January 1982. The ARM design even use the bandwidth that was there;
started in October 1983 and the first they couldn’t keep up with the memo-
ARM chips were in our hands in April ry. This struck us as the wrong answer.
1985. It was only four years from be- So we were feeling unsatisfied with
www.acm.org/jocch ginning to sell BBC Micros to having the microprocessors we could go out
ARM chips in our hands. and buy when I’m pretty sure it was
www.acm.org/subscribe Hermann who dropped a couple of
Going on to the ARM chip, how did that papers on our desks, which were early
come about? What started you guys RISC papers from Berkeley and Stan-
working on a new type of processor? ford, where a grad class had designed
The advanced R&D group, which I a microprocessor that was competitive
was in with Sophie and several other with the best industry could offer. We
folk, was responsible for looking fur- looked at this, and thought how would
thest out in terms of what the company we really like a microprocessor to look?
was going to do for product. Hermann Sophie began tinkering with instruc-
was very hands-on—he was always tion set architecture, inspired consid-

38 communications of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


viewpoints

erably by the Berkeley and Stanford try as it catches up. But if we set about they didn’t know what to do with it.
RISC work, but also by what she under- doing this, we’ll learn something, we’ll
stood of the 6502, and also what was understand something about what it So we’re talking about a chip now that
needed to write a good BASIC inter- takes to build a good microprocessor; is in something like 92% of mobile de-
preter. Sophie had written several BA- and then we’ll be better at recognizing vices today?
SIC interpreters by then for the Atom, a good one when we see it. We didn’t Yes. Around the end of 2007, the
for the BBC Micro, for the 32016 sec- expect this to go through. To us, build- ten-thousand-millionth ARM had been
ond processor, and so on. She sketched ing microprocessors was a black art. shipped, so there are more ARMs than
out an instruction set. The big companies had hundreds of people on the planet. I believe produc-
Then in October 1983 Sophie and I people, and it took them 10 revs of the tion is currently running at about 10
went to visit the Western Design Center chip before it started to work sensibly. It million a day. It is projected to rise to
in Phoenix, Arizona. They were design- just looked like a black hole, and Acorn about one per person on the planet per
ing a slightly extended 6502, the 24-bit couldn’t afford that size of black hole. year within two or three years.
address 6502 that became the 65C816. But we got on with it. It turned out
We went in expecting to find big, shiny there is no magic. Microprocessors They’re mind-blowing numbers.
American office buildings with lots of are just a lump of logic, like everything Look­ing at all this and seeing how it’s
glass windows and fancy coffee ma- else we’d designed, and there are no changed us as people -to have this com-
chines. What we found was a bungalow formidable hurdles. The RISC idea puting power in our pockets has com-
in the suburbs of Phoenix. They hired was a good one; it made things much pletely changed the way we are and the
school kids during the summer vaca- simpler. Eighteen months later, af- way we live our lives. And you played an
tion to do some of the basic cell design. ter about 10 or 12 man-years of work, absolute key part in that. So what does
Yes, they’d got some big equipment, we had a working ARM in our hands, it feel like, to know that you played a
but they were basically doing this on which probably surprised us as much big part in it?
Apple IIs. My strong memory is walk- as it surprised everybody else. It’s kind of magic, isn’t it? I mean
ing out of there saying to each other, In July 1985, we’d had the proces- it’s largely serendipity. I spent some
“Well, if they can design a micropro- sor on our bench running for a couple of my last two years at Acorn trying to
cessor, so can we.” of months; we decided it was time to work out how to build a business plan
We went back and from the tinker- say something to the public. I rang a for a company that could take ARM
ing that Sophie had been doing with journalist and said, “We’ve been work- out. Acorn’s desktop PC business was
instruction set design, which Her- ing on this microprocessor design and not big enough to support proper pro-
mann had entirely supported and ap- we’ve got it working.” He said, “I don’t cessor development; we needed a big-
proved of, we put the project on an of- believe you. If you’d been doing this, ger market, so I tried to work out how
ficial footing. I’d have known.”, and put the phone to spin out a company. I could never
The other infrastructure aspect of down. [laughs] We’d actually done this get the numbers to work. You have to
this is that Andy Hopper from the Cam- in considerable secrecy; the secrecy was sell millions before the royalties start
bridge Computer Lab, who was a direc- so good that we couldn’t even persuade paying the bills. We couldn’t imagine
tor at Acorn, had persuaded Hermann people when we got the working silicon selling millions of these things, let
that if he was serious about staying in in our hands. In terms of timescale, this alone billions, which is where we are
the computer business, he needed to was all happening at exactly the time now. But a lot has happened to make
get serious about chip design. Andy when Acorn was going bust and being that happen—it hasn’t gone there on
advised Hermann to get chip design rescued by Olivetti. I believe Olivetti its own. When the company was spun
tools from VSLI Technology, and Apol- wasn’t told about the ARM when they out, Robin Saxby was brought in, and
lo workstations. They recruited IC de- bought Acorn. When they bought it, he and the team evolved this business
signers, a group led by Robert Heaton. we thought, maybe it’s time to own up: model, which has been instrumental
I can’t remember precisely the order in its success. Had Apple not come
they came in, but Jamie Urquhart came knocking at the door wanting the ARM
early, Dave Howard, Harry Oldham— My strong memory for the Newton, and Robin Saxby not
all names still associated with ARM. So been brought in to head it up...You
we’d got these tools and the IC design- is walking out of know, there are lots of ifs.
ers, but no chips to design. Sophie and there saying to If these things hadn’t happened,
I were thinking we should have a go at we wouldn’t be where we are today.
designing our own microprocessor. each other, “Well, But where are we today? I’ve been try-
We looked at this RISC stuff, and if they can design ing to work this out. I suspect there’s
thought this is kind of obvious, this is more ARM computing power on the
a good idea. So we’ll set off using these a microprocessor, planet than everything else ever
ideas and try to put something together. so can we.” made put together. The numbers are
But it’s clear that big industry has got far just astronomical.
more resources; they’re going to pick up
on these ideas too, we’re just going to Copyright © 2011 The Centre for Computing History;
get squashed underfoot by big indus- http://www.computinghistory.org.uk

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 39


V
viewpoints

doi:10.1145/1941487.1941502 Juan A. Añel

Viewpoint
The Importance of
Reviewing the Code
Highlighting the significance of the often overlooked
underlying software used to produce research results.

C
o n t ributo rs to jou rnal s, Nowadays, the use of software is can refer and that you can cite when
as well as researchers and essential in many different research you use the data. It is possible to create
politicians, are currently fo- fields. It is possible to access a vast your own scripts and code in order to
cused on such subjects as amount of research data thanks to the work with the data, study the results,
open access, data mining, use of computers, software, and stor- and formulate a hypothesis about the
and the growth of the Internet and in- age facilities. If you work in the field cause(s) of a phenomenon. In some
formation technologies together with of geosciences—as I do—you probably cases, you might also use software
their associated problems and solu- rely on the use of satellite data collect- packages that have been developed
tions. At the same time, there is one ed for use by governmental or intergov- and released by others, such as spread-
extremely significant topic in scientific ernmental agencies that has under- sheets and statistical programs. You
research and computing that is rarely gone rigorous testing. Normally, there might also use the functions that are
addressed: the importance of the code. is a peer-reviewed paper to which you available in your commercially released
high-level programming language that
make your daily programming tasks
easier. When you have computed your
results you might use them to publish
a paper. Yet how often do reviewers or
editors ask about the software used
during research? You might receive a
large amount of criticism about the
statistics, methods, and data when you
submit papers for publication, but how
often do you receive comments about
the software—who cares about that?
Given the lack of comments on soft-
ware, the issue arises as to whether we
are systematically violating basic princi-
ples of the scientific method. One such
principle is that experiments should
be reproducible. Yet it is often the case
that reviewers, editors, and other scien-
tists who read your paper cannot repro-
duce your experiment because they do
Photogra ph by Vasily Smirnov

not have access to essential informa-


tion about the software you used. In
order to address this problem, we must
think beyond merely citing the pro-
grams and their version numbers. Dif-
ferent programs or different versions of

40 communications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


viewpoints

It is arguable that
by independent programmers or agen-
cies. If such certification were available, Calendar
when using proprietary
it would suffice when submitting a pa-
per for publication to indicate that cer-
tified software had been used.
of Events
software it is a In order to realize the state of af- May 16–20
question of faith to rely fairs described here, the most desir- International Parallel and
Distributed Processing
able choice is to use free software (see
on the results, because http://www.gnu.org/philosophy/free-
Symposium,
Anchorage, AK,
it is not possible sw.html). Free software lets you go into Contact: Alan Sussman,
Email: als@cs.umd.edu
the code and check it. Using free soft-
to check the code. ware also follows the spirit of science,
May 16–20
in that scientists can disseminate any 5th International ICST
modifications they make to the code Conference on Performance
within the scientific community. Evaluation Methodologies and
Tools Communications,
Clearly, the challenges involved in Paris, France,
the same program can make the same applying the framework described in Contact: Lasaulce Samson,
computation in different ways, that is, this Viewpoint will vary between dif- Email: Samson.lasaulce@lss.
by using different algorithms, some of ferent fields of research. However, the supelec.fr
which will yield results with different amount of work entailed should not May 16–20
degrees of precision or accuracy. It is be seen as an excuse for not doing it. The Twelfth ACM International
generally the case that people are sim- Furthermore, it can be argued that in Symposium on Mobile Ad Hoc
ply too willing to believe the results of some fields of study, the possibility Networking and Computing,
Paris, France,
computations, especially in view of the of investigating a phenomenon using Sponsored: SIGMOBILE,
frequency with which bugs are present different approaches and theories, Contact: Philippe Jacquet,
in most commonly used programs. In- obtaining similar results, and test- Email: philippe.jackquet@
inria.fr
deed, it is arguable that when using pro- ing similar hypotheses should be suf-
prietary software it is a question of faith ficient to render the type of software May 19–21
to rely on the results, because it is not used unimportant. Yet to argue in this Computer Personnel Research
possible to check the code (see http:// way would be to miss the point. What Conference,
San Antonio, TX,
www.gnu.org/philosophy/categories. if the results differ? How do we explain Sponsored: SIGMIS,
html#ProprietarySoftware). the discrepancy? One possibility is Contact: Cindy K.
In light of the foregoing, we may well that the difference lies in the software Riemenschneider,
ask whether we should call for software code used. Thus, doing things in the Email: c_riemenschneider@
baylor.edu
specifications and code reviewers in sci- right way, by using free software, will
entific publishing. In fact, publishing bear fruit. At least it is something we May 21–28
the software specifications should be should aspire to, along with what we International Conference on
a requirement for authors and journal could call the scientific ideal. Software Engineering,
Waikiki, Honululu,
editors. The author’s own source code Sponsored: SIGSOFT,
should be published, at least on the In- Acknowledgments Contact: Richard N. Taylor,
ternet, along with the research results, The author would like to thank Rich- Email: taylor@uci.edu
and that source code should be acces- ard M. Stallman from the Free Software
May 23–25
sible to referees. This does not mean Foundation, Michael McIntyre from International Symposium on
that reviewers should be required to the Department of Applied Mathemat- Technology and Society,
study the code in detail before accept- ics and Theoretical Physics at the Uni- Chicago, IL,
Contact: Keith Miller,
ing a paper, because this would require versity of Cambridge, Gerald J. Suss- Email: miller.keith@uis.edu
too much work to be viable. However, man from the Computer Science and
having the source code available to Artificial Intelligence Laboratory at May 23–26
those who are interested would be a big MIT, and Brian Gough and José E. Mar- 5th International Conference
on Pervasive Computing
step forward. In fact, a relatively quick chesi from the GNU Project for their Technologies
check of the software code by an expert useful comments and suggestions. for Healthcare,
would be beneficial and would encour- Dublin, Ireland,
age authors to place greater emphasis Contact: John O’Donoghue,
Juan Antonio Añel (j.anhel@uvigo.es) is Ángeles Alvariño
Email: john.odonoghue@ucc.ie
on the reliability of the software they Researcher in the Environmental Physics Laboratory at
the Universidade de Vigo at Ourense, Spain.
use. This principle should clearly apply
to code that one writes oneself. In ad- This Viewpoint was accepted for publication in February
dition, prepackaged software (whether 2010; in the intervening time prior to publication
other material addressing this topic has appeared in
commercial or not) should be tested, Communications.
verified, and certified with its code filed
and accessible, and checked in detail Copyright held by author.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he ac m 41
ACM, Advancing Computing as
ACM, Advancing
a Science and Computing
a Professionas
a Science and a Profession
Dear Colleague,
Dear Colleague,
The power of computing technology continues to drive innovation to all corners of the globe,
bringing with it opportunities for economic development and job growth. ACM is ideally positioned
The
to help power of computing
computing technology
professionals worldwidecontinues to driveininnovation
stay competitive to all
this dynamic corners of the globe,
community.
bringing with it opportunities for economic development and job growth. ACM is ideally positioned
to provides
ACM help computing
invaluableprofessionals worldwide
member benefits stayyou
to help competitive in this
advance your dynamic
career community.
and achieve success in your
chosen specialty. Our international presence continues to expand and we have extended our online
ACM provides
resources invaluable
to serve needs that member benefits to help
span all generations you advance
of computing your careereducators,
practitioners, and achieve success in and
researchers, your
chosen
students. specialty. Our international presence continues to expand and we have extended our online
resources to serve needs that span all generations of computing practitioners, educators, researchers, and
students.
ACM conferences, publications, educational efforts, recognition programs, digital resources, and diversity
initiatives are defining the computing profession and empowering the computing professional.
ACM conferences, publications, educational efforts, recognition programs, digital resources, and diversity
initiatives areare
This year we defining the computing
launching professionlearning
Tech Packs, integrated and empowering
packages onthecurrent
computing professional.
technical topics created and
reviewed by expert ACM members. The Tech Pack core is an annotated bibliography of resources from the
This year weACM
renowned are launching Tech–Packs,
Digital Library integrated
articles learning
from journals, packages
magazines, on current
conference technical topics
proceedings, created
Special and
Interest
reviewed by expert ACM members. The Tech Pack core is an annotated bibliography of resources
Group newsletters, videos, etc. – and selections from our many online books and courses, as well an non- from the
renowned ACM where
ACM resources Digitalappropriate.
Library – articles from journals, magazines, conference proceedings, Special Interest
Group newsletters, videos, etc. – and selections from our many online books and courses, as well an non-
ACM resources where
BY BECOMING AN ACM appropriate.
MEMBER YOU RECEIVE:

Timely
BY accessAN
BECOMING toACMrelevant
MEMBER information
YOU RECEIVE:
Communications of the ACM magazine • ACM Tech Packs • TechNews email digest • Technical Interest Alerts and
Timely access• to
ACM Bulletins ACM relevant
journalsinformation
and magazines at member rates • full access to the acmqueue website for practi-
Communications
tioners • ACM SIG the ACM magazine
of conference discounts• ACM
• theTech PacksACM
optional • TechNews email digest • Technical Interest Alerts
Digital Library
and ACM Bulletins • ACM journals and magazines at member rates • full access to the acmqueue website for
practitioners
Resources that• ACM SIGenhance
will conference discounts
your career• and
the optional
follow youACM toDigital
newLibrary
positions
Career & Job Center • online books from Safari® featuring O’Reilly and Books24x7® • online courses in multiple
Resources
languages •that will
virtual enhance
labs your career
• e-mentoring servicesand follow you
• CareerNews emailtodigest
new positions
• access to ACM’s 34 Special Interest
Career
Groups&•Job Center • email
an acm.org The Learning
forwardingCenter • online
address withbooks
spamfrom Safari® featuring O’Reilly and Books24x7® •
filtering
online courses in multiple languages • virtual labs • e-mentoring services • CareerNews email digest • access to
ACM’s36
ACM’s worldwide network
Special Interest of more
Groups than
• an 97,000
acm.org members
email rangesaddress
forwarding from students to seasoned
with spam filtering professionals and
includes many renowned leaders in the field. ACM members get access to this network and the advantages that
come worldwide
ACM’s from their expertise
network of to more
keep you
thanat100,000
the forefront of the
members technology
ranges world. to seasoned professionals and
from students
includes many renowned leaders in the field. ACM members get access to this network and the advantages that
Pleasefrom
come taketheir
a moment
expertise to to
consider
keep youtheatvalue of an ACM
the forefront membership
of the your career and your future in the
technologyforworld.
dynamic computing profession.
Please take a moment to consider the value of an ACM membership for your career and your future in the
Sincerely,computing profession.
dynamic

Sincerely,

Alain Chesnais
President
Alain Chesnais
Association for Computing Machinery
President
Association for Computing Machinery

Advancing Computing as a Science & Profession


membership application &
Advancing Computing as a Science & Profession
digital library order form
Priority Code: AD10

You can join ACM in several easy ways:


Online Phone Fax
http://www.acm.org/join +1-800-342-6626 (US & Canada) +1-212-944-1318
+1-212-626-0500 (Global)
Or, complete this application and return with payment via postal mail

Special rates for residents of developing countries: Special rates for members of sister societies:
http://www.acm.org/membership/L2-3/ http://www.acm.org/membership/dues.html
Please print clearly
Purposes of ACM
ACM is dedicated to:
Name
1) advancing the art, science, engineering,
and application of information technology
2) fostering the open interchange of
Address information to serve both professionals and
the public
3) promoting the highest professional and
City State/Province Postal code/Zip ethics standards
I agree with the Purposes of ACM:
Country E-mail address

Signature

Area code & Daytime phone Fax Member number, if applicable ACM Code of Ethics:
http://www.acm.org/serving/ethics.html

choose one membership option:


PROFESSIONAL MEMBERSHIP: STUDENT MEMBERSHIP:
o ACM Professional Membership: $99 USD o ACM Student Membership: $19 USD

o ACM Professional Membership plus the ACM Digital Library: o ACM Student Membership plus the ACM Digital Library: $42 USD
$198 USD ($99 dues + $99 DL) o ACM Student Membership PLUS Print CACM Magazine: $42 USD
o ACM Digital Library: $99 USD (must be an ACM member) o ACM Student Membership w/Digital Library PLUS Print
CACM Magazine: $62 USD

All new ACM members will receive an payment:


ACM membership card. Payment must accompany application. If paying by check or
For more information, please visit us at www.acm.org money order, make payable to ACM, Inc. in US dollars or foreign
currency at current exchange rate.
Professional membership dues include $40 toward a subscription
to Communications of the ACM. Student membership dues include o Visa/MasterCard o American Express o Check/money order
$15 toward a subscription to XRDS. Member dues, subscriptions,
and optional contributions are tax-deductible under certain
o Professional Member Dues ($99 or $198) $ ______________________
circumstances. Please consult with your tax advisor.
o ACM Digital Library ($99) $ ______________________
RETURN COMPLETED APPLICATION TO:
o Student Member Dues ($19, $42, or $62) $ ______________________
Association for Computing Machinery, Inc.
General Post Office Total Amount Due $ ______________________
P.O. Box 30777
New York, NY 10087-0777

Questions? E-mail us at acmhelp@acm.org Card # Expiration date


Or call +1-800-342-6626 to speak to a live representative

Satisfaction Guaranteed! Signature


practice
doi:10.1145/1941487.1941505

Article development led by


queue.acm.org

Finding a lasting solution to the leap seconds


problem has become increasingly urgent.
By Poul-Henning Kamp

The One-
Second
War
T hanks to a secretive conspiracy working mostly population, sunrise, midday, and sun-
set were plenty precise for all relevant
below the public radar, your time of death may be a purposes.
minute later than presently expected. But don’t expect Timekeeping became a problem for
non-astronomers only when ships start-
to live any longer, unless you happen to be responsible ed to navigate where they could not see
for time synchronization in a large network of land. Finding your latitude is easy: mea-
computers, in which case this coup will lower your sure the height of the midday sun over
the horizon, look at the table in your al-
stress level a bit every other year or so. manac, done. Finding your longitude is
We’re talking about the abolishment of leap possible only if you know the time of day
precisely, and the sun will not tell you
seconds, a crude hack added 40 years ago to paper over that unless you know your longitude.
the fact that planets make lousy clocks compared with If you know your longitude, however,
quantum mechanical phenomena. the sun will tell you the time very pre-
cisely. Using that time, you can make
Timekeeping used to be astronomers’ work, and the tables of other nonsolar astronomical
trouble it caused was very academic. To the rural events—for example, the transits of the

44 commun ications of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


moons of Jupiter, which can then be transcontinental railroads, reduced cesium-133 atom. A new time scale was
used to estimate time from that longi- the number of necessary observatories created to count these seconds.
tude. to nearly nothing. Previously, every re- Civil time was still kept using a dif-
This is why Greenwich Observatory spectable city, with or without a univer- ferent and varying length of a second,
in the U.K. and the U.S. Naval Observato- sity, had somebody whose job it was to depending on what astronomers had
ry were funded by their respective admi- figure out proper time. With time zones measured the earth’s rotation to for
ralties. The British empire staked some and a telegraph, you could service all of each year.
money on this question, and while the the United States from the Naval Obser- Having variable-length seconds did
astronomers won on dirty play, the au- vatory. not work for anybody, not even the as-
dience vastly preferred John Harrison’s The next loss was the length a sec- tronomers, so in 1970 it was decided to
chronometers because you did not need ond, which astronomers had defined as use SI seconds and do full-second step
to see the transits of the moons of Jupi- “1/31,556,925.9747 of the tropical year adjustments—leap seconds—starting
Illust ratio n by Gary neill

ter to know what time it was. Harrison’s in 1900,” neither a very practical nor January 1, 1972.2 In practice, this works
chronometer just told you, any time you very reproducible definition. by astronomers sending the rest of the
wanted to know.4 Louis Essen’s atomic clock won that world a telegram twice a year to tell us
Ever since, astronomers have lost battle, and SI (International System of how long the last minute of June and
ground as “time lords.” Units) seconds became 9,192,631,770 December will be: 59, 60, or 61 seconds.
Time zones, made necessary by periods of hyperfine radiation from a There is a certain irony in the fact

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 45


practice

that the UTC (Universal Time Coordi- ure. Or it might do something entirely and all sorts of secret scientific broth-
nated) time scale depends on the rota- different. Some systems have resorted erhoods, from AAU to CCTF, have had
tion of one particular rock in the less to slowing down the clock by 1/3600th their chance to weigh in. Many have, but
fashionable western part of the galaxy. for the last hour before the leap second, few have clear-cut positions.
I am pretty sure that, should humans hoping that nobody notices that sec-
ever colonize other rocks, leap seconds onds suddenly are 277 microseconds What is the Problem
will not be in the luggage. long. with Leap Seconds?
That’s in theory. In practice it de- The problem is that more systems care
How Leap Seconds pends on the systems getting notice about time at the second level.
Became a Problem of the leap second and handling it as Air Traffic Control systems perform
Until the advent of big synchronized intended. In this context systems are anti-collision tests many times a second
networks of computers, leap seconds also the NTP servers from which the because a plane moves 300 meters in a
bothered nobody. Many computers rest of the computers get their time: at second. A one-second hiccup in input
used the frequency of the electrical grid the 2008 leap second, more than one in data from the radar is not trivial in a
to count time, and most had their time seven in the public NTP pool servers got tightly packed airspace around a major
initially set from somebody’s wrist- it wrong. airport.
watch. The number of people who ac- Medical products and semiconduc-
tually cared probably numbered fewer The Effort to “Fix” Leap Seconds tors are produced in time-critical pro-
than two dozen worldwide. By early 2005 when the first leap sec- cesses in complex continuous produc-
Therefore, Unix didn’t bother with ond in seven years finally began to look tion facilities. On December 8, 2010,
leap seconds. In the time _ t defini- likely, some people started to worry a 70-msec power glitch hit a Toshiba
tion from Unix, all minutes have 60 about a “Y2K-lite” event. Some bright flash chip manufacturing facility, and
seconds, all hours 3,600 seconds, and person inside the U.S. military-indus- 20% of the products scheduled to ship
all days 86,400 seconds. This defini- trial complex thought, “Wait a minute, in January and February 2011 had to
tion carried over to Posix and The Open why do we need leap seconds in the first be scrapped: “Once the line is stopped,
Group where it is presumably gold-plat- place?” and proposed to the ITU-R (In- we can’t just resume production,” said
ed for all eternity. ternational Telecommunication Union, Toshiba spokesman Hiroko Yamazaki.5
Then something shifted deep under Radiocommunication Sector) that they Technically, there is no problem with
the surface of the earth. We can only be abolished, preferably before Decem- leap seconds that we IT professionals
guess what it might have been, but there ber 2005. cannot tolerate. We just have to make
was no need for leap seconds for seven Nice try, but one should never under- sure that all computers know about
straight years: from the end of 1998 to estimate the paper tiger in a UN organi- leap seconds and that all programs, op-
the end of 2005. This was, more or less, zation. erating systems, and applications know
the time when the Internet happened The December 2005 leap second how to deal with them.
and everybody bought PCs with Win- came, Armageddon did not, but it was The first part of that problem is we
dows. Most of the people who hacked painfully obvious to everybody who have only six months to tell all comput-
Perl to implement the dot-com revolu- paid attention that there were massive ers and software about leap seconds,
tion had never heard of leap seconds. amounts of software that needed fixing, because that is all the warning we get
This is what Microsoft had to say on before leap seconds would not cause from the astronomers. In practice, we
the subject of leap seconds: “[...]after trouble. Even the HBG time signal from often have 10 months’ notice; for ex-
the leap second occurs, the NTP (Net- the Swiss time reference system did it ample, we were told on February 2 that
work Time Protocol) client that is run- wrong. there will be no leap second in Decem-
ning Windows Time service is one sec- Another leap second occurred in De- ber of this year.1
ond faster than the actual time.”3 cember 2008, and the situation had not Unfortunately, this advantage is ne-
Unix systems running NTP will pa- changed in any measurable way, but at gated by some time signals—for exam-
per over the leap second, but there is no least the Swiss got it right this time. ple, the DCF77 signal from Germany,
standard that says how this should be Since then the proposal, known to in- announcing the leap second only one
done. Your system might do one of the siders as TF.460-7, has been the subject hour ahead of time.
scenarios shown in the accompany fig- of “further study” in “Study Group 7A,” The other part of the problem—
changing time _ t to know about leap
Sensitivities in leap seconds. seconds—has nasty results: time is
suddenly not a fixed radix quantity any-
23:59:57 23:59:57 23:59:57 more. How much code finds the cur-
23:59:58 23:59:58 23:59:58 rent day by d = t/86400 or tests if two
23:59:59 23:59:59 23:59:59 events are further apart than a minute
23:59:59 00:00:00 (halt for 1 sec) by if (t1 >= t2 + 60)? Nobody
00:00:00 00:00:00 00:00:00 knows. How much of such code needs
00:00:01 00:00:01 00:00:00 to be fixed if we change the time _ t
definition? Nobody knows.
The Y2K experience indicates it

46 commun ic ations of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


practice

would be expensive to find out, because noon on the clock will be midnight in
relative to Y2K, the questions are a lot the sky some 3,000 years from now, un-
harder than “2 digits or 4 digits.” less we fix that by adjusting our time
How do we tell if code that does s += zones.
3600 intends this to mean “one hour
from now” or “same time, next hour?” There is no Actually, the sun is not due south at
noon, and certainly not with a second’s
The original programmer did not ex-
pect there to be any difference, so the
problem with leap precision, for more than an infinitesi-
mal number of people who are probably
documentation will not tell us. seconds that we totally unaware of it. Our system of one-

The Cost of Uncertainty


IT professionals hour-wide time zones means that only
those who live exactly on a longitude
The next time Bulletin C tells us to insert cannot tolerate. We divisible by 15 have the chance, pro-
a leap second, probably in 2012, a lot of
people will have to kick into action. Any
just have to make vided that their governments have not
put them in a different time zone. For
critical bits installed since December sure all computers example, all of China is one time zone,
2008 and any bits older than that that
failed to “do the right thing” with the know about leap despite the 75–120E span of longitude.
Of the remaining few lucky people,
December 2008 leap second will need to
be pondered, and a plan made for what
seconds and that many are out of luck during the part of

to do: test, fix, hope, or shut down. all programs, the year when their government has de-
cided to have daylight saving time—al-
Unsurprisingly, many plants and
systems simply give up trying to predict
operating systems, though that could possibly put a select
few of those who lost on the first crite-
what their multivendor heterogeneous and applications rion back in luck during that part of the
systems will do with a leap second,
and they sidestep the issue by moving
know how to deal year. Finally, it is really only a couple of
times a year that the sun is precisely due
or scheduling planned maintenance with them. south, for interesting orbital and geo-
downtime to cover the leap second. physical reasons.
For them, that is the cheapest way to The people who really do care about
make sure that no robot arms get out of UTC time being synchronized to earth
sync with the assembly line and that no rotation are those who use UTC time as
space-shuttle computers hiccup while an estimator for earth rotation: those
in space. who point things on earth at things in
I’m told from usually reliable sourc- the sky—in other words, astronomers
es that the entire U.S. nuclear deterrent and their telescopes, and satellite op-
is in “a special mode” for one hour on erators and their antennae. Actually,
either side of a leap second and that the that should more accurately be some
cost runs into “two-digit million dol- of those people: many of them have
lars.” long since given up on using UTC as an
earth rotation estimator, because the +/-
But What Do Leap Seconds 1-second tolerance is not sufficient for
Actually Do? their needs. Instead, they pick up Bul-
Leap seconds make sure the sun is due letin A or B from the IERS FTP server,
south at noon by adjusting noon to hap- which gives daily values with microsec-
pen when the sun is due south at the ref- ond precision.
erence location. This very important job
is handled by the International Earth The Cost-Benefit Equation
Rotation Service (IERS). Most of those involved on the “Abolish
Leap seconds are not a viable long- Leap Seconds” side of the debate claim
term solution because the earth’s rota- a cost-benefit equation that essentially
tion is not constant: tides and internal says: “cost of fixing all computers to
friction cause the planet to lose mo- deal correctly with leap seconds = infini-
mentum and slow down the rotation, ty” over “benefits of leap seconds = next
leading to a quadratic difference be- to nothing.” QED: case closed.
tween earth rotation and atomic time. The vocal leaders of the “Preserve
In the next century we will need a leap the Leap Seconds” campaign (not to
second every year, often twice every year; be confused with the “Campaign for
and 2,500 years from now we will need a Real Time”) have a different take on
leap second every month. the equation: “cost of unknown conse-
On the other hand, if we stop plug- quences of decoupling civil time from
ging leap seconds into our time scale, earth rotation = [a lot...infinity]” over

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 47


practice

“programmers should fix their past mis- ITU-R in January 2012, and if it, modulo the entire plane off and on again before
takes for free.” QED: case closed. amendments, collects a supermajority we can start all the motors.”
Not a lot of common ground there, of 70% of the votes, leap seconds would As a time-nut, a small and crazy fra-
and not a lot of data supporting either cease beginning in approximately 2018. ternity that thinks running an atomic
proposition, although Y2K experience, If the proposal fails to gain 70% of the clock in your basement is a require-
as well as the principles of a capitalist votes, then leap seconds will continue, ment for a good life (let me know if
economy, dictate that getting program- and we had better start fixing comput- you need a copy of my 400GB record-
mers to handle leap seconds correctly ers to deal properly, or at least more pre- ing of the European VLF spectrum
will be expensive. dictably, with them. during a leap second…), I would miss
As I understand the voting rules of leap seconds. They are quaint and
A Possible Compromise? ITU-R, only country representatives can interesting, and their present rate of
Warner Losh, a fellow time-and-com- vote, one vote per country. If my experi- one every couple of years makes for
puter nerd, and I both have extensive ence is anything to go by, finding out a wonderful chance to inspire young
hands-on experience with leap-second who votes on behalf of your country nerds with tales of wonders in physics
handling in critical systems, and we and how they intend to vote may not be and geophysics.
have tried to suggest a compromise on immediately obvious to the casually in- But once every couple of years is not
leap seconds that would vastly reduce quiring citizen. nearly often enough to ensure that IT
the costs and risks involved: schedule systems handle them correctly.
the darn things 20 years in advance in- The Philosophical Issues I wish we could somehow get the
stead of only six months in advance. One of my Jewish friends explained to 20-year horizon compromise on the ta-
If we know when leap seconds are to me that all the rules Jews must follow ble next January, but failing that, if the
occur 20 years in advance, we can code are not meant to make sense; they are choice is only between keeping leap sec-
them into tables in our operating sys- meant to make life so difficult that you onds or abolishing leap seconds, they
tems, and suddenly 99.9% of our com- never take it for granted. In the same will have to go—before they kill some-
puters will do the right thing when leap spirit, Van Halen used brown M&Ms to body through bad standards writing
seconds happen, because they know test for lack of attention, and I use leap and bad programming.
when they will happen. The remaining seconds: if a system has not document-
0.1% of the systems, involving ready, ed and tested what happens on leap
cold spares on shelves, autonomous seconds, I don’t trust it to get anything Related articles
on queue.acm.org
computers on the South Pole, and else right, either.
similar systems, get 20 years to update But Linus Torvalds’ observation Principles of Robust Timing
stored tables rather than six months to over the Internet
that “95% of all programmers think
Julien Ridoux, Darryl Veitch
do so. they are in the top 5%, and the rest are http://queue.acm.org/detail.cfm?id=1773943
The astronomical flip side of this certain they are above average” should
You Don’t Know Jack about
proposal is that the difference between not be taken lightly: very few program- Network Performance
earth rotation and UTC time would like- mers have any idea what the difference Kevin Fall, Steve McCanne
ly exceed the current one-second toler- is between “wall-clock time” and “in- http://queue.acm.org/detail.cfm?id=1066069
ance limit, at least until geophysicists terval time,” and leap seconds are way Fighting Physics: A Tough Battle
get a better understanding of the cur- past rocket science for them. (For ex- Jonathan M. Smith
rently not understood fluctuations in ample, Posix defines only a pthread _ http://queue.acm.org/detail.cfm?id=1530063
earth rotation. cond _ timedwait(), which takes
The IT flip side is that we would still wall-clock time but not an interval-time References
have a variable radix time scale: most version of the call.) 1. International Earth Rotation and Reference Systems
Service. Information on UTC-TAI; http://data.iers.org/
minutes would be 60 seconds, but a few When a large fraction of the world products/16/14433/orig/bulletinc-041.txt.
would be 61 seconds, and code that re- economy is run by the creations of lousy 2. International Earth Rotation and Reference Systems
Service. Relationship between TAI and UTC; http://
ally cares about time intervals would programmers, and when embedded hpiers.obspm.fr/eop-pc/earthor/utc/TAI-UTC_tab.
have to do the right thing instead of just systems are increasingly capable of kill- html.
3. Microsoft. How the Windows Time service treats a
adding 86,400 seconds per day. ing people, do we raise the bar and de- leap second (2006). (November 1); http://support.
So far, nobody has tried, or if they mand that programmers pay attention microsoft.com/kb/909614.
4. Sobel, D. Longitude. Walker and Company, 2005.
tried, they failed to inject this idea into to pointless details such as leap sec- 5. Williams, M. Power glitch hits Toshiba’s flash memory
the official standards process in ITU-R. onds, or do we remove leap seconds? production line. ComputerWorld (Dec. 2010); http://
www.computerworld.com/s/article/9200738/Power_
It is not clear to me that it would even be As an old-timer in the IT business, glitch_hits_Toshiba_s_flash_memory_production_line.
possible to inject this idea unless a na- I’m firmly for the first option: we should
tional government, seconded by anoth- always strive to do things better, and do Poul-Henning Kamp (phk@FreeBSD.org) has
er, officially raises it at the ITU plenary them right, and pointless details makes programmed computers for 26 years and is the inspiration
behind bikeshed.org. His software has been widely
assembly. for good checkboxes. As a frequent user adopted as “under the hood” building blocks in both open
of technological marvels built by the source and commercial products. His most recent project
is the Varnish HTTP accelerator, which is used to speed up
What Happens Next? lowest bidder, however, the second op- large Web sites such as Facebook.
Proposal TF-460-7 to abolish leap sec- tion is not unattractive—particularly
onds will come up for plenary vote at the when the pilots tell us they “have to turn © 2011 ACM 0001-0782/11/05 $10.00

48 commun ic ations of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


doi:10.1145/1941487 . 1 9 4 1 5 0 4

Article development led by


queue.acm.org

Web apps are cheaper to develop and


deploy than native apps, but can they match
the native user experience?
By Andre Charland and Brian LeRoux

Mobile
Application
Development:
Web vs. Native
years ago, most mobile devices were, for
A f ew s h o r t
want of a better word, “dumb.” Sure, there were some
early smartphones, but they were either entirely email
focused or lacked sophisticated touch screens that
could be used without a stylus. Even fewer shipped
with a decent mobile browser capable of displaying

anything more than simple text, links, There are two problems with this
and maybe an image. This meant if line of thinking. First, building a differ-
you had one of these devices, you were ent app for each platform is very expen-
either a businessperson addicted to sive if written in each native language.
email or an alpha geek hoping that this An indie game developer or startup
would be the year of the smartphone. may be able to support just one device,
Then Apple changed everything with likely the iPhone, but an IT department
the release of the iPhone, and our ex- will have to support the devices that its
pectations for mobile experiences were users have that may not always be the
completely reset. latest and greatest. Second, the perfor-
The original plan for third-party mance argument that native apps are
iPhone apps was to use open Web tech- faster may apply to 3D games or image-
nology. Apple even released tooling processing apps, but there is a negligi-
for this in its Dashcode project.4 Fast- ble or unnoticeable performance pen-
forward three years and native apps are alty in a well-built business application
all the rage, and—usually for perfor- using Web technology.
mance reasons—the mobile Web is be- For its part, Google is betting on
ing unfavorably compared. Web technology to solve the platform

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 49


practice

fragmentation. Vic Gundotra, VP of supports. PhoneGap is an open source common user-interface controls and
engineering at Google, claimed that framework that provides developers experiences. No two platforms have the
“even Google was not rich enough to with an environment where they can same, or even similar, user-interface
support all of the different mobile plat- create apps in HTML, CSS, and JavaS- paradigms, let alone APIs to instanti-
forms from Apple’s App Store to those cript and still call native device fea- ate and access them. The Web plat-
of the BlackBerry, Windows Mobile, tures and sensors via a common JS API. form is consistent, for the most part,
Android, and the many variations of The PhoneGap framework contains but the number of built-in or SDK-
the Nokia platform,”6 and this was be- the native-code pieces to interact with included controls is limited. You have
fore HP webOS, MeeGo, and other plat- the underlying operating system and to roll your own. Sometimes the differ-
forms emerged. pass information back to the JavaScript ences among browsers can cause pain,
In this article we discuss some of app running in the Webview container. but—at least in the modern smart-
the strengths and weaknesses of both Today there is support for geolocation, phone world—most devices sport the
Web and native approaches, with spe- accelerometer, and more. very capable WebKit rendering engine,
cial attention to areas where the gap is What is native code exactly? Usually and only small differences prevail.
closing between Web technologies and it’s compiled, which is faster than in- Unfortunately for the Web, those
their native counterparts. terpreted languages such as JavaScript. small differences are becoming a big
Webviews and browsers use HTML and deal. For example, on iOS, the CSS posi-
Native Code vs. Web Code CSS to create user interfaces with vary- tion property does not properly support
Implementing a software app begins ing degrees of capability and success. a value of “fixed.” (This was a problem
with code. In the case of native code, With native code, we paint pixels di- in Android, but has been corrected in
most often these days the developer rectly on a screen through proprietary the latest Android 2.2 code.) BlackBerry
typically writes in a C dialect, as in the APIs and abstractions for common operating systems earlier than version
case of the iPhone. In our work at Nitobi user-interface elements and controls. 6.0 sport a completely arcane browser
(http://nitobi.com/) and on PhoneGap In short, we’re pitting JavaScript for which there has been much suffer-
(http://www.phonegap.com/), we have against compiled languages. These ing and toil at unfathomable cost to
had plenty of experience wrestling with days, JavaScript is holding its own. Web developer sanity. Fortunately, RIM
the various mobile platforms from a This isn’t surprising—JavaScript virtu- has addressed a lot of this in 6.0, and in
native development perspective. al machine technology is the new front general, things are getting better.
Of course, for various market or or- line for the browser wars. Microsoft, Some operating systems include
ganizational reasons most developers Google, Apple, Opera, and Mozilla are something called hardware accelera-
or teams must support apps on mul- all iterating furiously to outperform tion. The iOS stack famously supports
tiple smart platforms. Want to write an competing implementations.5 Right this concept in CSS transforms, which
app in native code and hit every single now, by some benchmarks (http:// is how some Web frameworks achieve
mobile operating system? No problem arewefastyet.com/), Mozilla’s Spider- silky smooth transitions between view
if your team has the skill sets shown in Monkey is closing in on Google’s V8 states. It’s a technique first uncovered
the accompanying table. engine. JavaScriptCore by Apple, found in Dashcode. It was painstakingly re-
What makes things even more com- in most WebKit browsers (which is on verse engineered by David Kaneda,
plicated are the differences among the most mobile devices), is somewhere pioneered in jQTouch (http://jqtouch.
actual platform SDKs (software devel- in-between. The bottom line is that com/), and released later in Sencha
opment kits). There are different tools, heavy spending by all the major play- Touch (http://www.sencha.com/). Both
build systems, APIs, and devices with ers is fueling this JavaScript arms race. are incredible Web projects and exam-
different capabilities for each plat- The benchmark by Ars Technica shown ples of what can be done when develop-
form. In fact, the only thing these oper- in Figure 1 is an example of how these ers push the boundaries.
ating systems have in common is that companies are marketing themselves. When we first started tapping into
they all ship with a mobile browser that JavaScript is rapidly getting faster— these next-generation mobile brows-
is accessible programmatically from so fast, in fact, that HP Palm webOS ers, no framework worked properly
the native code. 2.0 rewrote its services layer from Java across devices. Today there are more
Each platform allows us to instan- to the extremely popular node.js plat- than 20 mobile frameworks, and sup-
tiate a browser instance, chromeless, form (http://nodejs.org/), which is built port is being rapidly added to existing
and interact with its JavaScript inter- on Google’s V8 engine to obtain better DOM (Document Object Model) librar-
face from native code. From within performance at a lower CPU cost (and ies—not the least of which is John Re-
that Webview we can call native code therefore longer battery life). The trend sig’s jQuery (http://jquery.com/) and
from JavaScript. This is the hack that we’re seeing is the Web technology jQuery Mobile (http://jquerymobile.
became known as the PhoneGap tech- stack running at a low level, and it’s in com/); that code is improving and add-
nique pioneered by Eric Oesterle, Rob production today on millions of devices. ing support for more devices every day.
Ellis, and Brock Whitten for the first With tools like these, it’s getting easier
iPhone OS SDK at iPhoneDevCamp in User Interface Code and easier to support multiple targets
2008. This approach was later ported Things aren’t as pretty when it comes from a single Web-oriented code base.
to Android, BlackBerry, and then to to the user interface. Most native plat- Rapid execution and beautiful user
the rest of the platforms PhoneGap forms have wonderful abstractions for interfaces aren’t the whole story when

50 commun ic ations of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


practice

contrasting the Web technology stack integration with platform features such capability (processing power, storage,
to native code. Web technology lives as accelerometer data or notifications. antennae, and so on.).
in a sandbox, which is also a jail from The context in which your applica- The combination of these properties
lower-level APIs that native code can tion will be used affects users’ expec- greatly impacts how your application
access—APIs that can access device tations. The context for a single appli- will appear, and the range of possible
storage, sensors, and data. But this cation may be radically different from ways the user might choose to inter-
gap is being bridged, too. Most mobile one user to the next, even on a single act with it. If a particular combination
browsers support geolocation today, platform. We’re not really talking doesn’t exist today, it very well could to-
for example, and iOS recently added about a context; we’re actually talking morrow. A successful application must
Accelerometer and a slew of other about multiple contexts. Let’s look at account for the habits associated with
HTML5 APIs. Given that the W3C has the things that define the contexts to all of these hardware devices.
a Device API Working Group (http:// which a successful mobile application Platform conventions. Each plat-
www.w3.org/2009/dap/), it’s likely we must adapt. form has its own user-interface conven-
will be seeing many more APIs reach Hardware. The Android device eco- tions, typically described in a human
the browser in the near future. If the system (Figure 2) is a fantastic example interface guideline doc and evidenced
near future isn’t soon enough, you can of this variety of contexts, with devices in the operating-system interface. The
use PhoneGap (http://docs.phonegap. varying significantly in terms of dis- variety of mobile Web browsers pro-
com/) to access these APIs today. play (physical size, color depth, screen vides a prime example of how different
Of course, the Web technology stack resolution, pixel density, aspect ratio); these conventions can be:
(HTML/CSS/JS) is itself implemented input (trackball, touchscreen, physical A common user expectation is the
in native code. The distance between keyboard, microphone, camera); and ability to “go back” in the browser. iOS
the native layer and the browser is just
one compile away. In other words, if Required skill sets for nine mobile OSs.
you want to add a native capability to
a browser, then you can either bridge
it or recompile the browser to achieve Mobile OS Type Skill Set Required
that capability. If a browser does not sup- Apple iOS C, Objective C
port a native capability, it’s not because Google Android Java (Harmony flavored, Dalvik VM)
it can’t or that it won’t; it just means it RIM BlackBerry Java ( J2ME flavored)
hasn’t been done yet. Symbian C, C++, Python, HTML/CSS/JS
Windows Mobile .NET
User Experience: Window 7 Phone .NET
Context vs. Implementation HP Palm webOS HTML/CSS/JS
Another area that has a big effect on MeeGo C, C++, HTML/CSS/JS
both native and Web mobile applica- Samsung bada C++
tion development is user experience,
the term we use for the overall experi-
ence a user has with a software applica-
tion. User experience can even extend
outside the app. For example, we can Figure 1. JavaScript performance: Android 2.2 vs. iOS 4.
use push notifications to wake up an
application under certain conditions,
SunSpider V8
such as a location change, or to spawn Milliseconds (lower is better) (Higher is better)
a new purpose-built application to
handle different application aspects.
Obviously, a successful user experi-
ence is crucial for successful applica- iOS 4 on iOS 4 on 67
tion adoption. iPhone 4 iPhone 4
Generally speaking, a mobile soft-
ware project user experience can be di-
vided into two primary categories:
˲˲ The context—elements that must
be understood but cannot be changed
or controlled. These include hardware Android 2.2 on 5,795.2 287
affordances, platform capabilities and Nexus One
UI conventions, and the environment
in which your application is used.
˲˲ The implementation—elements
that can be controlled in an applica- Source: Ars Technica
tion, such as performance, design, and

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 51


practice

satisfies this with a virtual button; An- Is the user standing or sitting? Stand- tify performance? Latency is a form of
droid and BlackBerry devices rely on a ing still or in motion? One or two performance. Execution, the time an
physical hardware back button; webOS hands free? In a busy place? The vari- operation takes to perform, is another.
uses a back button and a back gesture. ables are endless. We’ll address these separately.
Whatever the method, users expect Where does that leave us? Expecta- Latency is a huge consideration
that they will be able to “go back” in tions borne out of the context are not in the mobile world. Be it a native or
your application. inherently cross platform. Both native a Web application, there is a perfor-
Users also expect context menus. and Web implementations must pro- mance penalty to downloading an app
In the default Android and BlackBerry vide designs and code that support and the data it consumes or publishes
browser, the context menu is accessed these expectations. The good news for through the network. Obviously, the
through a physical button found at the Web developers is that they can fall smaller the payload, the faster the app.
bottom of the screen, close to the natu- back on a familiar paradigm in the Using JavaScript Object Notation
ral position of the thumbs. On iOS and Web technology stack to satisfy user (JSON)-formatted data is a good idea as
webOS the context menu is accessed expectations. it tends to result in a smaller data pay-
through a persistent virtual tab bar po- Implementation. To produce the load compared with an equivalent XML
sitioned close to the thumb at the bot- best possible user experience, imple- payload, depending on how the XML
tom of the screen. The persistent tab mentations must deliver designs and is formatted. On the other hand, XML
bar at the bottom of the screen on de- code that support expectations set out data can make sense when returning
vices other than iOS and webOs often by a user’s particular context. HTML fragments that are to be inserted
produces a poor experience because into a Web page rather than returning
users can easily accidentally hit their Performance: The Hobgoblin JSON-formatted data that, while small-
context menu or back buttons, causing of Software Development er over the wire, needs to be converted
an app to close unexpectedly. These are Without a doubt, performance is a cor- to an HTML fragment using JavaScript.
limitations with which both native and nerstone of a great user experience. Your mileage will vary. Benchmarking
Web apps must contend. Like security, it is the most misunder- is the only way to know for sure.
Developers must consider ap- stood and oft-used scapegoat of the Another latency issue can be the ini-
proaches that make good sense for software developer. It’s not uncom- tialization of code. Once we actually get
both data and users. HTML5 does sup- mon to hear developers reject ideas the code into memory, it still needs to
port the concept of a menu element with a flippant, “We can’t do that, it be parsed. There can be a noticeable
so a common abstraction is possible will negatively impact performance.” performance penalty in this process.
here, but the work has yet to be done. Rarely quantified and frequently cited, We can fake it and enhance the percep-
Environment is the greatest wild performance is the hobgoblin of soft- tion of performance with determinate
card of all! Is it daytime or nighttime? ware development. How do we quan- or indeterminate progress indicators.
Execution time is, of course, a key
facet of performance. When interpret-
ing code (as we do for the Web with Ja-
vaScript), the more there is to interpret,
the longer the execution time. Here the
Web technology stack has some catch-
ing up to do. JavaScript, for all its leaps
in performance, is still slower than na-
tive counterparts. On the other hand,
the time it takes a programmer to write
comparable logic in a native compiled
Figure 2. Variety of contexts across Android devices. language on multiple mobile devices
may be worth the time penalty for ex-
ecution; however, this will certainly
require more maintenance than one
code base written in JavaScript that can
run on multiple devices, maybe some
tweaks per platform. Less code often
leads to less and easier maintenance.
That said, the benefit of less code
doesn’t matter to the end user, who
expects a responsive interface. The de-
veloper tradeoff is a larger code base—
often vastly larger, considering support
for multiple native platforms. In the
world of native code, the main chal-
Figure 3. The variety of mobile Web browsers. lenge is reimplementing to multiple

52 communicat ions of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


practice

targets. In the world of the Web, the Lovely Bounces and bate based on an application’s primary
main challenge is limiting your foot- Beautiful Design objectives, development and business
print as much as possible to produce a Of course, beautiful design matters. realities, and the opportunities the
responsive user experience. That’s not From aesthetics to intangibles such as Web will provide in the not-so-distant
to say that one user interface can suf- the structure of a good program, soft- future. The good news is that until all
fice in all environments, rather that the ware designers must commit to great of this technology makes it into the
majority of the application logic is in design and to building on solid practic- browser, hacks such as PhoneGap can
one code base and then specific device- es already in place. Scrolling via kinetic help bridge the divide. I encourage de-
specific UI idioms can be implemented physics, lovely bounces, easing, and so velopers not simply to identify software
with conditional code. You therefore forth create reactive interfaces that feel development trends but to implement
might want to implement slightly dif- real and are a delight to use. This is an them! If the Web doesn’t fulfill a capa-
ferent functionality and user experienc- area where native controls are particu- bility your particular application re-
es appropriate to the expectations of larly good. quires, you’re presented with an excit-
the users of a particular device. For ex- We have yet to solve the problem ing opportunity to contribute and close
ample, Android and BlackBerry devices of native scrolling satisfactorily with the Web/native chasm in the process.
have physical back and menu buttons, Web technology.1 There have been
whereas an iOS device does not. many attempts: iScroll (http://cubiq.
Another key point to remember is org/iscroll), TouchScroll (http://uxebu. Related articles
that even though the mobile industry com/blog/2010/04/27/touchscroll-a- on queue.acm.org
is quickly converging on WebKit as the scrolling-layer-for-webkit-mobile/), Case Study: UX Design
de facto standard for HTML render- GloveBox (https://github.com/purple- and Agile: A Natural Fit?
http://queue.acm.org/detail.cfm?id=1891739
ing engines, every device and operat- cabbage/GloveBox), Sencha (http://
ing system has a slightly different fla- www.sencha.com/), and jQuery Mobile Enterprise-Grade Wireless
vor of WebKit. This means you should (http://jquerymobile.com/). All of these Bruce Zenel and Andrew Toy
http://queue.acm.org/detail.cfm?id=1066065
expect development to be similar to address the scrolling issue but do not
cross-browser Web development today. solve it as well as a native device. Even Energy Management on Handheld Devices
Marc A Viredaz, Lawrence S. Brakmo,
Thankfully, there are many libraries such the Google mobile team is working on William R. Hamburgen
as jQuery Mobile, Sencha Touch, and releasing a solution for this problem.3 http://queue.acm.org/detail.cfm?id=957768
SproutCore that seek to address this. Without a doubt, this is the most com-
All of this discussion of latency mon complaint the PhoneGap team
References
and execution of code means taking hears, but we’re one bug fix in WebKit 1. Ecker, C. Ars iPad application redux: where we’re going,
a tough look at the business goals of away from it being a nonissue. The 2010; http://arstechnica.com/apple/news/2010/11/ars-
application-redux-where-were-going.ars.
your application development initia- Google Mobile team has recently re- 2. Fioravanti, R. Implementing a fixed-position iOS Web
tive. Favoring data over decor is the leased its solution and code for Web- application, 2010; http://code.google.com/mobile/
articles/webapp_fixed_ui.html.
most pragmatic approach. Gradients, Kit-based browsers and platforms.2 3. Google Mail Blog. Gmail in Mobile Safari; now even
drop shadows, bevels, embossing, Here’s the rundown. The Web tech- more like a native app, 2010; http://googlemobile.
blogspot.com/2010/10/gmail-in-mobile-safari-now-
highlights, rounded corners, and Per- nology stack has not achieved the level even-more.html.
lin noise do not make an application of performance we can attain with na- 4. Lee, W-M. Build Web apps for iPhone using Dashcode,
2009; http://mobiforge.com/developing/story/build-
useful or usable—they don’t fulfill a tive code, but it’s getting close. We’re web-apps-iphone-using-dashcode.
business requirement—but they do confident that Web technologies will 5. MSDN, IEBlog. HTML5, and real-world site
performance: Seventh IE9 platform preview available
impact performance. CSS gradients, become indistinguishable from native for developers, 2010; http://blogs.msdn.com/b/ie/
archive/2010/11/17/html5-and-real-world-site-
in particular, are real devils for perfor- experiences. In the meantime, Web de- performance-seventh-ie9-platform-preview-available-
mance in the mobile world. You need velopers must focus on delivering data for-developers.aspx.
6. Nuttall, C. App stores are not the future, says
to decide what your objective is: look- while working diligently on improving Google. FT Tech Hub, 2009; http://blogs.ft.com/
ing neat or providing a useful interface the decor. fttechhub/2009/07/app-stores-are-not-the-future-
says-google.
for data publishing and acquisition.
You win some of these capabilities on Looking to the Future
Andre Charland is the co-founder and CEO at Nitobi
some platforms with optimized (often As much as native and Web are pitted Inc. He’s been at the forefront of Web 2.0 software
hardware-accelerated) pixel painting against one another in this debate, development for almost a decade and is an expert on the
next-generation Web. He is an advocate for usability and
with native code. It’s not that these the likely outcome is a hybrid solu- user experience and speaks regularly about how to keep
effects are impossible to achieve, but tion. Perhaps we’ll see computing as users engaged and active on Web sites or Web-based
application. He is the co-author of Enterprise Ajax (Prentice
they should be used judiciously and inherently networked and (this is my Hall) and lead blogger for O’Reilly’s InsideRIA.com.
only when they enhance and do not sincere hope) free for anyone to access.
Brian LeRoux is the lead architect at Nitobi Software
distract from the user experience. It is We already see signs of a native Web: with the prestigious title SPACELORD. He also has the
possible to deliver a great user experi- WebGL recently proved that in-browser dubious distinction of being the creator of wtfjs.com
and crockfordfacts.com. He is also responsible for leading
ence that succeeds in the market; it 3D gaming is possible, even running the direction on the PhoneGap free software project
just requires proper mobile Web devel- Quake III (http://media.tojicode.com/ that has the ambitious goal to provide a Web platform
complete with Device APIs for nearly all smartphone
opment techniques and good user-ex- q3bsp/)! operating systems.
perience skills that take into account In the meantime, software makers
the constraints of the environment. must balance the Web-vs.-native de- © 2011 ACM 0001-0782/11/05 $10.00

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 53


practice
doi:10.1145/1941487.1941503
get in touch with the team to address
Article development led by
queue.acm.org
them, privately. The security errors
were serious enough to jeopardize the
goals of the project.
A Ruby on Rails app highlights some serious, This article describes the mistakes
yet easily avoided, security vulnerabilities. that compromised the security of the
Diaspora developer preview. Avoiding
by Patrick McKenzie such mistakes via better security prac-
tices and better choice of defaults will

Weapons
make applications more secure.
Diaspora is written against Ruby
on Rails 3.0, a popular modern Web
framework. Most Rails applications

of Mass
run as very long-lived processes within
a specialized Web server such as Mon-
grel or Thin. Since Rails is not thread-
safe, typically several processes will

Assignment
run in parallel on a machine, behind a
threaded Web server such as Apache or
nginx. These servers serve requests for
static assets directly and proxy dynam-
ic requests to the Rails instances.
Architecturally, Diaspora is de-
signed as a federated Web applica-
tion, with user accounts (seeds) col-
lected into separately operated services
(pods), in a manner similar to email
accounts on separate mail servers. The
In May 2010 , during a news cycle dominated by users’ primary way end users access their Di-
widespread disgust with Facebook privacy policies, aspora accounts is through a Web in-
terface. Pods communicate with each
a team of four students from New York University other using encrypted XML messages.
published a request for $10,000 in donations to build Unlike most Rails applications,
Diaspora does not use a traditional
a privacy-aware Facebook alternative. The software, database for persistence. Instead, it
Diaspora, would allow users to host their own social uses the MongoMapper ORM (object-
networks and own their own data. The team promised relational mapping) to interface with
MongoDB, which its makers describe
to open-source all the code they wrote, guaranteeing as a “document-oriented database”
the privacy and security of users’ data by exposing the that “bridges the gap between key/
value stores and traditional relational
code to public scrutiny. With the help of front-page databases.” MongoDB is an example of
coverage from the New York Times, the team ended what are now popularly called NoSQL
up raising more than $200,000. They anticipated databases.
While Diaspora’s architecture is
launching the service to end users in October 2010. somewhat exotic, the problems with
On September 15, Diaspora (https://joindiaspora. the developer preview release stemmed
from very prosaic sources.
com/) released a “pre-alpha developer preview” of its
source code (https://github.com/diaspora/diaspora). Security in Ruby on Rails
I took a look at it, mostly out of curiosity, and was Web application security is a very broad
and deep topic, and is treated in detail in
struck by numerous severe security errors. I spent the the official Rails security guide (http://
next day digging through the code locally and trying to guides.rubyonrails.org/security.html)

54 communications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


and the Open Web Application Security lic repository on GitHub and created a #photos _ controller.rb
Project (OWASP) list of Web applica- tag so that this code can be examined: def destroy
tion vulnerabilities (http://www.owasp. https://github.com/patio11/diaspora/ @album = Album.find _ by _ id
org/index.php/Top_10_2007), which tree/diaspora_launch) were reported to params[:id]
would have helped catch all of the is- the Diaspora team immediately upon # No authorization check.
sues discussed in this article. While discovery, and have been reported by @album.destroy
Web application security might seem the team as fixed. flash[:notice] = “Album
overwhelming, the errors discussed #{@album.name} deleted.”
here are elementary and can serve as an Authentication ≠ Authorization: respond _ with :location =>
object lesson for those building public- The User Cannot Be Trusted albums _ url
facing software. The basic pattern in the following end
A cursory analysis of the source code code was repeated several times in Di-
of the Diaspora prerelease revealed on aspora’s code base: security-sensitive For example, if you were logged in
Illust ratio n by Sergio Albi ac

the order of a half-dozen critical errors, actions on the server used parameters to a Diaspora seed and knew the ID
affecting nearly every class in the sys- from the HTTP request to identify of any photo on the pod, changing
tem. There were three main genres, de- pieces of data they were to operate on, the URL of any destroy action visible
tailed below. All code samples pulled without checking that the logged-in to include the ID of any other user’s
from Diaspora’s source at launch user was actually authorized to view or photo would let you delete that second
(note: I have forked the Diaspora pub- operate on that data. photo. Rails makes such exploits very

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he ac m 55
practice

easy, since URLs to actions are trivially of how associations scope to the human being, as opposed to the login
easy to guess, and object IDs “leak” all user _ id). This will instantly gener- associated with one email address
over the place. Do not assume than an ate an ActiveRecord exception, stop- (the User). Calling something up-
object ID is private. ping any potential nastiness before it date _ profile when it is really up-
Diaspora, of course, does attempt starts. date _ person is a good way to hide
to check credentials. It uses Devise, a the security implications of such code
library that handles authentication, to Mass Assignment from a reviewer. Developers should be
verify that you get to the destroy action Will Ruin Your Day careful to name things correctly.
only if you are logged in. As shown in We have learned that if we forget au- This means that by changing a Per-
the previous code example, however, thorization, then a malicious user can son’s owner _ id, one can reassign
Devise does not handle authoriza- do arbitrary bad things to people. In the Person from one account (User)
tion—checking to see that you are, in the example in Figure 1, since the user to another, allowing one not only to
fact, permitted to do the action you update method is insecure, an attack- deny arbitrary victims their use of the
are trying to do. er could meddle with their profiles. service, but also to take over their ac-
Impact. When Diaspora shipped, But is that all we can do? counts. This allows the attacker to
an attacker with a free account on any Unseasoned developers might as- impersonate them, access their data
Diaspora node had, essentially, full sume that an update method can only at will, and so on. This works because
access to any feature of the software update things on the Web form prior the “one” method in MongoDB picks
vis-à-vis someone else’s account. That to it. For example, the form shown in the first matching entry in the DB it
is quite a serious vulnerability, but it Figure 2 is fairly benign, so one might can find, meaning that if two Persons
combines with other vulnerabilities in think that all someone can do with have the same owner _ id, the own-
the system to allow attackers to com- this bug is deface the user’s profile ing User will nondeterministically
mit more subtle and far-reaching at- name and email address: control one of them. This lets the at-
tacks than merely deleting photos. This is dangerously wrong. tacker assign your Person#owner _
How to avoid this scenario. Check Rails by default uses something id to be his #owner _ id, which gives
authorization prior to sensitive ac- called mass update, where update _ the attacker a 50-50 shot at gaining
tions. The easiest way to do this (aside attributes and similar methods ac- control of your account.
from using a library to handle it for cept a hash as input and sequentially It gets worse: since the attacker can
you) is to take your notion of a logged- call all accessors for symbols in the also reassign his own data’s owner _
in user and access user-specific data hash. Objects will update both da- id to a nonsense string, this delinks
only through that. For example, De- tabase columns (or their MongoDB his personal data from his account,
vise gives all actions access to a cur- analogs) and will call parameter _ which will ensure that his account is
rent _ user object, which is a stand- name= for any :parameter _ linked with the victim’s personal data.
in for the currently logged-in user. If name in the hash that has that method It gets worse still. Note the seri-
an action needs to access a photo, it defined. alized _ key column. If you look
should call current _ user.pho- Impact. Let’s take a look at the Per- deeper into the User class, that is its
tos.find(params[:id]). If a mali- son object in the following code to see serialized public/private encryption
cious user has subverted the params what mischief this lets an attacker key pair. Diaspora seeds use encryp-
hash (which, since it comes directly do. Note that instead of updating the tion when talking with each other so
from an HTTP request, must be con- profile, update _ profile updates the prying eyes of Facebook can’t read
sidered “in the hands of the enemy”), the Person: Diaspora’s internal no- users’ status updates. This is Diaspo-
that code will find no photo (because tion of the data associated with one ra’s core selling point. Unfortunately,
an attacker can use the combination
Figure 1. Weaknesses in user update method. of unchecked authorization and mass
update silently to overwrite the user’s
key pair, replacing it with one the user
#users_controller.rb
generated. Since the attacker now
def update
@user = User.find_by_id params[:id] # <-- No authorization check. knows the user’s private key, regard-
prep_image_url(params[:user]) less of how well implemented Diaspo-
ra’s cryptography is, the attacker can
@user.update_profile params[:user] # <-- Pass untrusted input to @user then...
respond_with(@user, :location => root_url)
read the user’s messages at will. This
end compromises Diaspora’s core value
proposition to users: that their data
#user.rb will remain safe and in their control.
def update_profile(params)
if self.person.update_attributes(params) # <-- insert input directly to DB. This is what kills most encryption
#omitted for clarity systems in real life. You don’t have
end to beat encryption to beat the sys-
end
tem; you just have to beat the weak-
est link in the chain around it. That
almost certainly isn’t the encryption

56 commun ications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


practice

algorithm—it is probably some inad- prevents this class of attack. In addi- mature. For example, the canonical
equacy in the larger system added by tion, attr _ accessible documents attack against SQL databases is SQL
a developer in the mistaken belief that programmers’ assumptions about injection: using the user-exposed in-
strong cryptography means strong se- security explicitly in their application terface of an application to craft arbi-
curity. Crypto is not soy sauce for se- code: as a whitelist, it is a known point trary SQL code and execute it against
curity. of weakness in the model class, and it the database.
This attack is fairly elementary to will be examined thoroughly by any se-
execute. It can be done with a tool no curity review process. def self.search(query)
more complicated than Firefox with This is extraordinarily desirable, Person.all(‘$where’ =>
Firebug installed: add an extra param- so it’s a good idea for developers to “function()
eter to the form, switch the submit make using attr _ accessible { return this.diaspora _ han-
URL, and instantly gain control of any compulsory. This is easy to do: simply dle.match(/^#{query}/i) ||
account you wish. Of particular note call ActiveRecord::Base.attr _ this.profile.first _ name.
to open source software projects and accessible(nil) in an initializer, match(/^#{query}/i) ||
other scenarios where the attacker and all Rails models will automati- this.profile.last _ name.
can be assumed to have access to the cally have mass assignment disabled match(/^#{query}/i); }”)
source code, this vulnerability is very until they have it explicitly enabled by #Permits code injection to
visible: the controller in charge of attr _ accessible. Note that this MongoDB.
authorization and access to the user may break the functionality of com- end
objects is a clear priority for attackers mon Rails gems and plugins, because
because of the expected gains from they sometimes rely on the default. Impact. The previous code snippet
subverting it. A moderately skilled at- This is one way in which security is a allows code injection into MongoDB,
tacker could find this vulnerability problem of the community. effectively allowing an attacker full
and create a script to weaponize it in a An additional mitigation method, read access to the database, includ-
matter of minutes. if your data store allows it, is to explic- ing to serialized encryption keys.
How to avoid this scenario. This par- itly disallow writing to as much data as Observe that because of the magic of
ticular variation of the attack could be is feasible. There is almost certainly string interpolation, the attacker can
avoided by checking authorization, no legitimate reason for owner _ id cause the string including the JavaS-
but that does not by itself prevent all to be reassignable. ActiveRecord lets cript to evaluate to virtually anything
related attacks. An attacker can cre- you do this with attr _ readonly. the attacker desires. For example, the
ate an arbitrary number of accounts, MongoMapper does not currently sup- attacker could inject a carefully con-
changing the owner _ id on each to port this feature, which is one danger structed JavaScript string to cause the
collide with a victim’s legitimate user of using bleeding-edge technologies first regular expression to terminate
ID, and in doing so successfully delink for production systems. without any results, then execute arbi-
the victim’s data from his or her login. trary code, then comment out the rest
This amounts to a denial-of-service at- NoSQL Doesn’t Mean of the JavaScript.
tack, since the victim loses the utility No SQL Injection We can get one bit of data about
of the Diaspora service. The new NoSQL databases have a any particular person out of this find
After authentication has been few decades less experience getting call—whether the person is in the re-
fixed, write access to sensitive data exploited than the old relational da- sult set or not. Since we can construct
should be limited to the maximum tabases we know and love, which the result set at will, however, we can
extent practical. A suitable first step means that countermeasures against make that a very significant bit. JavaS-
would be to disable mass assignment, well-understood attacks are still im- cript can take a string and convert it
which should always be turned off in
a public-facing Rails app. The Rails
team presumably keeps mass assign-
ment on by default because it saves
many lines of code and makes the
15-minute blog demo nicer, but it is
a security hole in virtually all applica-
tions.
Luckily, this is trivial to address:
Rails has a mechanism called attr _
accessible, which makes only the
listed model attributes available for
mass assignment. Allowing only safe
attributes to be mass-assigned (for ex-
ample, data you would expect the end
users to be allowed to update, such
as their names rather than their keys) Figure 2. (Hardly) benign update method.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he ac m 57
practice

to a number. The code for this is left of MongoDB and the Ruby wrappers preview: there were publicly acces-
as an exercise for the reader. With for it. Typical application developers sible Diaspora servers where any user
that JavaScript, the attacker can run are insufficiently skilled to evaluate could trivially compromise the ac-
repeated find queries against the da- parts of the stack operating at those count of another user. Moreover, even
tabase to do a binary search for the se- levels: it is essentially the same as if one assumes the server operators
rialized encryption key pair: asking them whether their SQL que- understand what they are doing, their
“Return Patrick if his serialized key ries would allow buffer overruns if users and their users’ friends who
is more than 2512. OK, he isn’t in the executed against a database compiled are invited to join “The New Secure
result set? Alright, return Patrick if his against an exotic architecture. Rather Facebook” are not capable of evaluat-
key is more than 2256. He is in the re- than attempting to answer this ques- ing their security on Diaspora. They
sult set? Return him if his key is more tion, sensible developers should treat trust that, since it is on their browser
than 2256 + 2255. …” any injection attack as allowing a total and endorsed by a friend, it must be
A key length of 1,024 bits might system compromise. safe and secure. (This is essentially
strike a developer as likely to be very How to avoid this scenario. Do not the same process through which they
secure. If we are allowed to do a binary interpolate strings in queries sent joined Facebook prior to evaluating
search for the key, however, it will take to your database. Use the MongoDB the privacy consequences of that ac-
only on the order of 1,000 requests equivalent of prepared statements. If tion.)
to discover the key. A script execut- your database solution does not have The most secure computer system
ing searches through an HTTP client prepared statements, then it is insuf- is one that is in a locked room, sur-
could trivially run through 1,000 ac- ficiently mature to be used in public- rounded by armed guards, and pow-
cesses in a minute or two. Compro- facing products. ered off. Unfortunately, that is not a
mising the user’s key pair in this man- feasible recommendation in the real
ner compromises all messages the Be Careful When Releasing world: software needs to be developed
user has ever sent or will ever send on Software to End Users and used if it is to improve the lives of
Diaspora, and it would leave no trace One could reasonably ask whether se- its users. Could Diaspora have simul-
of intrusion aside from an easily over- curity flaws in a developer preview are taneously achieved a public-preview
looked momentary spike in activity an emergency or merely a footnote in release without exposing end users to
on the server. A more patient attacker the development history of a product. its security flaws? Yes. A sensible com-
could avoid leaving even that. Owing to the circumstances of its cre- promise would have been to release
This is probably not the only vul- ation, Diaspora never had the luxury the code with the registration pages
nerability caused by code injection. It of being both publicly available but elided, forcing developers to add new
is very possible that an attacker could not yet exploitable. As a highly antici- users only via Rake tasks or the Rails
execute state-changing JavaScript pated project, Diaspora was guaran- console. That would preserve 100% of
through this interface, or join the Per- teed to (and did) have publicly acces- the ability of developers to work on the
son document with other documents sible servers available within literally project and for news outlets to take
to read out anything desired from hours of the code being available. screenshots—without allowing tech-
the database, such as user password People who set up servers should nically unsophisticated people to sign
hashes. Evaluating whether these at- know enough to evaluate the security up on Diaspora servers.
tacks are feasible requires in-depth consequences of running them. This The Diaspora community has
knowledge of the internal workings was not the case with the Diaspora taken some steps to reduce the harm
of prematurely deploying the soft-
Figure 3. A mischievous ‘Person.’ ware, but they are insufficient. The
team curates a list of public Diaspora
#Person.rb
seeds (https://github.com/diaspora/
class Person diaspora/wiki/), including a bold dis-
#omitted for clarity claimer that the software is insecure,
key :url, String but that sort of passive posture does
key :diaspora_handle, String, :unique => true
key :serialized_key, String #Public/private key pair for encryption. not address the realities of how social
software spreads: friends recommend
key :owner_id, ObjectId #Extraordinarily security sensitive because… it to friends, and warnings will be un-
seen or ignored in the face of social
one :profile, :class_name => ‘Profile’
many :albums, :class_name => ‘Album’, :foreign_key => :person_id pressure to join new sites.
belongs_to :owner, :class_name => ‘User’ #... changing it reassigns account
ownership! Could Rails Have Prevented
end
These Issues?
Many partisans for languages or
#User.rb frameworks argue that “their” frame-
one :person, :class_name => ‘Person’, :foreign_key => :owner_id
work is more secure than alternatives
and that some other frameworks are
by nature insecure. Insecure code can

58 commun ications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


practice

be written in any language: indeed, attacker has virtually infinite time to


given that the question “Is this secure interact with the application, some-
or not?” is algorithmically undecid- times with its source code available,
able (it trivially reduces to the halting and see how it acts upon particular in-
problem), one could probably go so
far as to say it is flatly impossible to A cursory analysis puts. In a space of uncountable infini-
ties of program states and possible in-
create any useful computer language of the source code puts, the attacker may need to identify

of the Diaspora
that will always be secure. only one input for which the program
That said, defaults and community fails to compromise the security of the
matter. Rails embodies a spirit of con-
vention over configuration, an exam-
prerelease revealed system.
It would not matter if everything
ple of what the team at 37signals (the on the order of a else in Diaspora were perfectly imple-
original authors of Rails) describes
as “opinionated software.” Rails con-
half-dozen critical mented; if the search functionality
still allowed code injection, that alone
ventions are pervasively optimized for errors, affecting would result in total failure of the
programmer productivity and happi-
ness. This sometimes trades off with nearly every class project’s core goals.

security, as in the example of mass as- in the system. Is Diaspora Secure


signment being on by default. after the Patches?
Compromises exist on some of Security is a result of a process de-
these opinions that would make Rails signed to produce it. While the Dias-
more secure without significantly im- pora project has continued iterating on
peding the development experience. the software, and is being made avail-
For example, Rails could default to able to select end users as of the publi-
mass assignment being available in cation of this article, it is impossible to
development environments, but dis- say that the architecture and code are
abled in production environments definitely secure. This is hardly unique
(which are, typically, the ones that are to Diaspora: almost all public-facing
accessible by malicious users). There software has vulnerabilities, despite
is precedent for this: for example, huge amounts of resources dedicated
Rails prints stack traces (which may to securing popular commercial and
include sensitive information) only open source products.
for local requests when in production This is not a reason to despair,
mode, and gives less informative (and though: every error fixed or avoided
more secure) messages if errors are through improved code, improved
caused by nonlocal requests. practices, and security reviews offers
No amount of improving frame- incremental safety to the users of soft-
works, however, will save program- ware and increases its utility. We can
mers from mistakes such as forget- do better, and we should start doing
ting to check authorization prior to so.
destructive actions. This is where the
community comes in: the open source
Related articles
community, practicing developers, on queue.acm.org
and educators need to emphasize se-
A Conversation with Jason Hoffman
curity as a process. There is no tech-
http://queue.acm.org/detail.cfm?id=1348587
nological silver bullet that makes an
application secure: it is made more Browser Security: Lessons
from Google Chrome
secure as a result of detailed analysis Charles Reis, Adam Barth, Carlos Pizano
leading to actions taken to resolve vul- http://queue.acm.org/detail.cfm?id=1556050
nerabilities. Cybercrime 2.0: When the Cloud Turns Dark
This is often neglected in computer Niels Provos, Moheeb Abu Rajab,
science education, as security is seen Panayiotis Mavrommatis
as either an afterthought or an imple- http://queue.acm.org/detail.cfm?id=1517412
mentation detail to be addressed at
a later date. Universities often grade Patrick McKenzie (patrick@bingocardcreator.com) is the
like industry: a program that oper- founder of Kalzumeus, a small software business in Ogaki,
Japan. His main products—Bingo Card Creator (http://
ates successfully on almost all of the www.bingocardcreator.com) and Appointment Reminder
(http://www.appointmentreminder.org)—are both written
inputs scores almost all of the pos- in Ruby.
sible points. This mind-set, applied to
security, has catastrophic results: the © 2011 ACM 0001-0782/11/05 $10.00

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 59


contributed articles
d oi:10.1145/1941487.1941506
It has been known since the pio-
The brain’s electrical signals enable people neering work of Hans Berger more
than 80 years ago that the brain’s
without muscle control to physically interact electrical activity can be recorded
with the world. noninvasively through electrodes on
the surface of the scalp.23 Berger ob-
By Dennis J. McFarland and Jonathan R. Wolpaw served that a rhythm of about 10Hz
was prominent on the posterior scalp
and reactive to light. He called it the

Brain-Computer
alpha rhythm. This and other obser-
vations showed the electroencepha-
logram (EEG) could serve as an index

Interfaces for
of the gross state of the brain. Despite
Berger’s careful work many scientists
were initially skeptical, with some
suggesting that the EEG might repre-

Communication
sent some sort of artifact. However,
subsequent work demonstrated con-
clusively that the EEG is indeed pro-
duced by brain activity.23

and Control
Electrodes on the surface of the
scalp are at some distance from brain
tissue, separated from it by the cover-
ings of the brain, skull, subcutaneous
tissue, and scalp. As a result, the signal
is considerably degraded, and only the
synchronized activity of large numbers
of neural elements can be detected,
limiting the resolution with which
brain activity can be monitored. More-
over, scalp electrodes pick up activ-
Brain activity produces electrical signals detectable ity from sources other than the brain,
on the scalp, on the cortical surface, or within the including environmental noise (such
as 50Hz or 60Hz activity from power
brain. Brain-computer interfaces (BCIs) translate lines) and biological noise (such as ac-
these signals into outputs that allow users to tivity from the heart, skeletal muscles,
communicate without participation of peripheral and eyes). Nevertheless, since the time
of Berger, many studies have used the
nerves and muscles36 (see Figure 1). Because they do EEG to gain insight into brain function,
not depend on neuromuscular control, BCIs provide with many of them using averaging to
separate EEG from superimposed elec-
options for communication and control for people trical noise.
with devastating neuromuscular disorders (such as
amyotrophic lateral sclerosis, or ALS, brainstem stroke, key insights
cerebral palsy, and spinal cord injury). The central B rain-computer interfaces provide a
new communication-and-control option
purpose of BCI research and development is to enable for individuals for whom conventional
methods are ineffective.
these users to convey their wishes to caregivers, use
word-processing programs and other software, and even C urrent BCI technology is slow,
benefiting only those with the most
control a robotic arm or neuroprosthesis. Speculation severe disabilities.

has suggested that BCIs could be useful even to people R esearch may greatly expand the
number of people who would benefit
with lesser, or no, motor impairment. from the technology.

60 commun ications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


BCIs are a direct communication pathway between the brain and external devices. EEG measurements at the Danish Master’s program in
Medicine & Technology; http://www.medicin-ing.dk/kandidat/en.

EEG research reflects two major 1970s based on visual evoked-poten- negative and positive peaks, and the
paradigms: evoked potentials and tials.34 His users viewed a diamond- numbers indicating the approximate
oscillatory features. Evoked poten- shape red checkerboard illuminated latency in msec.
tials are transient waveforms, or brief with a xenon flash. By attending to dif- Vidal’s achievement was an in-
perturbations in the ongoing activ- ferent corners of the flashing checker- teresting demonstration of proof of
ity, that are phase-locked to an event board, they could generate right, up, principle. In the early 1970s, it was far
(such as a visual stimulus). They are left, and down commands, enabling from practical, given that it depended
typically analyzed by averaging many them to move through a maze present- on a time-shared system with limited
similar events in the time-domain. ed on a graphics terminal. An IBM360 processing capacity. Vidal34 also in-
Although oscillatory features in an mainframe digitized the data, and cluded in his system online removal
EEG may occur in response to specific an XDS Sigma 7 computer controlled of ocular artifacts to prevent them
events, they are usually not phase- the experimental events. Users first from being used for control. A decade
locked and typically studied through provided data to train a stepwise lin- earlier, Edmond Dewan6 of the Air
spectral analysis. Historically, most ear discriminant function, then navi- Force Cambridge Research Lab, Bed-
EEG studies have examined phase- gated the maze online in real time. ford MA, instructed users to explicitly
locked evoked potentials. Both these Thus, Vidal34 used signal-processing use eye movements to modulate their
major paradigms have been applied techniques to realize real-time analy- brain waves, showing that subjects
Photogra ph by L a rs Ba hl

in BCIs.36 sis of the EEG with minimal averag- could learn to transmit Morse code
The term “brain-computer inter- ing. The waveforms showed by Vidal34 messages using EEG activity associ-
face” can be traced to Jacques Vidal of suggested his BCI used EEG activity in ated with eye movement.
the University of California, Los An- the timeframe of the N100-P200 com- The fact that both Vidal’s and De-
geles who devised a BCI system in the ponents, with the N and P indicating wan’s BCIs depended on eye move-

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he ac m 61
contributed articles

ment made them somewhat less in- use of a P300-based spelling device bet and several other symbols, focus-
teresting from a scientific or clinical (see Figure 2b) in which a positive po- ing attention on the desired selection,
point of view, since they required ac- tential around 300msec after an event as the rows and columns of the ma-
tual muscle control or eye movement, significant to the subject is consid- trix were repeatedly flashed to elicit
simply using EEG to reflect the result- ered a “cognitive” potential since it is visual evoked potentials. Farwell and
ing gaze direction. generated in tasks where the subject Donchin7 found their users were able
discriminates among stimuli. Far- to spell the word “brain” through the
Varieties of BCI Signals well’s and Donchin’s7 users viewed a P300 spelling device; in addition, they
Farwell and Donchin7 reported the first 6×6 matrix of the letters of the alpha- did an offline comparison of detection
algorithms, finding the stepwise linear
Figure 1. Basic design and operation of a BCI system.
discriminant analysis was generally
best. The fact that the P300 potential
Signal Acquisition Translation
reflects attention rather than simply
and Processing Signal Features Algorithm Device Commands gaze-direction implied this BCI did not
depend on muscle, or eye-movement,
control, thus representing a significant
advance. Several groups have since fur-
ther developed this BCI method.13
Wolpaw et al.38 reported the first use
of sensorimotor rhythms (SMRs) for
cursor control (see Figure 2a), or EEG
rhythms that change with movement
or imagination of movement and are
spontaneous in the sense they do not
require specific stimuli to occur. Peo-
ple learned to vary their SMRs to move
a cursor to hit one of two targets on the
top or bottom edge of a video screen.
Signals from the brain are acquired by electrodes on
the scalp or head and processed to extract specific Cursor movement was controlled by
signal features reflecting the user’s intent. These SMR amplitude (measured by spectral
features are translated into commands to operate analysis). A distinctive feature of this
a device. Users must develop and maintain good
task is that it required users to rapidly
correlation between their intent and the BCI’s signal
features. The BCI must select and extract features switch between two states to select a
the user can control, translating them into device particular target. The rapid bidirec-
commands (adapted from Wolpaw et al.36). tional nature of the Wolpaw et al.38
paradigm made it distinct from prior
studies that produced long-term uni-

Figure 2. Current human BCI systems.

A and B are noninvasive, and C is invasive. A. In a sensorimotor rhythm BCI, scalp EEG is
recorded over sensorimotor cortex; users control the amplitude of rhythms to move a cursor
to a target on the screen. B. In a P300 BCI, a matrix of choices is presented on screen, and
scalp EEG is recorded as these choices flash in succession. C. In a cortical neuronal BCI,
electrodes implanted in the cortex detect action potentials of single neurons; users learn to
control the neuronal firing rate to move a cursor on screen (adapted from Wolpaw et al.36).

(a) Sensorimotor Rhythms (b) P300 Evoked Potential (c) Cortical Neuronal Activity
Power
Pz Induction Transmitter
4 –50
Cement
other choices Skull Bone Gold wire

3 Top Target 0
Amplitude (μV)

Voltage (a/d u)

desired choice
Cortex

2 50 Neurites
Glass
cone
100 μV

1 100 Row of Neurons


0.5 s

Bottom Target 100 μV


0 150
20 s
0 5 10 15 20 25 30 –100 0 100 200 300 400 500
Frequency (Hz) Time (ms) On
Top Target 10 μV
On Off On Off Off

1 sec
Bottom Target

62 communications of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

directional changes in brain rhythms; encephalography (MEG),20 functional by the algorithm the BCI is using. It
for example, users were required to magnetic resonance imaging (fMRI),28 is thus not possible to predict results
maintain an increase in the size of an and near-infrared systems (fNIR).4 precisely from offline analyses that
EEG rhythm for minutes at a time. In Current technology for recording cannot account for these effects.
a series of subsequent studies, this MEG and fMRI is both expensive and Blankertz et al.3 identified several
group showed that the signals control- bulky, making it unlikely for practical trends in the results of a BCI data-
ling the cursor were actual EEG activity applications in the near term; fNIR is classification competition. Most win-
and that covert muscle activity did not potentially cheaper and more com- ning entries used linear classifiers,
mediate this EEG control.18,31 pact. However, both fMRI and fNIR are the most popular being Fisher’s dis-
These initial SMR results were sub- based on changes in cerebral blood criminant and linear support vector
sequently replicated by others21,24 and flow, an inherently slow response.11 machines (SVMs). The winning entries
extended to multidimensional con- Electrophysiological features repre- for data sets with multichannel oscil-
trol.37 These P300 and SMR BCI stud- sent the most practical signals for BCI latory features often used common
ies together showed that noninvasive applications today. spatial patterns. In their review of the
EEG recording of brain signals can literature on BCI classifiers, Lotte et
serve as the basis for communication- System Design al.16 concluded that SVMs are particu-
and-control devices. Communication-and-control applica- larly efficient, attributing the efficien-
A number of laboratories have ex- tions are interactive processes requir- cy to their regularization property and
plored the possibility of developing ing users observe the results of their immunity to the curse of dimensional-
BCIs using single-neuron activity de- effort to maintain good performance ity. They also concluded that combina-
tected by microelectrodes implanted and correct mistakes. For this reason, tions of classifiers seem efficient, not-
in the cortex12,30 (see Figure 2c). Much BCIs must run in real time and provide ing a lack of comparison of classifiers
of the related research has been done real-time feedback to users. While within the same study using otherwise
in non-human primates, though trials many early BCI studies satisfied this identical parameters.
have also been done with humans.12 requirement,24,38 later studies were Muller and Blankertz21 advocated a
Other studies have shown that record- often based on offline analyses of pre- machine-learning approach to BCIs in
ings of electrocorticographic (ECoG) recorded data1; for example, the Lotte which a statistical analysis of a calibra-
activity from the surface of the brain et al.16 review of studies evaluating BCI tion measurement is used to train the
can also provide signals for a BCI15; signal-classification algorithms found system. The goal is to develop a “zero-
to date they indicate that invasive re- most used offline analyses. Indeed, training” method providing effective
cording methods can also serve as the the current popularity of BCI research performance from the first session,
basis for BCIs. Meanwhile, important is probably due in part to the ease of- contrasting it with one based on train-
issues concerning their suitability for fline analyses are performed on pub- ing users to control specific features
long-term human use have yet to be licly available data sets. While such of brain signals.38 A system that can
resolved. offline studies may help guide actual be used without extensive training is
Earlier studies demonstrating oper- online BCI investigations, there is no appealing since it requires less initial
ant conditioning of single units in the guarantee that offline results will gen- effort on the part of both the BCI user
motor cortex of primates,9 hippocam- eralize to online performance. Users’ and the system operator. Operation
pal theta rhythm of dogs,2 and senso- brain signals are often affected by BCI of such a system is based on the as-
rimotor rhythm in humans29 showed outputs that are in turn determined yet uncertain premise that users can
brain activity could be trained with
operant techniques. However, these Figure 3. Three approaches to BCI design.
studies were not demonstrations of
BCI systems for communication and
Let the Machines Run Operant Conditioning Optimized Co-Adaptation
control since they required subjects
to increase brain activity for periods
of many minutes, showing that brain User User User
activity could be tonically altered in
a single direction through training.
However, communication-and-control
devices require that users be able to
select from at least two distinct alter-
natives; that is, there must be at least BCI System BCI System BCI System
one bit of information per selection.
Effective communication-and-control
devices require users to rapidly switch
between multiple alternatives. Arrows indicate the element that adapts; the BCI, the user, or both adapt
to optimize and maintain BCI performance (adapted from McFarland et al.17).
In addition to electrophysiological
measures, researchers have also dem-
onstrated the feasibility of magneto-

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 63


contributed articles

repeatedly and reliably maintain the suggested that cognitive tasks (such ger necessary to operate a sensorimo-
specified correlations between brain as navigation and auditory imagery) tor rhythm-based BCI. As is typical
signals and intent. Figure 3 outlines might be more useful in driving a BCI of many simple motor tasks, perfor-
three different conceptualizations of than motor imagery. However, senso- mance becomes automatized through
where adaptation might take place to rimotor rhythm-based BCIs may pro- extended practice. Automatized per-
establish and maintain good BCI per- vide several advantages over systems formance may be less likely to inter-
formance: In the first, the BCI adapts that depend on complex cognitive op- fere with mental operations users
to the user; in the second, the user erations; for example, the structures might wish to engage in concurrent
adapts to the BCI; and, in the third, involved in auditory imagery are also with their BCI use; for example, com-
user and system adapt to each other. likely to be driven by auditory sen- posing a manuscript is much easier
A number of BCI systems are de- sory input. Wolpaw and McFarland37 if the writer does not need to think
signed to detect user performance of reported that with extended practice extensively about each individual key-
specific cognitive tasks. Curran et al.3 users report motor imagery is no lon- stroke.
As noted, EEG recording may be
Figure 4. BCI2000 design consists of four modules: operator, source, signal processing,
contaminated by non-brain activity
and application.
(such as line noise and muscle activ-
ity); see Fatourechi et al.8 for a review.
Operator
Activity recorded from the scalp rep-
resents the superposition of many
System Configuration Visualization
signals, some originating in the brain,
some elsewhere. These signals include
potentials generated by retinal dipoles,
or eye movement and blinks, and facial
muscles. It is noteworthy that mental
Source effort is often associated with changes
Brain Signals Signal Control Signals User in eye-blink rate and muscle activity.35
Processing Application BCI users might generate these arti-
Event Markers Event Markers
Storage facts without being aware of what they
are doing simply by making facial ex-
pressions associated with effort.
Event Markers Facial muscles can generate sig-
Operator deals with system configuration and online presentation of results to the
nals with energy in the spectral bands
investigator; during operation, information is communicated from source to signal processing used as features in an SMR-based
to user application and back to source (adapted from Schalk et al.25). BCI18 Muscle activity can also modu-
late SMR activity; for example, users
can move their right hands in order
to desynchronize the mu rhythm over
the left hemisphere. This sort of me-
diation of the EEG through peripheral
muscle movements was a concern in
the early days of BCI development.
As noted earlier, Dewan6 trained us-
ers to send Morse code messages us-
ing occipital alpha rhythms modu-
lated by voluntary movements of eye
muscles. For this reason, Vaughan
et al.33 recorded EMG from 10 distal
limb muscles, while BCI users used
central mu or beta rhythms to move
a cursor to targets on a video screen.
EMG activity was very low in these
well-trained users. Most important,
the correlations between target po-
sition and EEG activity could not be
accounted for through EMG activity.
Similar studies have been done with
BCI users moving a cursor in two di-
mensions,37 showing that SMR modu-
Figure 5. Hardware in the Wadsworth Center’s home BCI system, including 16-channel
electrode cap for signal recording, solid-state amplifier, laptop, and additional monitor
lation does not require actual move-
as user display. ments or muscle activity.

64 commun ic ations of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

Applications options of practical value mainly for


Several recent BCI spelling systems people severely limited in their motor
are based on different EEG signals, skills and thus have few other options.
including the mu rhythm22,26 and the Widespread use of BCI technology by
P300.31 The Mu rhythm systems made
use of machine-learning paradigms Sensorimotor individuals with little or no disability
is unlikely in the short-term and would
that minimized training, with users rhythm-based require much greater speed and accu-

BCIs may provide


of both mu-based systems reportedly racy than has so far been demonstrat-
averaging between 2.3–7 characters/ ed in the scientific literature.
minute22 and 2.85–3.38 characters/
minute.26 The P300 system averaged
several advantages Noninvasive and invasive methods
would both benefit from improved
3.66 selections/minute.31 Townsend et over systems recording methods. Current invasive
al.24 noted the reported rate depends
on how the figure is computed, but
that depend on methods do not deal adequately with
the need for long-term performance
study authors do not always provide complex cognitive stability. The brain’s complex reac-
details. Omitting time between trials
increased Townsend et al.31 results operations. tion to an implant is still imperfectly
understood and might impair long-
from 3.66 to 5.92 characters/second. term performance. Noninvasive EEG
In any case, these systems perform electrodes require some level of skill
within a similar general range. At cur- in the person placing them, as well as
rent BCI character rates, only users in periodic maintenance to ensure suf-
with limited options could benefi. ficiently good contact with the skin;
BCI systems have also been de- more convenient and stable electrodes
veloped for control applications; for are under development. Improved
example, several groups have shown methods for extracting key EEG fea-
that human subjects can use their EEG tures and translating them into device
activity to drive a simulated wheel- control, as well as user training, would
chair.10,14 Bell et al.1 showed the P300 also help improve BCI performance.
could be used to select among complex Recent developments in computer
commands to a partially autonomous hardware provide compact portable
humanoid robot; for a review of the systems that are extremely powerful.
use of BCI for robotic and prosthetic Use of digital electronics has also led
devices see McFarland and Wolpaw.19 to improved size and performance of
Several commercial concerns re- EEG amplifiers. Thus it is no longer
cently produced inexpensive devices necessary to use a large time-shared
purported to measure EEG. Both Emo- mainframe, as it was with Vidal34; stan-
tiv and Neurosky developed products dard laptops easily handle the vast ma-
with a limited number of electrodes jority of real-time BCI protocols. Sig-
that do not use conventional gel-based nal-processing and machine-learning
recording technology27 and are intend- algorithms have also been improved.
ed to provide input for video games. Coupled with discovery of new EEG
Not clear is the extent to which they use features for BCI use and development
actual EEG activity, as opposed to scalp- of new paradigms for user training,
muscle activity or other non-brain such improvements are gradually in-
signals. Given the well-established creasing the speed and reliability of
prominence of EMG activity in activity BCI communication and control, de-
recorded from the head, it seems likely velopments facilitated by the BCI2000
that such signals account for much of software platform.25
the control these devices provide.27 BCI2000 is a general-purpose re-
search-and-development system in-
Conclusion corporating any brain signal, signal-
In a review of the use of BCI technology processing method, output device,
for robotic and prosthetic devices, Mc- and operating protocol. BCI2000
Farland and Wolpaw19 concluded that consists of a general standard for cre-
the major problem facing BCI applica- ating interchangeable modules de-
tions is how to provide fast, accurate, signed according to object-oriented
reliable control signals, as well as other principles (see Figure 4), including a
uses of BCIs. Current BCI systems that source module for signal acquisition,
operate using actual brain activity can signal-processing module, and user-
provide communication-and-control application module. Configuration

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 65


contributed articles

and coordination of these modules is (Jan. 1970), 15–24. Applications, and Related Fields, Fifth Edition, E.
3. Blankertz, B., Muller, K-R, Krusienski, D.J., Schalk, G., Neidermeyer and F. Lopes da Silva, Eds. Lippincott
accomplished through a fourth opera- Wolpaw, J.R., Schlogl, A., Pfurtscheller, G., Millan, J., Williams and Wilkins, Philadelphia, 2005, 1–15.
tor module; several source modules, Schroder, M., and Birbaumer, N. The BCI competition 24. Pfurtscheller, G., Flotzinger, D., and Kalcher, J. Brain-
III: Validating alternative approaches to actual BCI computer interface: A new communication device
signal-processing modules, and user problems. IEEE Transactions on Neural Systems for handicapped persons. Journal of Microcomputer
applications have been created for the and Rehabilitation Engineering 14, 2 (June 2006), Applications 16, 3 (July 1993), 293–299.
153–159. 25. Schalk, G., McFarland, D.J., Hinterberger, T.,
BCI2000 standard (see http://www. 4. Coyle, S.M., Ward, T.E., and Markham, C.M. Brain- Birbaumer, N., and Wolpaw, J.R. BCI2000: A general-
bci2000.org/BCI2000/Home.html). computer interface using a simplified functional purpose brain-computer interface (BCI) system.
near-infrared spectroscopy system. Journal of Neural IEEE Transactions on Biomedical Engineering 51
The Wadsworth Center recently be- Engineering 4, 3 (Sept. 2007), 219–226. (2004), 1034–1043.
gan developing a system for home use 5. Curran, E., Sykacek, P., Stokes, M., Roberts, S.J., 26. Scherer, R., Muller, G.R., Neuper, C., Graimann, B.,
Penny, W., Johnsrude, I., and Owen, A. Cognitive Pfurtschheller, G. An asynchronously controlled EEG-
by individuals with severe motor im- tasks for driving a brain-computer interface: A pilot based virtual keyboard: Improvement of the spelling
study. IEEE Transactions on Neural Systems and rate. IEEE Transactions on Biomedical Engineering 51,
pairments.32 Its basic hardware (see Rehabilitation Engineering 12, 1 (Mar. 2003), 48–54. 6 (June 2004), 979–984.
Figure 5) consists of a laptop comput- 6. Dewan, E.M. Occipital alpha rhythm eye position 27. Singer, E. Brain games. Technology Review 111, 4
and lens accommodation. Nature 214, 5092 (June 3, (July/Aug. 2008), 82–84.
er with 16-channel EEG acquisition, a 1967), 975–977. 28. Sitaram, R., Caria, A., Veit, R., Gaber, T., Rota, G.,
second screen placed in front of the 7. Farwell, L.A. and Donchin, E. Talking off the top of Kuebler, A., and Birbaumer, N. fMRI brain-computer
your head: Toward a mental prosthesis utilizing event- interface: A tool for neuroscientific research
user, and an electrode cap; software is related brain potentials. Electroencephalography and and treatment. Computational Intelligence and
provided by the BCI2000 general-pur- Clinical Neurophysiology 70, 6 (Dec. 1988), 510–523. Neuroscience (2007).
8. Fatourechi, M., Bashashati, A., Ward, R.K., and Birch, 29. Sterman, M.B., MacDonald, L.R., and Stone, R.K.
pose system.25 The initial users had G.E. EMG and EOG artifacts in brain-computer Biofeedback training of sensorimotor EEG in man and
late-stage ALS, with little or no volun- interface systems: A survey. Clinical Neurophysiology its effect on epilepsy. Epilepsia 15, 3 (Sept. 1974),
118, 3 (Mar. 2007), 480–494. 395–416.
tary movement, and found conven- 9. Fetz, E.E. Operant conditioning of cortical unit activity. 30. Taylor D.A., Tillery S., and Schwartz, A.B. Direct
tional assistive communication de- Science 163, 870 (Feb. 28, 1969), 955–958. cortical control of 3D neuroprosthetic devices.
10. Galan, F., Nuttin, M., Lew, E., Ferrez, P.W., Vanacker, Science 296, 5574 (June 7, 2002), 1829–1832.
vices inadequate for their needs. The G., Philips, J., and Millan, J.d.R. A brain-actuated 31. Townsend, G., LaPallo, B.K., Boulay, C.B., Krusienski,
P300-based matrix speller is used for wheelchair: Asynchronous and noninvasive brain- D.J., Frye, G.E., Hauser, C.K., Schwartz, N.E., Vaughan,
computer interfaces for continuous control of T.M., Wolpaw, J.R., and Sellers, E.W. A novel P300-
these applications due to its relatively robots. Clinical Neurophysiology 119, 9 (Sept. 2008), based brain-computer interface stimulus presentation
high throughput for spelling and sim- 2159–2169. paradigm: Moving beyond rows and columns. Clinical
11. He, B. and Liu, Z. Multimodal functional neuroimaging: Neurophysiology 121, 7 (July 2010), 1109–1120.
plicity of use. A 49-year-old scientist Integrating functional MRI and EEG/MEG. IEEE 32. Vaughan, T.M., McFarland, D.J., Schalk, G., Sarnacki,
with ALS has used this BCI system on Reviews in Biomedical Engineering 1 (Nov.2008), W.A., Krusienski, D.J., Sellers, E.W., and Wolpaw,
23–40. J.R. The Wadsworth BCI research and development
a daily basis for approximately three 12. Hochberg, L.R., Serruya, M.D., Friehs, G.M., Mukand, program: At home with BCI. IEEE Transactions
J.A., Saleh, M., Caplan, A.H., Branner, A., Penn, D.R.D., on Rehabilitation Engineering 14, 2 (June 2006),
years, finding it superior to his eye- and Donoghue, J.P. Neuronal ensemble control of 229–233.
gaze system (a letter-selection device prosthetic devices by a human with tetraplegia. 33. Vaughan, T.M., Miner, L.A., McFarland, D.J., and
Nature 442, 7099 (July 13, 2006), 164–171. Wolpaw, J.R. EEG-based communication: Analysis of
based on eye-gaze direction) and us- 13. Krusienski, D.J., Sellers, E.W., McFarland, D.J., concurrent EMG activity. Electroencephalography and
ing it from four to six hours per day Vaughan, T.M., and Wolpaw, J.R. Toward enhanced Clinical Neurophysiology 107, 6 (Dec. 1998), 428–433.
P300 speller performance. Journal of Neuroscience 34. Vidal, J.J. Real-time detection of brain events in EEG.
for email and other communication Methods 167, 1 (Jan. 15, 2008), 15–21. Proceedings of the IEEE 65, 5 (May 1977), 633–641.
purposes.32 14. Leeb, R., Friedman, D., Muller-Putz, G.R., Scherer, 35. Whitham, E.M., Lewis, T., Pope, K.J., Fitzbibbon, S.P.,
R., Slater, M., and Pfurtscheller, G. Self-paced Clark, C.R., Loveless, S., DeLosAngeles, D., Wallace,
How far BCI technology will go and (asynchronous) BCI control of a wheelchair in virtual A.K., Broberg, M., and Willoughby, J.O. Thinking
how useful it will be depend on future environments: A case study with a tetraplegic. activates EMG in scalp electrical recordings. Clinical
Computational Intelligence and Neuroscience 79642 Neurophysiology 119, 5 (May 2008), 1166–1175.
research developments. However, it is (2007). 36. Wolpaw, J.R., Birbaumer, N., McFarland, D.J.,
apparent that BCIs can serve the ba- 15. Leuthardt, E.C., Schalk, G., Wolpaw, J.R., Ojemann, Pfurtscheller, G., and Vaughan, T.M. Brain-computer
J.G., and Moran, D.W. A brain-computer interface interfaces for communication and control. Clinical
sic communication needs of people using electrocorticographic signals in humans. Neurophysiology 113, 6 (June 2002), 767–791.
whose severe motor disabilities pre- Journal of Neural Engineering 1, 2 (June 2004), 37. Wolpaw, J.R. and McFarland, D.J. Control of a
63–71. two-dimensional movement signal by a noninvasive
vent them from using conventional 16. Lotte, F., Congedo, M., Lecuyer, A., Lamarche, F., and brain-computer interface. Proceedings of the
augmentive communications devices, Arnaldi, B. A review of classification algorithms for National Academy of Science 101, 51 (Dec. 21, 2004),
EEG-based brain-computer interfaces. Journal of 17849–17854.
all of which require muscle control. Neural Engineering 4, 2 (June 2007), 1–13. 38. Wolpaw, J.R., McFarland, D.J., Neat, G.W., and
17. McFarland, D.J., Krusienski, D.J., and Wolpaw, J.R. Forneris, C.A. An EEG-based brain-computer interface
Brain-computer interface signal processing at the for cursor control. Electroencephalography and
Acknowledgments Wadsworth Center: Mu and sensorimotor beta Clinical Neurophysiology 78, 3 (Mar. 1991), 252–259.
This work was supported in part by rhythms. Progress in Brain Research 159 (2006),
411–419.
grants from the National Institutes of 18. McFarland, D.J., Sarnacki, W.A., Vaughan, T.M.,
Health HD30146 (NCMRR, NICHD) and Wolpaw, J.R. Brain-computer interface (BCI) Dennis J. McFarland (mcfarlan@wadsworth.org) is a
operation: Signal and noise during early training research scientist in the Laboratory of Neural Injury and
and EB00856 (NIBIB & NINDS) and the sessions. Clinical Neurophysiology 116 (2005), 56–62. Repair at the Wadsworth Center of the New York State
James S. McDonnell Foundation. We 19. McFarland, D.J. and Wolpaw, J.R. Brain-computer Department of Health, Albany, NY.
interface operation of robotic and prosthetic devices.
thank Chad Boulay and Peter Brun- Computer 41, 10 (Oct. 2008), 48–52.
ner for their comments on the manu- 20. Mellinger, J., Schalk, G., Braun, C., Preissl, H., Jonathan R. Wolpaw (wolpaw@wadsworth.org) is a
Rosenstiel, W., Birbaumer, N., and Kubler, A. An MEG- research physician in the Laboratory of Neural Injury and
script. based brain-computer interface (BCI). Neuroimage Repair in the Wadsworth Center of the New York State
36, 3 (July 1, 2007), 581–593. Department of Health, Albany, NY.
21. Muller, K.-R., and Blankertz, B. Towards noninvasive
brain-computer interfaces. IEEE Signal Processing
References
Magazine 23, 1 (Sept. 2006), 125–128.
1. Bell, C.J., Shenoy, P., Chalodhorn, R., and Rao, R.P.N. 22. Muller, K.-R., Tangermann, M., Dornhege, G.,
Control of a humanoid robot by a noninvasive brain- Krauledat, M., Curio, GT., and Blankertz, B. Machine
computer interface in humans. Journal of Neural learning for real-time single-trial EEG-analysis:
Engineering 5, 2 (June 2008), 214–220. From brain-computer interfacing to mental-state
2. Black, A.H., Young, G.A., and Batenchuk, C. Avoidance monitoring. Journal of Neuroscience Methods 167, 1
training of hippocampal theta waves in flaxedilized (Jan. 15, 2008), 82–90.
dogs and its relation to skeletal movement. Journal 23. Neidermeyer,. E. Historical aspects. In
of Comparative and Physiological Psychology 70, 1 Electroencephalography: Basic Principals, Clinical © 2011 ACM 0001-0782/11/05 $10.00

66 commun ic ations of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


doi:10.1145/1941487 . 1 9 4 1 5 0 7

Energy efficiency is the new fundamental


limiter of processor performance,
way beyond numbers of processors.
by Shekhar Borkar and Andrew A. Chien

The Future
of
Microprocessors

Mic rop ro ce s s o r s — sin gl e -c h ip c ompu t e r s —are


the building blocks of the information world. Their
performance has grown 1,000-fold over the past 20
years, driven by transistor speed and energy scaling, as
well as by microarchitecture advances that exploited
the transistor density gains from Moore’s Law. In the

next two decades, diminishing tran- vent new ideas and solutions address
sistor-speed scaling and practical en- how to sustain computing’s exponen-
ergy limits create new challenges for tial improvement.
continued performance scaling. As Microprocessors (see Figure 1) were
a result, the frequency of operations invented in 1971,28 but it’s difficult to-
will increase slowly, with energy the day to believe any of the early inventors
key limiter of performance, forcing could have conceived their extraor-
designs to use large-scale parallel- dinary evolution in structure and use
ism, heterogeneous cores, and accel- over the past 40 years. Microprocessors
erators to achieve performance and today not only involve complex micro-
energy efficiency. Software-hardware
partnership to achieve efficient data key insights
orchestration is increasingly critical in
the drive toward energy-proportional M oore’s Law continues but demands
computing. radical changes in architecture and
software.
Our aim here is to reflect and proj-
ect the macro trends shaping the fu- A rchitectures will go beyond
ture of microprocessors and sketch in homogeneous parallelism, embrace
heterogeneity, and exploit the bounty
broad strokes where processor design of transistors to incorporate
is going. We enumerate key research application-customized hardware.
challenges and suggest promising
research directions. Since dramatic S oftware must increase parallelism
and exploit heterogeneous and
changes are coming, we also seek to application-customized hardware
inspire the research community to in- to deliver performance growth.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 67


contributed articles

architectures and multiple execution 20 Years of Exponential dimensions by 30% every generation
engines (cores) but have grown to in- Performance Gains (two years) and keeping electric fields
clude all sorts of additional functions, For the past 20 years, rapid growth in constant everywhere in the transis-
including floating-point units, caches, microprocessor performance has been tor to maintain reliability. This might
memory controllers, and media-pro- enabled by three key technology driv- sound simple but is increasingly diffi-
cessing engines. However, the defin- ers—transistor-speed scaling, core mi- cult to continue for reasons discussed
ing characteristics of a microprocessor croarchitecture techniques, and cache later. Classical transistor scaling pro-
remain—a single semiconductor chip memories—discussed in turn in the vided three major benefits that made
embodying the primary computation following sections: possible rapid growth in compute per-
(data transformation) engine in a com- Transistor-speed scaling. The MOS formance.
puting system. transistor has been the workhorse for First, the transistor dimensions are
Because our own greatest access decades, scaling in performance by scaled by 30% (0.7x), their area shrinks
and insight involves Intel designs and nearly five orders of magnitude and 50%, doubling the transistor density
data, our graphs and estimates draw providing the foundation for today’s every technology generation—the fun-
heavily on them. In some cases, they unprecedented compute performance. damental reason behind Moore’s Law.
may not be representative of the entire The basic recipe for technology scaling Second, as the transistor is scaled, its
industry but certainly represent a large was laid down by Robert N. Dennard of performance increases by about 40%
fraction. Such a forthright view, solidly IBM17 in the early 1970s and followed (0.7x delay reduction, or 1.4x frequen-
grounded, best supports our goals for for the past three decades. The scal- cy increase), providing higher system
this article. ing recipe calls for reducing transistor performance. Third, to keep the elec-
tric field constant, supply voltage is re-
Figure 1. Evolution of Intel microprocessors 1971–2009. duced by 30%, reducing energy by 65%,
or power (at 1.4x frequency) by 50%
(active power = CV2f). Putting it all to-
gether, in every technology generation
transistor integration doubles, circuits
are 40% faster, and system power con-
sumption (with twice as many transis-
tors) stays the same. This serendipi-
tous scaling (almost too good to be
true) enabled three-orders-of-magni-
tude increase in microprocessor per-
formance over the past 20 years. Chip
Intel 4004, 1971 Intel 8088, 1978 Intel Mehalem-EX, 2009
1 core, no cache 1 core, no cache 8 cores, 24MB cache
architects exploited transistor density
23K transistors 29K transistors 2.3B transistors to create complex architectures and
transistor speed to increase frequency,
achieving it all within a reasonable
power and energy envelope.
Figure 2. Architecture advances and energy efficiency. Core microarchitecture tech-
niques. Advanced microarchitectures
have deployed the abundance of tran-
  Die Area   FP Performance (X)
  Integer Performance (X)   Int Performance/Watt (X) sistor-integration capacity, employing
a dizzying array of techniques, includ-
386 to 486
4 ing pipelining, branch prediction,
out-of-order execution, and specula-
486 to Pentium tion, to deliver ever-increasing perfor-
3 mance. Figure 2 outlines advances in
microarchitecture, showing increases
Increase (X)

P6 to Pentium 4 in die area and performance and en-


Pentium to P6
2 ergy efficiency (performance/watt),
all normalized in the same process
Pentium 4 technology. It uses characteristics of
to Core
1 Intel microprocessors (such as 386,
486, Pentium, Pentium Pro, and Pen-
tium 4), with performance measured
0 by benchmark SpecInt (92, 95, and
On-die cache, Super-scalar OOO-Speculative Deep pipeline Back to non-deep 2000 representing the current bench-
pipelined pipeline
mark for the era) at each data point.
It compares each microarchitecture
advance with a design without the ad-

68 commun ic ations of th e acm | May 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

vance (such as introducing an on-die caused designers to forego many of Unaddressed, the memory-latency gap
cache by comparing 486 to 386 in 1μ these microarchitecture techniques. would have eliminated and could still
technology and superscalar microar- As Pollack’s Rule broadly captures eliminate most of the benefits of pro-
chitecture of Pentium in 0.7μ technol- area, power, and performance trade- cessor improvement.
ogy with 486). offs from several generations of mi- The reason for slow improvement
This data shows that on-die caches croarchitecture, we use it as a rule of DRAM speed is practical, not tech-
and pipeline architectures used tran- of thumb to estimate single-thread nological. It’s a misconception that
sistors well, providing a significant performance in various scenarios DRAM technology based on capacitor
performance boost without compro- throughout this article. storage is inherently slower; rather, the
mising energy efficiency. In this era, Cache memory architecture. Dy- memory organization is optimized for
superscalar, and out-of-order archi- namic memory technology (DRAM) density and lower cost, making it slow-
tectures provided sizable performance has also advanced dramatically with er. The DRAM market has demanded
benefits at a cost in energy efficiency. Moore’s Law over the past 40 years but large capacity at minimum cost over
Of these architectures, deep-pipe- with different characteristics. For ex- speed, depending on small and fast
lined design seems to have delivered ample, memory density has doubled caches on the microprocessor die to
the lowest performance increase for nearly every two years, while perfor- emulate high-performance memory
the same area and power increase as mance has improved more slowly (see by providing the necessary bandwidth
out-of-order and speculative design, Figure 4a). This slower improvement and low latency based on data locality.
incurring the greatest cost in energy in cycle time has produced a memory The emergence of sophisticated, yet
efficiency. The term “deep pipelined bottleneck that could reduce a sys- effective, memory hierarchies allowed
architecture” describes deeper pipe- tem’s overall performance. Figure 4b DRAM to emphasize density and cost
line, as well as other circuit and mi- outlines the increasing speed dispar- over speed. At first, processors used a
croarchitectural techniques (such as ity, growing from 10s to 100s of proces- single level of cache, but, as processor
trace cache and self-resetting domino sor clock cycles per memory access. It speed increased, two to three levels of
logic) employed to achieve even high- has lately flattened out due to the flat- cache hierarchies were introduced to
er frequency. Evident from the data is tening of processor clock frequency. span the growing speed gap between
that reverting to a non-deep pipeline
reclaimed energy efficiency by drop- Figure 3. Increased performance vs. area in the same process technology follows
Pollack’s Rule.
ping these expensive and inefficient
techniques.
When transistor performance in- 10.0
creases frequency of operation, the Performance ~ Sqrt(Area)
performance of a well-tuned system
Integer Performance (X)

386 to 486
generally increases, with frequency Pentium to P6
486 to Pentium
subject to the performance limits of
1.0 P6 to Pentium 4
other parts of the system. Historically,
Pentium 4 to Core
microarchitecture techniques exploit-
Slope =0.5
ing the growth in available transistors
have delivered performance increases
empirically described by Pollack’s 0.1

Rule,32 whereby performance increas- 0.1 1.0 10.0


es (when not limited by other parts Area (X)

of the system) as the square root of


the number of transistors or area of
a processor (see Figure 3). According
to Pollack’s Rule, each new technol- Figure 4. DRAM density and performance, 1980–2010.

ogy generation doubles the number


of transistors on a chip, enabling a
100,000 1,000
new microarchitecture that delivers a
CPU Clocks/DRAM Latency

40% performance increase. The faster 10,000 DRAM Density


CPU 100
transistors provide an additional 40% 1,000 Speed
Relative

performance (increased frequency),


100
almost doubling overall performance GAP 10
within the same power envelope (per 10 DRAM Speed
scaling theory). In practice, however, 1
1
implementing a new microarchitec-
ture every generation is difficult, so 1980 1990 2000 2010 1980 1990 2000 2010
microarchitecture gains are typically (a) (b)
less. In recent microprocessors, the in-
creasing drive for energy efficiency has

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 69


contributed articles

processor and memory.33,37 In these area devoted to cache, and most of the architecture-improvement cycle has
hierarchies, the lowest-level caches available transistor budget was devot- been sustained for more than two
were small but fast enough to match ed to core microarchitecture advances. decades, delivering 1,000-fold perfor-
the processor’s needs in terms of high During this period, processors were mance improvement. How long will it
bandwidth and low latency; higher lev- probably cache-starved. As energy be- continue? To better understand and
els of the cache hierarchy were then came a concern, increasing cache size predict future performance, we decou-
optimized for size and speed. for performance has proven more en- ple performance gain due to transistor
Figure 5 outlines the evolution of ergy efficient than additional core-mi- speed and microarchitecture by com-
on-die caches over the past two de- croarchitecture techniques requiring paring the same microarchitecture
cades, plotting cache capacity (a) and energy-intensive logic. For this reason, on different process technologies and
percentage of die area (b) for Intel more and more transistor budget and new microarchitectures with the previ-
microprocessors. At first, cache sizes die area are allocated in caches. ous ones, then compound the perfor-
increased slowly, with decreasing die The transistor-scaling-and-micro- mance gain.
Figure 6 divides the cumulative
Figure 5. Evolution of on-die caches. 1,000-fold Intel microprocessor per-
formance increase over the past two
10,000 60% decades into performance delivered by
50% transistor speed (frequency) and due to
On-die cache (KB)

1,000 microarchitecture. Almost two-orders-


of total die area
On-die cache %

40%

100 30%
of-magnitude of this performance in-
crease is due to transistor speed alone,
20%
10 now leveling off due to the numerous
10%
challenges described in the following
1 0%
sections.
1u 0.5u 0.25u 0.13u 65nm 1u 0.5u 0.25u 0.13u 65nm

(a) (b)
The Next 20 Years
Microprocessor technology has deliv-
ered three-orders-of-magnitude per-
Figure 6. Performance increase separated into transistor speed and microarchitecture
formance improvement over the past
performance. two decades, so continuing this tra-
jectory would require at least 30x per-
formance increase by 2020. Micropro-
10,000 10,000
  Integer Performance   Floating-Point Performance
  Transistor Performance   Transistor Performance Table 1. New technology scaling
1,000 1,000
challenges.
Relative

Relative

100 100

10 10
Decreased transistor scaling benefits:
Despite continuing miniaturization, little
performance improvement and little
1 1
reduction in switching energy (decreasing
1.5u 0.5u 0.18u 65nm 1.5u 0.5u 0.18u 65nm
performance benefits of scaling) [ITRS].
(a) (b)
Flat total energy budget: package
power and mobile/embedded computing
drives energy-efficiency requirements.

Figure 7. Unconstrained evolution of a microprocessor results in excessive power


consumption.

Table 2. Ongoing technology scaling.


500
Unconstrained Evolution 100mm2 Die
400
Increasing transistor density (in area
and volume) and count: through
Power (Watts)

300
continued feature scaling, process
innovations, and packaging innovations.
200
Need for increasing locality and
reduced bandwidth per operation:
100
as performance of the microprocessor
increases, and the data sets for
0 applications continue to grow.
2002 2006 2010 2014 2008

70 commun ic ations of th e ac m | May 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

cessor-performance scaling faces new


challenges (see Table 1) precluding
use of energy-inefficient microarchi-
tecture innovations developed over the
Death of
past two decades. Further, chip archi- 90/10 Optimization,
Rise of
tects must face these challenges with
an ongoing industry expectation of a
30x performance increase in the next
decade and 1,000x increase by 2030
(see Table 2).
10×10 Optimization
As the transistor scales, supply Traditional wisdom suggests investing maximum transistors in the 90% case, with
voltage scales down, and the thresh- the goal of using precious transistors to increase single-thread performance that can
be applied broadly. In the new scaling regime typified by slow transistor performance
old voltage of the transistor (when and energy improvement, it often makes no sense to add transistors to a single core
the transistor starts conducting) also as energy efficiency suffers. Using additional transistors to build more cores produces
scales down. But the transistor is not a limited benefit—increased performance for applications with thread parallelism.
In this world, 90/10 optimization no longer applies. Instead, optimizing with an
a perfect switch, leaking some small accelerator for a 10% case, then another for a different 10% case, then another 10%
amount of current when turned off, case can often produce a system with better overall energy efficiency and performance.
increasing exponentially with reduc- We call this “10×10 optimization,”14 as the goal is to attack performance as a set of
tion in the threshold voltage. In ad- 10% optimization opportunities—a different way of thinking about transistor cost,
operating the chip with 10% of the transistors active—90% inactive, but a different 10%
dition, the exponentially increasing at each point in time.
transistor-integration capacity exacer- Historically, transistors on a chip were expensive due to the associated design
bates the effect; as a result, a substan- effort, validation and testing, and ultimately manufacturing cost. But 20 generations
tial portion of power consumption is of Moore’s Law and advances in design and validation have shifted the balance.
Building systems where the 10% of the transistors that can operate within the energy
due to leakage. To keep leakage under budget are configured optimally (an accelerator well-suited to the application) may
control, the threshold voltage cannot well be the right solution. The choice of 10 cases is illustrative, and a 5×5, 7×7, 10×10,
be lowered further and, indeed, must or 12×12 architecture might be appropriate for a particular design.
increase, reducing transistor perfor-
mance.10
As transistors have reached atomic er envelope is around 65 watts, and cache observed in today’s micropro-
dimensions, lithography and variabil- the die size is around 100mm2. Figure cessors. If the die integrates no logic at
ity pose further scaling challenges, af- 8 outlines a simple analysis for 45nm all, then the entire die could be popu-
fecting supply-voltage scaling.11 With process technology node; the x-axis is lated with about 16MB of cache and
limited supply-voltage scaling, energy the number of logic transistors inte- consume less than 10 watts of power,
and power reduction is limited, ad- grated on the die, and the two y-axes since caches consume less power than
versely affecting further integration are the amount of cache that would fit logic (Case A). On the other hand, if it
of transistors. Therefore, transistor- and the power the die would consume. integrates no cache at all, then it could
integration capacity will continue with As the number of logic transistors on integrate 75 million transistors for log-
scaling, though with limited perfor- the die increases (x-axis), the size of the ic, consuming almost 90 watts of pow-
mance and power benefit. The chal- cache decreases, and power dissipa- er (Case B). For 65 watts, the die could
lenge for chip architects is to use this tion increases. This analysis assumes integrate 50 million transistors for
integration capacity to continue to im- average activity factor for logic and logic and about 6MB of cache (Case C).
prove performance.
Package power/total energy con- Figure 8. Transistor integration capacity at a fixed power envelope.
sumption limits number of logic tran-
2008, 45nm, 100mm2
sistors. If chip architects simply add 100 18
more cores as transistor-integration
Case A, 16MB of Cache n 16
capacity becomes available and oper- atio
80 issip
ate the chips at the highest frequen- er D 14
Pow
Total Power (Watts)

cy the transistors and designs can Cac


12
Cache (MB)

60 he
achieve, then the power consumption Siz
e Case C 10
50MT Logic
of the chips would be prohibitive (see 6MB Cache 8
40
Figure 7). Chip architects must limit
6
frequency and number of cores to keep
4
power within reasonable bounds, but 20

doing so severely limits improvement Case A, 0 Logic, 8W


2

in microprocessor performance. 0 0
Case B
Consider the transistor-integration 0 20 40 60 80

capacity affordable in a given power Logic Transistors (Millions)


envelope for reasonable die size. For
regular desktop applications the pow-

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 71


contributed articles

This design point matches the dual- If this analysis is performed for fu- capacitance, then the results will be
core microprocessor on 45nm technol- ture technologies, assuming (our best as they appear in Table 1. Note that
ogy (Core2 Duo), integrating two cores estimates) modest frequency increase over the next 10 years we expect in-
of 25 million transistors each and 6MB 15% per generation, 5% reduction in creased total transistor count, follow-
of cache in a die area of about 100mm2. supply voltage, and 25% reduction of ing Moore’s Law, but logic transistors
increase by only 3x and cache transis-
Figure 9. Three scenarios for integrating 150-million logic transistors into cores. tors increase more than 10x. Apply-
ing Pollack’s Rule, a single processor
core with 150 million transistors will
provide only about 2.5x microarchitec-
5 MT 2 3
Large-Core Large-Core ture performance improvement over
2 25MT
25 MT today’s 25-million-transistor core,
5 MT 2 3 well shy of our 30x goal, while 80MB of
cache is probably more than enough
3 4 for the cores (see Table 3).
The reality of a finite (essentially
fixed) energy budget for a microproces-
5 6 sor must produce a qualitative shift in
how chip architects think about archi-
30 20 tecture and implementation. First, en-
ergy-efficiency is a key metric for these
Large-Core Homogeneous Small-Core Homogeneous Small-Core Homogeneous designs. Second, energy-proportional
Large-core 1 Large-core Large-core 1 computing must be the ultimate goal
throughput throughput throughput for both hardware architecture and
Small-core Small-core Pollack’s Rule Small-core Pollack’s Rule software-application design. While
throughput throughput (5/25)0.5=0.45 throughput (5/25)0.5=0.45 this ambition is noted in macro-scale
Total 6 Total 13 Total 11 computing in large-scale data cen-
throughput throughput throughput
ters,5 the idea of micro-scale energy-
(a) (b) (c) proportional computing in micropro-
cessors is even more challenging. For
microprocessors operating within a
finite energy budget, energy efficiency
Figure 10. A system-on-a-chip from Texas Instruments. corresponds directly to higher perfor-
mance, so the quest for extreme energy
efficiency is the ultimate driver for per-
C64x+ DSP Display Subsystem
and video
formance.
accelerators LCD Video 10-bit DAC In the following sections, we out-
Controller Enc 10-bit DAC
ARM
(3525/3530 only) line key challenges and sketch poten-
Cortex tial approaches. In many cases, the
A8 challenges are well known and the
Camera I/F
CPU
2D/3D Graphics subject of significant research over
(3515/3530 only) Image
Pipe Parallel I/F many years. In all cases, they remain
critical but daunting for the future of
microprocessor performance:
Organizing the logic: Multiple cores
and customization. The historic mea-
L3/L4 Interconnect
sure of microprocessor capability is
the single-thread performance of a
traditional core. Many researchers
Peripherals Connectivity System have observed that single-thread per-
USB 2.0 HS USB Host Timers formance has already leveled off, with
GP x12
OTG Controller Controller x2
WDT x2 only modest increases expected in the
coming decades. Multiple cores and
Program/Data Storage
customization will be the major driv-
Serial Interfaces
ers for future microprocessor perfor-
McBSP x5 I2C x3 UART x2 HDQ/1-wire SDRC MMC/SD/SDIO
x3 mance (total chip performance). Mul-
McSPI x4 UART w/ GPMC tiple cores can increase computational
IRDA
throughput (such as a 1x–4x increase
could result from four cores), and cus-
tomization can reduce execution la-

72 communicat ions of th e ac m | May 2 0 1 1 | vo l . 5 4 | no. 5


contributed articles

Table 3. Extrapolated transistor ber of cores, and the related choices ity in smartphone system-on-a-chip
integration capacity in a fixed power in a multicore processor with uniform (SoC). As outlined in Figure 10, such
envelope. instruction set but heterogeneous im- an SoC might include as many as 10
plementation are an important part to 20 accelerators to achieve a supe-
Logic
of increasing performance within the rior balance of energy efficiency and
Transistors transistor budget and energy envelope. performance. This example could also
Year (Millions) Cache MB Choices in hardware customization. include graphics, media, image, and
2008 50 6 Customization includes fixed-function cryptography accelerators, as well as
2014 100 25 accelerators (such as media codecs, support for radio and digital signal
2018 150 80 cryptography engines, and composit- processing. As one might imagine,
ing engines), programmable accelera- one of these blocks could be a dynami-
tors, and even dynamically customiz- cally programmable element (such as
able logic (such as FPGAs and other an FPGA or a software-programmable
tency. Clearly, both techniques—mul- dynamic structures). In general, cus- processor).
tiple cores and customization—can tomization increases computational Another customization approach
improve energy efficiency, the new performance by exploiting hardwired constrains the types of parallelism
fundamental limiter to capability. or customized computation units, cus- that can be executed efficiently, en-
Choices in multiple cores. Multiple tomized wiring/interconnect for data abling a simpler core, coordination,
cores increase computational through- movement, and reduced instruction- and memory structures; for example,
put by exploiting Moore’s Law to rep- sequence overheads at some cost in many CPUs increase energy efficiency
licate cores. If the software has no generality. In addition, the level of par- by restricting memory access structure
parallelism, there is no performance allelism in hardware can be custom- and control flexibility in single-instruc-
benefit. However, if there is parallel- ized to match the precise needs of the tion, multiple-data or vector (SIMD)
ism, the computation can be spread computation; computation benefits structures,1,2 while GPUs encourage
across multiple cores, increasing over- from hardware customization only programs to express structured sets
all computational performance (and when it matches the specialized hard- of threads that can be aligned and ex-
reducing latency). Extensive research ware structures. In some cases, units ecuted efficiently.26,30 This alignment
on how to organize such systems dates hardwired to a particular data repre- reduces parallel coordination and
to the 1970s.29,39 sentation or computational algorithm memory-access costs, enabling use of
Industry has widely adopted a mul- can achieve 50x–500x greater energy large numbers of cores and high peak
ticore approach, sparking many ques- efficiency than a general-purpose reg- performance when applications can
tions about number of cores and size/ ister organization. Two studies21,22 of a be formulated with a compatible par-
power of each core and how they co- media encoder and TCP offload engine allel structure. Several microprocessor
ordinate.6,36 But if we employ 25-mil- illustrate the large energy-efficiency manufacturers have announced future
lion-transistor cores (circa 2008), the improvement that is possible. mainstream products that integrate
150-million-logic-transistor budget Due to battery capacity and heat- CPUs and GPUs.
expected in 2018 gives 6x potential dissipation limits, for many years Customization for greater energy
throughput improvement (2x from energy has been the fundamental or computational efficiency is a long-
frequency and 3x from increased log- limiter for computational capabil- standing technique, but broad adop-
ic transistors), well short of our 30x
goal. To go further, chip architects Table 4. Logic organization challenges, trends, directions.

must consider more radical options


of smaller cores in greater numbers,
along with innovative ways to coordi- Challenge Near-Term Long-Term
nate them. Integration and I/O-based interaction, shared memory Intelligent, automatic data movement
Looking to achieve this vision, memory model spaces, explicit coherence management among heterogeneous cores, managed
consider three potential approaches by software-hardware partnership

to deploying the feasible 150 million Software Explicit partition and mapping, Hardware-based state adaptation
transparency virtualization, application management and software-hardware partnership
logic transistors, as in Table 1. In Fig- for management
ure 9, option (a) is six large cores (good Lower-power Heterogeneous cores, vector extensions, Deeper, explicit storage hierarchy within
single-thread performance, total po- cores and GPU-like techniques to reduce the core; integrated computation in
tential throughput of six); option (b) is instruction- and data-movement cost registers
30 smaller cores (lower single-thread Energy Hardware dynamic voltage scaling Predictive core scheduling and selection
management and intelligent adaptive management, to optimize energy efficiency and
performance, total potential through-
software core selection and scheduling minimize data movement
put of 13); and option (c) is a hybrid
Accelerator Increasing variety, library-based Converged accelerators in a few
approach (good single-thread perfor- variety encapsulation (such as DX and OpenGL) application categories and increasing
mance for low parallelism, total poten- for specific domains open programmability for the
tial throughput of 11). accelerators

Many more variations are possible


on this spectrum of core size and num-

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 73


contributed articles

tion has been slowed by continued the performance advantage might path toward increased performance
improvement in microprocessor sin- soon be overtaken by advances in the or energy efficiency (see Table 4). But
gle-thread performance. Developers of traditional microprocessor. With slow- such software customization is diffi-
software applications had little incen- ing improvement in single-thread per- cult, especially for large programs (see
tive to customize for accelerators that formance, this landscape has changed the sidebar “Decline of 90/10 Optimi-
might be available on only a fraction of significantly, and for many applica- zation, Rise of 10x10 Optimization”).
the machines in the field and for which tions, accelerators may be the only Orchestrating data movement:
Memory hierarchies and intercon-
Figure 11. On-die interconnect delay and energy (45nm).
nects. In future microprocessors, the
energy expended for data movement
10,000 2 1,000
will have a critical effect on achiev-
On-die network energy per bit able performance. Every nano-joule
100
1,000 1.5 of energy used to move data up and
Wire Delay
down the memory hierarchy, as well
Delay (ps)

pJ/Bit 10

(pJ)
Measured
100 Wire Energy 1 as to synchronize across and data be-
1
tween processors, takes away from the
10 0.5 0.1
Extrapolated limited budget, reducing the energy
0.01 available for the actual computation.
1 0
0 5 10 15 20 0.5u 0.18u 65nm 22nm 8nm In this context, efficient memory hi-
On-die interconnect length (mm) erarchies are critical, as the energy to
(a) (b)
retrieve data from a local register or
cache is far less than the energy to go
to DRAM or to secondary storage. In
addition, data must be moved between
Figure 12. Hybrid switching for network-on-a-chip. processing units efficiently, and task
placement and scheduling must be
optimized against an interconnection
C C C C network with high locality. Here, we
C C C C
examine energy and power associated
Bus
R Bus
R
Bus Bus with data movement on the processor
C C C C die.
C C C C
Today’s processor performance is
C C C C on the order of 100Giga-op/sec, and
C C C C C C
R
Bus R
Bus a 30x increase over the next 10 years
Bus Bus Bus
would increase this performance to
C C C C
C C C C C C 3Tera-op/sec. At minimum, this boost
requires 9Tera-operands or 64b x
Bus to connect Second-level bus to connect Second-level router-based
a cluster clusters (hierarchy of busses) network (hierarchy of networks) 9Tera-operands (or 576Tera-bits) to be
moved each second from registers or
memory to arithmetic logic, consum-
ing energy.
Table 5. Data movement challenges, trends, directions. Figure 11(a) outlines typical wire
delay and energy consumed in moving
one bit of data on the die. If the oper-
Challenge Near-Term Long-Term ands move on average 1mm (10% of
Parallelism Increased parallelism Heterogeneous parallelism and die size), then at the rate of 0.1pJ/bit,
customization, hardware/runtime
placement, migration, adaptation
the 576Tera-bits/sec of movement con-
for locality and load balance sumes almost 58 watts with hardly any
Data Movement/ More complex, more exposed hierarchies; New memory abstractions and energy budget left for computation. If
Locality new abstractions for control over mechanisms for efficient vertical most operands are kept local to the ex-
movement and “snooping” data locality management with low ecution units (such as in register files)
programming effort and energy
and the data movement is far less than
Resilience More aggressive energy reduction; Radical new memory technologies
compensated by recovery for resilience (new physics) and resilience techniques 1mm, on, say, the order of only 0.1mm,
Energy Fine-grain power management in packet Exploitation of wide data, slow clock, then the power consumption is only
Proportional fabrics and circuit-based techniques around 6 watts, allowing ample energy
Communication budget for the computation.
Reduced Energy Low-energy address translation Efficient multi-level naming and Cores in a many-core system are
memory-hierarchy management
typically connected through a net-
work-on-a-chip to move data around
the cores.40 Here, we examine the ef-

74 communications of th e acm | May 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

fect of such a network on power con- Figure 13. Improving energy efficiency through voltage scaling.
sumption. Figure 11(b) shows the en-
ergy consumed in moving a bit across
a hop in such a network, measured in 104
65nm CMOS, 50° C
102 450
65nm CMOS, 50° C
101

Energy Efficienty (GOP/Watt)

Active Leakage Power (mW)


historic networks, and extrapolated

Maximum Frequency (MHz)


400
into the future from previous assump-

Total Power (Watts)


350

Subthreshold Region
103 101
300 1
tions. If only 10% of the operands move
250
over the network, traversing 10 hops 102 1
200
320mV
on average, then at the rate of 0.06pJ/ 150 10 –1
101 10 –1
bit the network power would be 35 100
320mV 50 320mV
watts, more than half the power bud- 0
1 10 –2 10 –2
get of the processor. 0.2 0.4 0.6 0.8 1.0 1.2 1.4 0.2 0.4 0.6 0.8 1.0 1.2 1.4
As the energy cost of computation is Supply Voltage (V) Supply Voltage (V)
reduced by voltage scaling (described
later), emphasizing compute through-
put, the cost of data movement starts
to dominate. Therefore, data move- Table 6. Circuits challenges, trends, directions.
ment must be restricted by keeping
data locally as much as possible. This
restriction also means the size of local Challenge Near-Term Long-Term
storage (such as a register file) must Power, energy Continuous dynamic voltage and Discrete dynamic voltage and frequency
increase substantially. This increase efficiency frequency scaling, power gating, reactive scaling, near threshold operation,
power management proactive fine-grain power and energy
is contrary to conventional thinking of management
register files being small and thus fast. Variation Speed binning of parts, corrections with Dynamic reconfiguration of many cores
With voltage scaling the frequency of body bias or supply voltage changes, by speed
operation is lower anyway, so it makes tighter process control
sense to increase the size of the local Gradual, Guard-bands, yield loss, core sparing, Resilience with hardware/software
storage at the expense of speed. temporal, design for manufacturability co-design, dynamic in-field detection,
intermittent, diagnosis, reconfiguration and repair,
Another radical departure from and permanent adaptability, and self-awareness
conventional thinking is the role of faults
the interconnect network on the chip.
Recent parallel machine designs have
been dominated by packet-switch-
ing,6,8,24,40 so multicore networks ad- traditional parallel-machine approach also reduces, but energy efficiency in-
opted this energy-intensive approach. (see Table 5). creases. When the supply voltage is
In the future, data movement over The role of microprocessor archi- reduced all the way to the transistor’s
these networks must be limited to con- tect must expand beyond the proces- threshold, energy efficiency increases
serve energy, and, more important, sor core, into the whole platform on by an order of magnitude. Employing
due to the large size of local storage a chip, optimizing the cores as well as this technique on large cores would
data bandwidth, demand on the net- the network and other subsystems. dramatically reduce single-thread
work will be reduced. In light of these Pushing the envelope: Extreme performance and is hence not recom-
findings on-die-network architectures circuits, variability, resilience. Our mended. However, smaller cores used
need revolutionary approaches (such analysis showed that in the power-
as hybrid packet/circuit switching4). constrained scenario, only 150 mil- Figure 14. A heterogeneous many-core
system with variation.
Many older parallel machines used lion logic transistors for processor
irregular and circuit-switched net- cores and 80MB of cache will be af-
works31,41; Figure 12 describes a re- fordable due to energy by 2018. Note
turn to hybrid switched networks for that 80MB of cache is not necessary
on-chip interconnects. Small cores in for this system, and a large portion of Single-thread
Large-Core Large-Core
close proximity could be interconnect- the cache-transistor budget can be uti- performance

ed into clusters with traditional bus- lized to integrate even more cores if it
ses that are energy efficient for data can be done with the power-consump- Throughput
movement over short distances. The tion density of a cache, which is 10x performance
f/2 f/4 f f/2
clusters could be connected through less than logic. This approach can be Energy
wide (high-bandwidth) low-swing (low- achieved through aggressive scaling of f/4 f f/2 f/4 efficient with
fine-grain
energy) busses or through packet- or supply voltage.25 f f/2 f/4 f power
circuit-switched networks, depending Figure 13 outlines the effective- management
on distance. Hence the network-on-a- ness of supply-voltage scaling when
chip could be hierarchical and hetero- the chip is designed for it. As the
geneous, a radical departure from the supply voltage is reduced, frequency

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he ac m 75
contributed articles

for throughput would certainly benefit given core are individually controlled advanced interpretive and compiler
from it. Moreover, the transistor bud- such that the total power consumption technologies, as well as increasing use
get from the unused cache could be is within the power envelope. Many of dynamic translation techniques. We
used to integrate even more cores with small cores operate at lower voltages expect these trends to continue, with
the power density of the cache. Aggres- and frequency for improved energy ef- higher-level programming, extensive
sive voltage scaling provides an avenue ficiency, while some small cores oper- customization through libraries, and
for utilizing the unused transistor-in- ate near threshold voltage at the lowest sophisticated automated performance
tegration capacity for logic to deliver frequency but at higher energy effi- search techniques (such as autotun-
higher performance. ciency, and some cores may be turned ing) will be even more important.
Aggressive supply-voltage scaling off completely. Clock frequencies need Extreme studies27,38 suggest that
comes with its own challenges (such not be continuous; steps (in powers of aggressive high-performance and ex-
as variations). As supply voltage is re- two) keep the system synchronous and treme-energy-efficient systems may
duced toward a transistor’s threshold simple without compromising perfor- go further, eschewing the overhead of
voltage, the effect of variability is even mance while also addressing variation programmability features that soft-
worse, because the speed of a circuit tolerance. The scheduler dynamically ware engineers have come to take for
is proportional to the voltage over- monitors workload and configures the granted; for example, these future sys-
drive (supply voltage minus threshold system with the proper mix of cores tems may drop hardware support for
voltage). Moreover, as supply voltage and schedules the workload on the a single flat address space (which nor-
approaches the threshold, any small right cores for energy-proportional mally wastes energy on address manip-
change in threshold voltage affects the computing. Combined heterogene- ulation/computing), single-memory
speed of the circuit. Therefore, varia- ity, aggressive supply-voltage scaling, hierarchy (coherence and monitoring
tion in the threshold voltage mani- and fine-grain power (energy) manage- energy overhead), and steady rate of
fests itself as variation in the speed ment enables utilization of a larger execution (adapting to the available
of the core, the slowest circuit in the fraction of transistor-integration ca- energy budget). These systems will
core determines the frequency of op- pacity, moving closer to the goal of 30x place more of these components un-
eration of the core, and a large core is increase in compute performance (see der software control, depending on in-
more susceptible to lower frequency Table 6). creasingly sophisticated software tools
of operation due to variations. On the Software challenges renewed: Pro- to manage the hardware boundaries
other hand, a large number of small grammability versus efficiency. The and irregularities with greater energy
cores has a better distribution of fast end of scaling of single-thread perfor- efficiency. In extreme cases, high-per-
and slow small cores and can better mance already means major software formance computing and embedded
even out the effect of variations. We challenges; for example, the shift to applications may even manage these
next discuss an example system that symmetric parallelism has created per- complexities explicitly. Most architec-
is variation-tolerant, energy-efficient, haps the greatest software challenge tural features and techniques we’ve
energy-proportional, and fine-grain in the history of computing,12,15 and discussed here shift more responsi-
power managed. we expect future pressure on energy- bility for distribution of the computa-
A hypothetical heterogeneous pro- efficiency will lead to extensive use of tion and data across the compute and
cessor (see Figure 14) consists of a heterogeneous cores and accelerators, storage elements of microprocessors
small number of large cores for single- further exacerbating the software chal- to software.13,18 Shifting responsibility
thread performance and many small lenge. Fortunately, the past decade has increases potential achievable energy
cores for throughput performance. seen increasing adoption of high-level efficiency, but realizing it depends on
Supply voltage and the frequency of any “productivity” languages20,34,35 built on significant advances in applications,
compilers and runtimes, and operat-
Table 7. Software challenges, trends, directions.
ing systems to understand and even
predict the application and workload
behavior.7,16,19 However, these ad-
Challenge Near-Term Long-Term
vances require radical research break-
1,000-fold Data parallel languages and “mapping” New high-level languages,
software of operators, library and tool-based compositional and deterministic
throughs and major changes in soft-
parallelism approaches frameworks ware practice (see Table 7).

Energy-efficient Manual control, profiling, maturing to New algorithms, languages, Conclusion


data movement automated techniques (auto-tuning, program analysis, runtime, The past 20 years were truly the great
and locality optimization) and hardware techniques
old days for Moore’s Law scaling and
Energy Automatic fine-grain hardware Self-aware runtime and
management management application-level techniques that
microprocessor performance; dra-
exploit architecture features for matic improvements in transistor
visibility and control density, speed, and energy, combined
Resilience Algorithmic, application-software New hardware-software partnerships with microarchitecture and memory-
approaches, adaptive checking and that minimize checking and
hierarchy techniques delivered 1,000-
recovery recomputation energy
fold microprocessor performance
improvement. The next 20 years—the

76 commun ications of th e acm | May 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

pretty good new days, as progress predict whether some form of scaling with YCSB. ACM Symposium on Cloud Computing
(June 2010).
continues—will be more difficult, (perhaps energy) will continue or there 17. Dennard, R. et al. Design of ion-implanted MOSFETs
with Moore’s Law scaling producing will be no scaling at all. The pretty with very small physical dimensions. IEEE Journal of
Solid State Circuits SC-9, 5 (Oct. 1974), 256–268.
continuing improvement in transis- good old days of scaling that processor 18. Fatahalian, K. et al. Sequoia: Programming the memory
tor density but comparatively little design faces today are helping prepare hierarchy. ACM/IEEE Conference on Supercomputing
(Nov. 2006).
improvement in transistor speed and us for these new challenges. More- 19. Flinn, J. et al. Managing battery lifetime with energy-
energy. As a result, the frequency of over, the challenges processor design aware adaptation. ACM Transactions on Computer
Systems 22, 2 (May 2004).
operation will increase slowly. Energy will faces in the next decade will be 20. Gosling, J. et al. The Java Language Specification,
will be the key limiter of performance, dwarfed by the challenges posed by Third Edition. Addison-Wesley, 2005.
21. Hameed, R. et al. Understanding sources of inefficiency
forcing processor designs to use large- these alternative technologies, render- in general-purpose chips. International Symposium on
Computer Architecture (2010).
scale parallelism with heterogeneous ing today’s challenges a warm-up exer- 22. Hoskote, Y. et al. A TCP offload accelerator for 10Gb/s
cores, or a few large cores and a large cise for what lies ahead. Ethernet in 90-nm CMOS. IEEE Journal of Solid-State
Circuits 38, 11 (Nov. 2003).
number of small cores operating at 23. International Technology Roadmap for
low frequency and low voltage, near Acknowledgments Semiconductors, 2009; http://www.itrs.net/
Links/2009ITRS/Home2009.htm
threshold. Aggressive use of custom- This work was inspired by the Exas- 24. Karamcheti, V. et al. Comparison of architectural
ized accelerators will yield the highest cale study working groups chartered in support for messaging in the TMC CM-5 and Cray T3D.
International Symposium on Computer Architecture
performance and greatest energy effi- 2007 and 2008 by Bill Harrod of DAR- (1995).
ciency on many applications. Efficient PA. We thank him and the members 25. Kaul, H. et al. A 320mV 56W 411GOPS/Watt ultra-low-
voltage motion-estimation accelerator in 65nm CMOS.
data orchestration will increasingly and presenters to the working groups IEEE Journal of Solid-State Circuits 44, 1 (Jan. 2009).
be critical, evolving to more efficient for valuable insightful discussions 26. The Khronos Group. OpenCL, the Open Standard for
Heterogeneous Parallel Programming, Feb. 2009;
memory hierarchies and new types of over the past few years. We also thank http://www.khronos.org/opencl/
interconnect tailored for locality and our colleagues at Intel who have im- 27. Kogge, P. et al. Exascale Computing Study:
Technology Challenges in Achieving an Exascale
that depend on sophisticated software proved our understanding of these is- System; http://users.ece.gatech.edu/mrichard/
to place computation and data so as to sues through many thoughtful discus- ExascaleComputingStudyReports/exascale_final_
report_100208.pdf
minimize data movement. The objec- sions. Thanks, too, to the anonymous 28. Mazor, S. The history of microcomputer-invention and
evolution. Proceedings of the IEEE 83, 12 (Dec. 1995).
tive is ultimately the purest form of reviewers whose extensive feedback 29. Noguchi, K., Ohnishi, I., and Morita, H. Design
energy-proportional computing at the greatly improved the article. considerations for a heterogeneous tightly coupled
multiprocessor system. AFIPS National Computer
lowest-possible levels of energy. Het- Conference (1975).
erogeneity in compute and commu- References
30. Nvidia Corp. CUDA Programming Guide Version 2.0,
June 2008; http://www.nvidia.com/object/cuda_home_
nication hardware will be essential to 1. Advanced Vector Extensions. Intel; http://en.wikipedia.
new.html
org/wiki/Advanced_Vector_Extensions
optimize for performance for energy- 2. AltiVec, Apple, IBM, Freescale; http://en.wikipedia.org/
31. Pfister, G. et al. The research parallel processor
prototype (RP3): Introduction and architecture.
proportional computing and coping wiki/AltiVec
International Conference on Parallel Processing (Aug.
3. Amdahl, G. Validity of the single-processor approach
with variability. Finally, programming to achieving large-scale computing capability. AFIPS
1985).
32. Pollack, F. Pollack’s Rule of Thumb for Microprocessor
systems will have to comprehend Joint Computer Conference (Apr. 1967), 483–485.
Performance and Area; http://en.wikipedia.org/wiki/
4. Anders, M. et al. A 4.1Tb/s bisection-bandwidth
these restrictions and provide tools 560Gb/s/W streaming circuit-switched 8x8 mesh
Pollack’s_Rule
33. Przybylski, S.A. et al. Characteristics of performance-
and environments to harvest the per- network-on-chip in 45nm CMOS. International Solid
optimal multi-level cache hierarchies. International
State Circuits Conference (Feb. 2010).
formance. Symposium on Computer Architecture (June 1989).
5. Barroso, L.A. and Hölzle, U. The case for energy-
34. Richter, J. The CLR Via C#, Second Edition, 1997.
While no one can reliably predict proportional computing. IEEE Computer 40, 12 (Dec.
35. Ruby Documentation Project. Programming Ruby: The
2007).
the end of Si CMOS scaling, for this Pragmatic Programmer’s Guide; http://www.ruby-doc.
6. Bell, S. et. al. TILE64 processor: A 64-core SoC with
org/docs/ProgrammingRuby/
future scaling regime, many electrical mesh interconnect. IEEE International Solid-State
36. Seiler, L. et al. Larrabee: Many-core x86 architecture
Circuits Conference (2008).
for visual computing. ACM Transactions on Graphics
engineers have begun exploring new 7. Bienia, C. et. al. The PARSEC benchmark suite:
27, 3 (Aug. 2008).
Characterization and architectural implications.
types of switches and materials (such The 17th International Symposium on Parallel
37. Strecker, W. Transient behavior of cache memories.
ACM Transactions on Computer Systems 1, 4 (Nov.
as compound semiconductors, carbon Architectures and Compilation Techniques (2008).
1983).
8. Blumrich, M. et. al. Design and Analysis of the Blue
nanotubes, and graphene) with dif- Gene/L Torus Interconnection Network. IBM Research
38. Sarkar, V. et al. Exascale Software Study:
Software Challenges in Extreme-Scale
ferent performance and scaling char- Report, 2003.
Systems; http://users.ece.gatech.edu/mrichard/
9. Borkar, S. Designing reliable systems from unreliable
acteristics from Si CMOS, posing new components: The challenges of transistor variability
ExascaleComputingStudyReports/ECSS%20report%20
101909.pdf
types of design and manufacturing and degradation. IEEE Micro 25, 6 (Nov.–Dec. 2005).
39. Tartar, J. Multiprocessor hardware: An architectural
10. Borkar, S. Design challenges of technology scaling.
challenges. However, all such technol- IEEE Micro 19, 4 (July–Aug. 1999).
overview. ACM Annual Conference (1980).
40. Weingold, E. et al. Baring it all to software: Raw
ogies are in their infancy, probably not 11. Borkar, S. et al. Parameter variations and impact
machines. IEEE Computer 30, 9 (Sept. 1997).
on circuits and microarchitecture. The 40th Annual
ready in the next decade to replace sili- Design Automation Conference (2003).
41. Wulf, W. and Bell, C.G. C.mmp: A multi-miniprocessor.
AFIPS Joint Computer Conferences (Dec. 1972).
con but will pose the same challenges 12. Catanzaro, B. et. al. Ubiquitous parallel computing
from Berkeley, Illinois, and Stanford. IEEE Micro 30, 2
with continued scaling. Quantum (2010).
13. Cray, Inc. Chapel Language Specification. Seattle, WA, Shekhar Borkar (Shekhar.Y.Borkar@intel.com) is an
electronics (such as quantum dots) Intel Fellow and director of exascale technology at Intel
2010; http://chapel.cray.com/spec/spec-0.795.pdf
are even farther out and when realized 14. Chien, A. 10x10: A general-purpose architectural Corporation, Hillsboro, OR.
will reflect major challenges of its own, approach to heterogeneity and energy efficiency. The
Third Workshop on Emerging Parallel Architctures Andrew A. Chien (Andrew.Chien@alum.mit.edu) is
with yet newer models of computation, at the International Conference on Computational former vice president of research at Intel Corporation and
Science (June 2011). currently adjunct professor in the Computer Science and
architecture, manufacturing, variabil- 15. Chien, A. Pervasive parallel computing: An historic Engineering Department at the University of California,
ity, and resilience. opportunity for innovation in programming and San Diego.
architecture. ACM Principles and Practice of Parallel
Because the future winners are far Programming (2007).
from clear today, it is way too early to 16. Cooper, B. et al. Benchmarking cloud serving systems © 2011 ACM 0001-0782/11/05 $10.00

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 77


contributed articles
doi:10.1145/1941487.1941508
implicit in the Internet’s architecture,
Privacy-preserving attribution of IP packets since the lowest-level identifiers—net-
work addresses (IP addresses)—are
can help balance forensics with an individual’s inherently virtual and insecure. It can
right to privacy. be extremely challenging to attribute
an online action to a physical origin,
by Mikhail Afanasyev, Tadayoshi Kohno, let alone to a particular individual. Re-
Justin Ma, Nick Murphy, Stefan Savage, ducing this expectation of anonymity
Alex C. Snoeren, and Geoffrey M. Voelker even slightly can potentially disincen-
tivize a range of criminal activity and

Privacy-
lengthen the effective lifetime of de-
fense mechanisms.
Compelling though this line of
thinking may be, there is a natural ten-

Preserving
sion between the need for attribution
and user expectations of privacy. While
the public generally appreciates that
criminal acts should be subject to scru-

Network
tiny, civil libertarians are considerably
less sanguine about exposing identify-
ing information as a matter of course.
Indeed, a recently leaked document, of

Forensics
allegedly International Telecommuni-
cations Union provenance, lends cre-
dence to libertarian fears, motivating
the need for network-level “IP trace-
back” capabilities via a government’s
desire to identify anonymous political
opponents.12 Though this is but one
example, it is time to explore techni-
cal solutions that balance the enforce-
ment interests of the state and the pri-
vacy interests of individuals.
We seek to achieve such a balance
by introducing a new network-layer
Research in ne t wo r k security has traditionally capability we call privacy-preserving
focused on defense—mechanisms designed to forensic attribution. We propose a
packet-level cryptographic signature
impede an adversary. However, paraphrasing security
expert Butler Lampson, practical security requires key insights
a balance between defense and deterrence. While A n anonymous Internet protects the
privacy of people’s Internet activity
defense may block an adversary’s current attacks, only but means criminal activity could go
an effective deterrent can prevent the adversary from unattributed.

choosing to attack in the first place. But creating such A fully attributed, non-anonymous
Internet linking all Internet traffic back
a deterrent is usually predicated on an effective means to its source would help monitor and
track criminal activity but could also
of attribution—tying an individual to an action. compromise the privacy of everyday
users.
In the physical world, this link is established
through concrete evidence (such as DNA, fingerprints, A ll Internet packets are inherently
anonymous but, with appropriate
and writing samples), but the Internet has no such credentials, authorized parties can
revoke that anonymity and attribute
robust forensic trail. Indeed, functional anonymity is packets back to their source.

78 commun ications of th e acm | May 2 0 1 1 | vol . 5 4 | no. 5


mechanism allowing properly autho- tographic overhead. Surprisingly, we pability, with numerous potential ap-
rized parties to examine any packet, found that much of the overhead can be plications, including the subset we sur-
even those logged months prior, un- hidden or amortized through careful vey here. For certain types of crimes,
ambiguously identifying the physical protocol design alone. Thus, even our law-enforcement officers routinely
machine that sent it. However, absent untuned user-level software prototype face the challenge of how to map be-
express authorization, packet signa- adds less than 30ms of latency to in- tween traffic received at some point
tures do not expose identifying infor- teractive traffic and achieves bulk TCP in the network and the physical device
mation. Finally, we enforce the correct throughput exceeding 17Mbps. More- of origin. Establishing this mapping
use of this mechanism by allowing any over, this throughput, which is sig- would allow investigators to determine
network element to verify the validity of nificantly greater than a typical broad- if the same device was used in multiple
the signatures it receives. band access connection, is limited by crimes, if a particular activity was per-
Our goal is principally to assess the the speed of the receiver; aggregate petrated by a known device, and poten-
viability of privacy-preserving attribu- server throughput can be considerably tially to track even the location of a tar-
tion. Over the past four years, we have greater. While numerous challenges geted device via IP geolocation.
built a prototype system called Clue to remain, our research demonstrates the A concrete example comes from
explore the practical engineering chal- feasiblity of privacy-preserving foren- the following email one of the authors
photogra ph by A licia k ubista

lenges of building a privacy-preserving sic attribution, encouraging wider con- received from a corporal in the Rhode
forensic-attribution capability. This sideration of our approach. Island State Police Department: “We
illuminating experience revealed the are currently attempting to locate an
architectural requirements of our ap- Motivating Scenarios international fugitive who is wanted
proach while forcing us to confront Forensic attribution would create a for [a violent crime]. We have identi-
the challenges of the underlying cryp- fundamentally new network-layer ca- fied a Pocket PC device attached to the

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 79


contributed articles

Internet which the [fugitive] is appar- ets back to their source,17,19 but their screen and, upon examination, a range
ently using...” approaches are motivated by network of hair and skin samples beneath the
Though unable to discuss the de- operational needs and focus on deliv- keyboard. If this laptop were found, it
tails of the case publicly, we can con- ering topological path information, an could be unambiguously linked to one
sider the model: The police have a even more abstract property than an IP of the authors via DNA or fingerprint
single packet trace known to be from address. comparisons;
the fugitive’s device (perhaps a threat- More important, IP addresses are Per-packet granularity. The best de-
ening email message) and now seek to not unique identifiers, even when terrence is when attribution is univer-
determine if other threatening mes- used as intended. An IP address repre- sal, applied equally to every packet.
sages were also sent from the same de- sents a topological location in the net- Moreover, by providing this capabil-
vice, thereby identifying the fugitive’s work for the purpose of routing, not as ity at the network layer, attribution is
current IP address and, hence, geo- a way to specify a physical endpoint. transparently provided to all higher-
graphic area of operation. It is common for protocols (such as layer protocols and applications. That
Also increasingly common is for DHCP, Mobile IP, and NAT) to dynam- is, there is an inherent benefit in not
authorities to recover computer equip- ically change the mapping between tying forensic attribution to any par-
ment when suspects are taken into cus- IP address and physical machine as ticular higher-level network construct.
tody. Tying it to other online actions, part of their normal use. While some Forensic attribution is most effective
especially beyond a reasonable doubt, mappings are logged, this data is com- when provided as a fundamental build-
is challenging absent a strong forensic monly retained for only a limited pe- ing block on which arbitrary higher-
identifier. A strong forensic identifier riod. “The Internet,” David Aucsmith level protocols, services, and applica-
would allow a recovered laptop to be wrote, “provides criminals two of the tions can be built;
directly and unambiguously bound to most coveted qualities: anonymity Unimpeachability. While we would
particular messages logged by law en- and mobility.”3 be satisfied if a new attribution capa-
forcement. While we are unaware of other pub- bility simply offered investigative value
lished attempts to provide network- for those pursuing criminals, we hope
Background and Related Work level forensic attribution to physical that any attribution mechanism would
The value of forensic attribution—use hosts, a number of related research be accepted as sufficiently accurate
of technical means to establish the projects make similar use of crypto- and trustworthy to provide evidentiary
presence of a person or object at a crime graphic mechanisms. The source-au- value in the courtroom as well. We
scene after the fact—has a long history thentication systems, or “packet pass- therefore seek strong cryptographic
in law enforcement, dating to the late ports,” of Liu et al.14 and “Accountable mechanisms that are not easily repudi-
19th century.a Lacking an eyewitness Internet Protocol” of Andersen et al.1 ated; and
to a crime, forensic methods often be- both use cryptographic identifiers. Indefinite lifetime. On the Internet,
come a critical tool in an investigation. However, these systems focus on en- as in the physical world, many crimes
Forensic professionals, security re- suring the consistency and topological are not detected until long after they
searchers, and Internet industry lead- validity of the IP source address itself are committed. Placing unnecessary
ers alike recognize that Internet crime to prevent address spoofing and do not restrictions on the time window for fo-
poses a special challenge for forensic address either user privacy concerns or rensic discovery will undoubtedly be ex-
attribution. Unlike physical evidence the need for long-term physical link- ploited by criminals to their advantage.
(such as fingerprints and DNA), digital age required for forensic attribution. Even today, many online criminals are
objects are, prima facie, not unique. savvy about the practical investigatory
The Internet architecture places no Design Goals delays imposed by different bilateral
technical restrictions on how a host Clue reflects the following basic re- mutual legal assistance treaties, lo-
generates packets, so every bit of a quirements: cating their data accordingly. Thus, it
packet can be trivially manipulated in Physical names. Attribution must should be possible to examine a packet
subtle ways to hide its provenance. provide a link to a physical object and unambiguously attribute its origin
Indeed, criminals have long (such as the sending computer). A long after the packet is received—even
spoofed the source address of their physical computer can have an associ- months or years later.
Internet traffic to conceal their activ- ated owner and permit association via These requirements bring us to an
ity.7,16 While a range of systems has sales-and-maintenance records. More- architecture in which each packet is
been proposed to detect and/or block over, given continuous ownership, a self-identifying—tagged with a unique
IP source-address spoofing, such sys- physical computer may be reused in nonforgeable signature identifying the
tems are deployed inconsistently, and multiple attacks. Identifying this com- physical machine that sent it. While
none are foolproof, even in their ideal puter allows the attacks to be linked, such attribution does not definitively
embodiment. A long line of literature even if the physical computer is never identify the person originating a pack-
has focused on tracing spoofed pack- recovered. Finally, a physical computer et, it is the critical building block for
accretes physical forensic evidence as a subsequent forensic analysis, investi-
a The city of Calcutta first systematically used hu-
side effect of its use. Indeed, much of gation, and correlation, as it provides
man fingerprints for criminal records in 1897, this article was written on a laptop with a beachhead onto the physical scene
followed by Scotland Yard in Britain in 1901. extensive fingerprint evidence on the of the crime. We presuppose that sites

80 commun ications of th e ac m | May 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

with sufficient risk and/or value at ate the keying material to validate the
stake will check such signatures, as- origin of a signature; for example, in
sociate them with higher-level trans- the U.S., both the Department of Jus-
actions, and log them for enough time tice and the American Civil Liberties
to cover their risk. Building such a ca-
pability is straightforward using con- Unlike physical Union might be required to agree an in-
vestigation is warranted. However, this
ventional digital signatures and some
form of public-key infrastructure, al-
evidence (such as approach also involves a critical vulner-
ability. Since, by design, a normal ob-
beit with some performance cost—and fingerprints and server cannot extract information from
one significant drawback: complete
lack of privacy.
DNA), digital objects a packet signature, nothing prevents
adversaries from incorrectly signing
Privacy requirements. The ap- are, prima facie, their packets, or random “signatures.”
proach we’ve just described would al-
low anyone receiving such a packet to
not unique. Any attempt at post-hoc authentication
is useless. Thus, to be practical, our at-
attribute its physical origin. There is tribution architecture is motivated by a
also a history of vigorous opposition to final requirement:
such capabilities. For example, in ear- Attributability. To enforce the attri-
ly 1999, Intel Corporation announced bution property, any observer on the
that new generations of its popular network must be empowered to verify
Pentium microprocessors would in- a packet signature—to prove that the
clude a new feature—the Processor packet could be attributed if necessary,
Serial Number (PSN)—a per-processor though the process of performing the
unique identifier intended as a build- proof must not reveal any information
ing block for future security applica- about the physical originator itself.
tions. Even though this feature was This requirement has a natural fate-
completely passive, public-interest sharing property, since choosing to
groups quickly identified potential verify a packet is made by the recipient
risks to privacy stemming from an with a future interest in having an attri-
available globally unique identifier. In bution capability.
April 2000, Intel abandoned plans to Remaining challenges. As impor-
include PSN in future versions of its tant as our design goals are, so, too,
microprocessors. are our non-goals—what we do not
We thus posit another critical re- attempt to accomplish. For one, our
quirement for a practical forensics work is not designed to address IP-
tool: address spoofing. While there is op-
Privacy. To balance the need for fo- erational value in preventing spoofing
rensic attribution against the public’s or allowing easier filtering of DDoS at-
interest in privacy, packet signatures tacks, the virtual nature of IP address-
must be non-identifying, in a strong es makes them inherently ill-suited for
sense, to an unprivileged observer. forensic purposes. More significant,
Moreover, the signatures must not our work is limited to attributing the
serve as an identifier (even an opaque physical machine that sent a particu-
one). As such, distinct packets sent lar packet and not necessarily the com-
from the same source must carry differ- plete causal chain of events leading to
ent signatures. Internet users should the packet being generated. This dis-
have at least the same expectation of tinction is common to most kinds of
anonymity they have today, except for forensic investigations (such as unrav-
authorized investigations. eling offshore shell accounts in foren-
A strawman solution to this problem sic accounting or insider communica-
is to digitally sign each packet using a tion in securities fraud investigations)
per-source key that is in turn escrowed but can manifest easily in the Internet
with a trusted third party. Indeed, the context; for example, an attack might
ill-fated Clipper chip used such an ap- be laundered through one or more in-
proach. If a single third party is not termediate nodes, either as part of a le-
widely trusted (likely, given past experi- gitimate anonymizing overlay network
ence), then the scheme may accommo- (such as Tor) or via proxies installed on
date multiple third parties responsible compromised hosts, botnets, or other
for different sets of machines and/or a intermediaries.
secret sharing approach in which mul- In practice, unraveling complex
tiple third parties collaborate to gener- dependencies is simultaneously criti-

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 81


contributed articles

cally important and fundamentally The two principal security proper- material and, by virtue of fate sharing,
challenging. Previous work explored ties for group signature schemes—full- need not be part of the trusted comput-
how such “stepping-stone” relation- anonymity and full-traceability—imply ing base.
ships may be inferred in the network,20 other properties, including unforge- Design. An implementation of
and a similar approach—attributing ability, exculpability, and framing-re- group-signature-based packet attribu-
each causal link hop-by-hop—could sistance.5 A group signature scheme is tion must address several other chal-
be employed with our architecture as CCA-fully anonymous if a set of collud- lenges before deployment is practical:
well. However, unambiguously estab- ing members cannot learn information Replay. The basic approach we’ve
lishing such causality is not possible about the signers’ identity i, even when outlined does not prevent an adversary
at the network layer alone and will adversaries are allowed to Open the from replaying messages sent (and
ultimately require both host support signatures of all the messages besides signed) by other legitimate parties or
and, inevitably, manual investigation. the target message-signature pair. A shuffling the order in which a node
While we have a vision for how such group-signature scheme is fully trace- receives the messages from other le-
host services should be structured, able if a set of colluding members can- gitimate parties. In some cases, such
it represents future work beyond the not create a valid message-signature replayed packets are immediately dis-
scope of this article. pair (m, σ) that the group manager can- carded by the receiving protocol stack
not trace back to one of the colluding or application (such as due to mis-
Architecture parties; that is, either Verify(pk, m, σ) aligned sequence numbers or routing
While these requirements appear chal- fails, meaning the signature is invalid, information). On the other hand, an
lenging, there is a well-known crypto- or Open(msk, m, σ) returns the identity adversary might be able to mount an
graphic tool—a group signature11— of one of the colluding members. untraceable DoS attack or maliciously
that unties this particular Gordian Basic packet attribution. We apply change application behaviors by re-
knot. Here, we briefly review the prop- group signatures to our problem in playing or shuffling others’ packets
erties of group signatures, describ- the following way: Each machine is a over time. We therefore desire some
ing their basic application to forensic member of some group and provided mechanism to bind these packets to a
packet attribution and the design is- with a secret signing key. Exactly how particular point in time.
sues resulting from this architecture. groups are constructed, and who is au- A possible solution would involve
Group signatures. A group signa- thorized to open resulting signatures, having the sender include a monotoni-
ture provides the property that if a is very much a policy issue, but one cally increasing counter in each packet
member of a group signs a message, pragmatic approach is that each com- and the receiver discard any packets
anyone can verify that the signature puter manufacturer defines a group with duplicate sources and counters.
was created by a group member but across the set of machines it sells. Be- However, the naive implementation
cannot determine which one, without ing manufacturer-centered is particu- of such an approach might require
the cooperation of a privileged third larly appealing because it sidesteps the the receiver to maintain the list of
party, the group manager. key distribution problem, as manufac- source-counter pairs (such as through
We describe group signatures us- turers now commonly include trusted reboots). We assume loosely synchro-
ing the formalized model of Bellare platform modules that encode unique nized clocks; the signer includes the
et al.,5 as well as a definitional exten- cryptographic information in each of current time in each outgoing packet,
sion due to Boneh et al.8 Specifically, their machines. Moreover, a tamper- and the receiver validates freshness di-
a group-signature scheme assumes a resistant implementation is useful for rectly. To handle jitter and network de-
group manager and a group of n un- preventing theft of a machine’s signing lays, as well as possible inconsistencies
privileged members, denoted 1, 2, . . . , key. This approach would also imply among different devices’ perception of
n. The group manager has a secret key the manufacturer would act as group time, one might employ a hybrid ap-
msk, each group member i ε {1, . . . , n} manager in any investigation, execute proach, including both a counter and
has its own secret signing key sk[i], Open under subpoena, or escrow its the time in each packet.
and there is a single public signature- msk (or shares thereof) to third parties. Revocation. To ensure that verifiable
verification key pk. Given a secret signing key, each packets are attributable back to a sin-
The group manager uses a Key- machine uses it to sign the packets it gle physical machine, we assume the
Gen operation to create pk, msk, sk, sends. This signature covers all non- group-signature secret keys are stored
distributing them appropriately. Sub- variant protocol fields and payload in tamper-resistant hardware and not
sequently, if a group member i uses data. The name of the group and the copyable to other devices. However,
its secret key sk[i] to Sign a message per-packet signature are included in a we anticipate that some secret signing
m and gets back a signature σ, anyone special packet header field that is part keys will inevitably be compromised.
with access to the global signature-ver- of the network layer. Any recipient can There are two general frameworks for
ification key pk can Verify that (m, σ) examine the header, using Verify revoking these secret signing keys (due
is a valid message-signature pair under to validate that a packet was correctly to Ateniese2 and Camenisch and Ly-
the secret key of a group member. The signed by a member of the associated syanskaya9). Since most parties in our
group manager can use msk to recover group (and hence could be authenti- system are both signers and verifiers,
the identity i of the signer using the cated by the group manager). The ver- we adopt the Camenisch-Lysyanskaya9
Open operation. ify step does not require protected key approach in which secret keys are re-

82 commun ic ations of th e ac m | May 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

voked by globally updating the group Pairing-Based Cryptography (PBC) Li- of an IP packet;
public key and locally updating each brary15 for group-signature operations ˲˲ Strips the Clue trailer from the end
unrevoked party’s secret signing key. that in turn uses the GNU Multiple Pre- of the packet;
In this scheme, the verifiers need not cision arithmetic library (GMP). To ex- ˲˲ Feeds the resulting data and signa-
maintain a list of individual revoca- plore group signatures in the context of ture to the group signature library; and
tions, but public-key updates must be real network packets, we implemented ˲˲ Pushes the original packet to one
applied universally to ensure all subse- Clue as a module in the Click Modular of two output ports, depending wheth-
quent signatures can be verified. Router.13 As PBC and GMP are designed er verification was successful.
Middlebox modification. Middle- as user-mode libraries, Clue employs Clue implements Boneh et al.’s
boxes, like network address transla- Click as a user-mode process rather revocation scheme,8 polling a well-
tors (NATs), create a conundrum. In than as a Linux or BSD kernel module. known revocation service. As might
our architecture, senders sign all non- While this architecture incurs some be expected, cryptographic operation
volatile contents of outgoing packets, performance penalty on its own, the overhead can be high and dominate
including source address. Thus, any cryptographic operations dominate most performance measures. While
packets traversing a NAT will no lon- the user-mode transitions in practice, we have little doubt that more-efficient
ger verify, as their contents have been and the user-mode penalty does not group-signature schemes will emerge
changed. While some might consider interfere with fundamental system- with faster implementations and that
this a shortcoming, it is a requirement design issues. hardware implementation provides
of true attribution; signers can attest Figure 1 outlines the packet trailer more capacity, here we focus on the op-
only to contents they transmitted. The used by the current prototype. The timization opportunities arising from
only other option in our framework is Clue module is mostly a straightfor- the interaction between the dynamics
to deem the source address volatile ward packet-transformation element. of network protocols themselves and
and exclude it from the packet signa- When signing, the module performs the underlying cryptographic primi-
ture. To do so would imply the source the following four tasks: tives. We first describe the particular
address has no significance beyond ˲˲ Collects nonvolatile elements of group-signature construction we use
being a routing locater, though, unfor- an IP packet; and then a series of optimizations
tunately, this is not the case in today’s ˲˲ Adds an 8B local NTP-derived time- we’ve implemented.
Internet, where end hosts use source stamp to implement replay detection; BBS short-group signatures. The
addresses to demultiplex incoming ˲˲ Feeds the resulting data as input to Clue prototype uses the Boneh et
connections, as well as to associate the group-signature library to generate al.8 short-group-signature scheme,
flows, with the appropriate IPsec asso- a signature; and which exhibits comparatively short
ciations. ˲˲ Appends the signature (and ad- signatures relative to group-signature
This tension has been observed ditional optimization information) to schemes based on the Strong-RSA as-
many times in the past, yielding two the original packet, adjusting the IP sumption of Baric and Pfitzmann.4 We
architecturally pure alternatives: fu- length field accordingly. also refine the BBS group-signature
ture Internet architectures can either Tasks like recalculating check- scheme for use with Clue’s optimiza-
remove end host dependence on IP sums are left to other, standard Click tions. The following paragraph sum-
source addresses or make the presence elements in the pipeline performing marizes the basic BBS scheme at a level
of middleboxes explicit. For the time these functions. Similarly, when verify- sufficient to understand our optimiza-
being, deployments requiring NAT-like ing, the module performs the follow- tions:
functionality must make a trade-off be- ing five tasks: The BBS Sign algorithm (on input a
tween deployability and completeness, ˲˲ Validates a packet’s freshness group public key pk, the signer’s secret
choosing between removing source ad- from its timestamp; key sk[i], and a message m) first ob-
dresses from the signature—thereby ˲˲ Collects the nonvolatile elements tains a source of randomness ν, derives
limiting the scope of the attribution—
and encapsulating the original, signed Figure 1. Clue packet-trailer format; shaded fields are explained in the section
on optimizations.
packets in an IP-in-IP tunnel, exposing
the middlebox to the receiver.
Related questions concern virtual- 16B
ization technologies. In a virtualized
environment, the underlying machine h (for windowed verification)
must sign packets. Though technically
feasible, we do not expand on specific
Length Timestamp
approaches here.

Clue Signature (195B)


We developed the Clue prototype to
explore the systems issues related to
implementing a real-world group-sig-
nature scheme. Clue uses Stanford’s

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he acm 83


contributed articles

values for the variables T1, T2, T3, R1, R2, Deriving the R′j values from pk and σ with verification; for example, rather
R3, R4, R5 from σ and pk, then computes creates a significant fixed overhead for than wait until Verify completes on
the value c as c ← H (m, T1, T2, T3, R1, R2, Verify independent of the amount of a TCP packet before sending an ACK,
R3, R4, R5) where ← denotes assignment signed data. When using Verify on TCP can first optimistically send an
from right to left, and H is a hash func- the receiver, the attribution layer can ACK back to the sender to overlap the
tion; for the security proofs, BBS model accumulate a window of packets (such ACK with the Verify computation.
H is a random oracle.6,8 The signing al- as a flight of TCP segments) and ver- Implementing this feature is inher-
gorithm then outputs ify them all together to amortize per- ently a layer violation since the Clue
packet verification overhead. We stress prototype allows TCP ACK processing
σ ← (T1, T2, T3, c, sα, sβ, sχ, sδ1, sδ7) , (1) that the signer signs every window of to proceed independent of IP layer
k packets, even overlapping windows, verification, but Clue prevents unveri-
where sα, sβ, sχ, sδ1, sδ7 are functions of c, and that the verifier has the option of fied data packets from being passed to
ν, and sk[i]. The BBS Verify algorithm, either verifying the packets individual- the application.
on input a group public key pk, a mes- ly or verifying any window of its choos- Incremental verification (for receiv-
sage m, and a signature σ = (T1, T2, T3, c, ing. However, this verification optimi- er). Given the computational costs as-
sα, sβ, sχ, sδ1, sδ7), derives R′1, R′2, R′3, R′4, zation slightly increases the length of a sociated with the Verify algorithm,
R′5 from pk and σ, computes c′ as c′ ← H signature. under some circumstances (such as
(m, T1, T2, T3, R′1, R′2, R′3, R′4, R′5), accept- To accommodate this scenario, we DoS attacks), Clue may wish to be able
ing the signature as valid exactly when modify the BBS scheme as follows: Us- to quickly reject packets that might
c = c′. None of Clue’s optimizations or ing our modified scheme, a verifier can not be attributable. While the Clue
extensions modify the BBS KeyGen or choose to verify the signature on the prototype cannot completely erase the
Open algorithms; we therefore do not j-th packet Pj in isolation (such as when cost for verification, it can decrease the
survey their details here. no other packets are waiting to be veri- amount of time to reject a nonverifi-
Optimizations. The following opti- fied or when there is packet loss) or ver- able packet by a factor of approximate-
mizations exploit artifacts of the BBS ify in batch the signature on a window ly three, at the expense of increased
scheme itself, as well as properties of of k packets Pj−k+1, . . . , Pj. Clue achieves signature sizes; we make Verify in-
network protocols and clients; some this goal by, on the signing side, first crementally verifiable. The average
of these optimizations may be of inde- hashing the initial k −1 packets Pj−k+1, time to process and reject a nonattrib-
pendent interest. . . ., Pj−1 to a value h, then signing h⏐⏐Pj utable packet decreases, though the
Precomputation (for sender). Clue is as before finally including h in the re- time to accept a legitimate packet re-
able to take advantage of client work- sulting signature tuple; here ⏐⏐ denotes mains essentially unchanged.
loads to improve the overhead of Sign string concatenation, and the hash Clue’s incrementally verifiable
in the sending critical path. The Sign function to compute h is H′ ≠ H, and Pj version of the BBS group signature
operation has two components, com- is implicitly prefixed with a fixed-width scheme builds on our earlier observa-
puting the Tj and Rj values, indepen- length field. To avoid trivial hash colli- tion that (1) the bulk of the computa-
dent of packet data, using these values sions in h, when hashing the packets tion in Verify is spent computing R′1,
to sign a packet. The Tj and Rj compu- Pj−k+1, . . . , Pj−1, Clue also prepends each . . ., R′5, and (2) an implementation can
tation step by far dominates the over- packet with a 4B length field, then con- derive R′1, . . . , R′5 in parallel. Techni-
head of Sign. If Clue takes the Tj and catenates the resulting length fields cally, we change Equation 1 to
Rj computation out of the critical send- and packets together. Including h in
ing path by precomputing them, Clue the signature allows the receiver to ver- σ ← (T1, T2, T3, c, sα, sβ, sχ, sδ1, sδ7, R1,
can greatly improve the throughput ify the signature over the j-th packet Pj R2, R3, R4, R5).
of using Sign. Most client workloads in isolation (by verifying the signature
consist of applications with low aver- over h⏐⏐Pj). To verify the signature over We then revise the Verify algo-
age sending rates (such as email, Web the entire window Pj−k+1, . . . , Pj, the re- rithm to, on input a signature σ, set c′′
browsing, and remote login), allowing ceiver first recomputes h. ← H(m, T1, T2, T3, R1, R2, R3, R4, R5), and
signature precomputation to overlap In the Clue prototype the window immediately reject if c′′ ≠ c. The modi-
I/O. Indeed, over long time scales, the size k is a parameter provided to the fied verification algorithm would then
CPU load of clients and servers alike IP layer. We modified our TCP imple- derive the variables R′1, R′2, R′3, R′4, R′5
is dominated by idle time—an effect mentation to adaptively set k to match from pk and T1, T2, T3, c, sα, sβ, sχ, sδ1, sδ7
further magnified by multicore proces- the sender’s congestion window. This in random order, immediately reject-
sors. Thus, periods of idleness can be setting maximizes performance, as it ing if R′j ≠ Rj. Finally, the modified al-
exploited to buffer signature precur- reflects the largest number of packets gorithm would accept the signature as
sors for subsequent periods of activity. that can be amortized together without valid, since failure to reject implies c =
Windowed verification (for receiver). expecting a packet loss (losing the ben- H(m, T1, T2, T3, R′1, R′2, R′3, R′4, R′5).
Clue takes advantage of the streaming efit of amortized verification). Other potential optimizations. A large
nature of network protocols like TCP Asynchronous verification (for re- class of related optimizations relax se-
to amortize verification over multiple ceiver). The Clue prototype can also curity guarantees in exchange for per-
packets of data to reduce the overhead overlap computation with network formance; for example, the receiver
of Verify in the receive critical path. delay to reduce protocol serialization could randomly verify a packet with

84 commun ic ations of th e acm | May 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

probability 1/n for some n. However, ly equivalent to a standard 1,024-bit


we have explicitly chosen not to explore RSA signature.8 The BBS scheme out-
such optimizations at this time, since puts signatures 195B long using this
our goal here is to examine an extreme parameter file.
point in the design space—where the
attributability of each and every packet Without a Microbenchmarks. We start by mea-
suring the overhead of the basic cryp-
is enforced. For the same reasons, we plausible threat tographic operations Sign and Ver-

of accountability,
have not yet explored protocol-specific ify and their variants, as described
fate-sharing optimizations (such as earlier. The table here outlines the av-
only signing and verifying TCP SYN
packets). Such optimizations could
the normal social erage time taken across 100 iterations
of these operations on the receiver. The
dramatically reduce overhead, albeit processes that first column of results for “1 packet”
in exchange for some increased risk
of nonattributability (such as via TCP
disincentivize are overheads when executing on a
single 1,277B packet as input; we chose
connection hijacking). criminal behavior 1,277, since the combination of the

Evaluation cannot function. packet, 195B for basic BBS signature,


8B for timestamp, and an extra 20B for
Having described and evaluated Clue’s windowed signing optimization yield a
security properties, we now turn to 1,500B packet. The second column, “8
quantifying the overhead of our imple- packets,” are results with eight packets
mentation’s basic security operations as input; one of Clue’s optimizations
and measure its effect on TCP perfor- amortizes overhead across windows
mance. We present these benchmarks of multiple packets. In either case,
to demonstrate the feasibility of our ap- the per-packet overhead is sufficiently
proach. We do not evaluate all aspects small (10ms–30ms total) to be unno-
of Clue, leaving full consideration of ticeable in interactive traffic but sub-
revocation to future work. stantial enough to have a significant
Our user-level software prototype effect on bulk TCP performance.
provides acceptable performance when The precomputation optimization
using the optimizations described for the sender separates signature
earlier. Clue adds about 30ms of end- computation from signing the packet.
to-end delay to sending a packet. For The “precomp sign” result measures
interactive applications like SSH, this the step that remains on the critical
extra delay is insignificant to users. path—signing using a set of precom-
Clue achieves a bulk TCP throughput puted values—and shows that almost
of 17.5Mbps, which is greater than that all overhead of Sign comes from gen-
enjoyed by the average wide-area Inter- erating message-independent cryp-
net user. A typical Internet user brows- tographic values (the “precomputa-
ing the Web using Clue would experi- tion” step), not from computing the
ence roughly the same performance as message-dependent part of the signa-
without using Clue. ture or signing the packet itself. In our
Experimental setup. For our experi- bulk-transfer experiments, we show
ments, we use three hosts in a sender- that removing signature computation
delay-receiver configuration. The delay from the critical path of sending pack-
host runs Linux 2.6 with a hardware ets results in significant increase in
configuration of dual-2.8GHz Penti- throughput. Similarly, the row labeled
ums with 2GB of RAM and the NIST “verify” represents the average time
Net emulation package10 to introduce to verify a single signed packet of the
link delay. The sender is a dual-3.4GHz same size; in our Clue implementa-
Pentium with 4GB of RAM, and the re- tion, verification is about 2.5x slower
ceiver runs dual-3.0GHz Pentiums with than signing.
16GB of RAM. Both sender and receiver The remaining two rows in the table
run the Click-based implementation of measure the performance of Clue’s
Clue (discussed earlier) over Linux 2.6, incremental verification scheme de-
using the default values for send and signed to defend against the flood of
receive buffer sizes. invalid packets described earlier. The
For all experiments, we use the “incremental verify” row is the time
d277699-175-167 parameter file pre- required to verify a valid packet sig-
packaged with PBC, yielding a group nature using this scheme, essentially
signature scheme with strength rough- identical to the original verification

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 85


contributed articles

operation, introducing negligible CPU ets is a key mechanism for reducing warder at typical Internet RTTs. While
overhead in the common case. In con- receive overhead. In the experiments privacy-preserving attribution has a
trast, “corrupted incremental verify” discussed in the following section, we non-negligible effect on bulk through-
measures the average time required show that large windows combined put on today’s client systems, the cost
to reject a corrupted signature. Using with precomputed signatures can dra- is not prohibitive and will continue
incremental verification Clue achieves matically improve performance over decreasing over time, as CPU perfor-
a 70% reduction in overhead over the basic Sign and Verify alone. mance increases more quickly than
original scheme. TCP throughput. Bulk TCP through- typical Internet bandwidth.
The only significant difference be- put is an important performance met- We conduct ttcp benchmarks be-
tween the eight-packet times and the ric for many Internet applications. Ex- tween the sender and receiver, requir-
single-packet times occurs when sign- perimentally, our goal is to evaluate the ing them to forward traffic through a
ing a packet using precomputed values effect of attribution on TCP through- delay host. For every test configura-
arising as a result of hashing the extra put in our Clue prototype. We measure tion, we run each individual transfer
data in the additional packets. Note, the TCP throughput performance of for at least 20 seconds. We require the
however, that this cost is still roughly the attribution implementation rela- sender to transfer all its data before
two orders of magnitude less than any tive to various baseline configurations it closes the connection, timing the
other operation, so we do not observe across a range of network round-trip transfer from when the sender con-
any additional impact on bulk through- times (RTTs). In Clue, the implementa- nects to the receiver to when the send-
put. As a result, amortizing the attribu- tion of attribution achieves a through- er receives the FIN from the receiver.
tion operations over multiple pack- put within a factor of 1.2 of a Click for- Figure 2 outlines the results of the
experiments for a number of configu-
Figure 2. TCP throughput performance for combined optimizations; y-axis is in log scale. rations. We vary the roundtrip time
(RTT) between sender and receiver
on the x-axis and plot the throughput
1,000 achieved using the ttcp application
Linux benchmark on the the y-axis; note the
Proxy
Precomp+Async+Win-64 y-axis is a log scale, each point is the
Precomp+Async+AdaptiveWin
Precomp+Async+Win-8 average of five runs, and error bars
100 Sign+Verify show the standard deviation.
As an upper bound, the“Linux”curve
Throughput (Mbps)

plots the forwarding rate of the de-


10 fault Linux networking stack on our
hardware. To provide a more realistic
baseline for our Clue implementation,
we also show the performance of an
1 unmodified user-level Click installa-
tion (“Proxy”); Click forwards pack-
ets received on its input to its output
0.1
without processing. The difference
between “Proxy” and “Linux” shows
0 50 100 150 200 the overhead of interposing in the
Link RTT (ms) network stack at user level, including
copying overhead when crossing the
kernel boundary. However, an opti-
mized, kernel-level packet-attribution
implementation need not suffer this
Overheads of cryptographic operations for both one- and eight-packet windows.
overhead. Though not shown, we also
measured the performance of the pro-
vided Click IPsec module, finding its
1 packet (in ms) 8 packets (in ms) performance indistinguishable from
sign 6.17 6.19 the “Proxy” configuration.
The “Sign+Verify” line corresponds
precomputed sign 0.022 0.058
to the baseline performance of Clue
precomputation 6.14 6.14
using individual Sign and Verify on
verify 15.7 15.7 each IP datagram. Given the times re-
incremental verify 15.6 16.3 quired for Sign and Verify, as shown
corrupted incremental verify 4.85 4.83 in the table, one would expect the 29ms
required for the Verify operation to
limit long-term bulk throughput to a
maximum of 0.35Mbps. Not surpris-

86 commun ic ations of th e acm | May 2 0 1 1 | vol . 5 4 | no. 5


contributed articles

ing, Clue’s implementation of the de- be attributed to its minimalist archi- practical: A paradigm for designing efficient protocols.
In Proceedings of the ACM Conference on Computer
fault “Sign+Verify” attribution process tecture. However, the related archi- and Communications Security (Fairfax, VA, Nov. 3–5).
restricts bulk TCP throughput to ap- tectural freedoms also represent ripe ACM Press, New York, 1993, 62–73.
7. Bellovin, S.M. Security problems in the TCP/
proximately 0.33Mbps independent of vulnerabilities for adversaries trying to IP protocol suite. ACM SIGCOMM Computer
the RTT. exploit the network to their own ends. Communication Review 19, 2 (Apr. 1989), 32–48.
8. Boneh, D., Boyen, X., and Shacham, H. Short group
The poor performance of Chief among them is the lack of ac- signatures. In Advances in Cryptology CRYPTO 2004,
“Sign+Verify” motivates the optimi- countability for user actions. Without M. Franklin, Ed. (Santa Barbara, CA, Aug. 15–19).
Springer-Verlag, Berlin, 2004, 41–55.
zations described earlier. While pre- a plausible threat of accountability, the 9. Camenisch, J. and Lysyanskaya, A. Dynamic
accumulators and applications to efficient revocation
computation dramatically decreases normal social processes that disincen- of anonymous credentials. In Advances in Cryptology
the overhead at the sender, it has only tivize criminal behavior cannot func- CRYPTO 2002, M. Yung, Ed. (Santa Barbara, CA, Aug.
18–2). Sringer-Verlag, Berlin, Germany, 2002, 61–76.
modest effect in isolation on TCP tion. We suggest modifying the Inter- 10. Carson, M. and Santay, D. NIST Net: A Linux-based
throughput, as performance is still net architecture to proactively enable network-emulation tool. ACM SIGCOMM Computer
Communication Review 33, 3 (July 2003), 111–126.
receiver-limited. Similarly, asynchro- network forensics while preserving the 11. Chaum, D. and van Heyst, E. Group signatures. In
nous verification allows the receiver to privacy of network participants under Advances in Cryptology EUROCRYPT ‘91, D.W. Davies,
Ed. (Santa Barbara, CA, Apr. 8–11). Springer-Verlag,
issue ACKs immediately, but the po- normal circumstances. Berlin, 1991, 257–265.
tential for improvement is bounded by Our approach ensures: authorized 12. International Telecommunications Union. Traceback
Use Cases and Requirements; http://politechbot.com/
the effective decrease in flow RTT. In- parties can determine the physical docs/itu.traceback.use.cases.requirements.091108.txt
deed, precomputation and asynchro- identity of hardware originating any 13. Kohler, E., Morris, R., Chen, B., Jannotti, J., and
Kaashoek, M.F. The Click modular router. ACM
nous verification are most effective given IP packets; no other party can Transactions on Computer Systems 18, 3 (Aug. 2000),
when combined with windowed veri- determine the identity of the originat- 263–297.
14. Liu, X., Yang, X., Weatherall, D., and Anderson, T.
fication and has the potential to move ing physical hardware; and all network Efficient and secure source authentication with packet
the performance bottleneck back to participants can simultaneously verify passports. In Proceedings of the Second Workshop on
Steps to Reducing Unwanted Traffic on the Internet
the sender. that a packet is well-formed and attrib- (San Jose, CA, July 7). USENIX, Berkeley, CA, 2006.
15. Lynn, B. Pairing-Based Cryptography Library. Stanford
The line in Figure 2 labeled utable by the trusted authority. While University, Palo Alto, CA, 2006; http://crypto.stanford.
“Precomp+Async+Win-8” is the per- still some distance from being practi- edu/pbc/
16. Moore, D., Voelker, G.M., and Savage, S. Inferring
formance of the Clue prototype when cable, our technique may be a viable Internet denial of service activity. In Proceedings of
combining the three optimizations and promising foundation for future the USENIX Security Symposium (Washington, D.C.,
Aug. 13–17). USENIX, Berkeley, CA, 2001, 9–22.
while using a fixed window size of research. A separate research strand 17. Savage, S., Wetherall, D., Karlin, A.R., and Anderson,
eight packets. In theory, the larger must still consider the broader contex- T. Practical network support for IP traceback. In
Proceedings of the ACM SIGCOMM Conference
the window size, the less overhead tual issues surrounding such a solu- (Stockholm, Aug. 28–Sept. 1), ACM Press, New York,
verification imposes. Indeed, pro- tion, ranging from the role of manufac- 2000, 295–306.
18. Shalunov, S. TCP Over WAN Performance Tuning and
gressively increasing the window turers to international law. Troubleshooting, 2005; http://shlang.com/writing/tcp-
size continues to increase through- perf.html
19. Snoeren, A.C., Partridge, C., Sanchez, L.A., Jones,
put performance—to a point; most Acknowledgments C.E., Tchakountio, F., Schwartz, B., Kent, S.T., and
benefits are achieved with a win- We thank Hovav Shacham of the Uni- Strayer, W.T. Single-packet IP traceback. IEEE/
ACM Transactions on Networking 10, 6 (Dec. 2002),
dow of 64 packets, as indicated by versity of California, San Diego, for 721–734.
the line “Precomp+Async+Win-64” advice and comments. This work is 20. Zhang, Y. and Paxson, V. Detecting stepping stones.
In Proceedings of the USENIX Security Symposium
in Figure 2, exceeding 17.5Mbps at funded in part by National Science (Denver, Aug. 14–17). USENIX, Berkeley, CA, 2000,
171–184.
20ms. Recall that windowed verifica- Foundation grants CNS-0627157 and
tion proceeds only in the absence of CNS-0722031.
loss; if a packet is lost in a window, Mikhail Afanasyev (mafanasyev@gmail.com) is
a postdoctoral fellow in the Autonomous Systems
the remaining packets must be veri- Laboratory of the Australian Commonwealth Scientific
References
fied individually, negating any po- and Research Organization (CSIRO), Brisbane, Australia.
1. Andersen, D., Balakrishnan, H., Feamster, N., Koponen,
tential for improvement. Hence, our T., Moon, D., and Shenker, S. Accountable Internet Tadayoshi Kohno (yoshi@cs.washington.edu) is an
Protocol. In Proceedings of the ACM SIGCOMM assistant professor in the Computer Science and
Clue implementation dynamically Engineering Department of the University of Washington,
Conference (Seattle, Aug. 19–21). ACM Press, New
adjusts the window size to match the York, 339–350. Seattle, WA.
sender’s TCP congestion window. The 2. Ateniese, G., Tsudik, G., and Song, D. Quasi-efficient Justin Ma (jtma@eecs.berkeley.edu) is a postdoctoral
revocation of group signatures. In Financial scholar in the AMP Lab of the University of California,
“Precomp+Async+AdaptiveWin” line Cryptography, M. Blaze, Ed. (Southampton, Bermuda, Berkeley.
in Figure 2 shows its performance ap- Mar. 11–14). Springer-Verlag, Berlin, 2002, 183–197.
3. Aucsmith, D. The digital crime scene: A software Nicholas Murphy (nmurphy@eecs.harvard.edu) is a
proaches the baseline for all but the prospective. In Proceedings of the CyberCrime and doctoral candidate in the School of Engineering and
smallest RTTs; at an RTT of 80ms— Digital Law Enforcement Conference (New Haven, CT, Applied Sciences of Harvard University, Cambridge, MA.
Mar. 26–28, 2004).
typical of TCP connections on the In- Stefan Savage (savage@cs.ucsd.edu) is a professor in
4. Baric, N. and Pfitzmann, B. Collision-free accumulators the Computer Science and Engineering Department of the
ternet18—this combination achieves a and fail-stop signature schemes without trees. In University of California, San Diego.
throughput of 9.6Mbps, within a fac- Advances in Cryptology EUROCRYPT ‘97, W. Fumy,
Ed. (Konstanz, Germany, May 11–15). Springer-Verlag, Alex C. Snoeren (snoeren@cs.ucsd.edu) is an associate
tor of 1.2 of “Proxy” itself, and exceeds Berlin, 1997, 480–494. professor in the Computer Science and Engineering
Department of the University of California, San Diego.
the capacity of most consumer broad- 5. Bellare, M., Micciancio, D., and Warinschi, B.
Foundations of group signatures: Formal definitions, Geoffrey M. Voelker (voelker@cs.ucsd.edu) is a professor
band links. simplified requirements, and a construction based in the Computer Science and Engineering Department of
on general assumptions. In Advances in Cryptology the University of California, San Diego.
EUROCRYPT ‘03, E. Biham, Ed. (Warsaw, May 4–8).
Conclusion Springer-Verlag, Berlin, 2003, 614–629.
Much of the Internet’s success can 6. Bellare, M. and Rogaway, P. Random oracles are © 2011 ACM 0001-0782/11/05 $10.00

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 87


review articles
doi:10.1145/1941487.1941509
set of queries: to solve the problem
In contrast to popular belief, proving we would need to invent a method ca-
pable of accurately answering either
termination is not always impossible. “terminates” or “doesn’t terminate”
when given any program drawn from
By Byron Cook, Andreas Podelski, this set. Turing’s result tells us that
and Andrey Rybalchenko any tool that attempts to solve this
problem will fail to return a correct

Proving
answer on at least one of the inputs.
No number of extra processors nor
terabytes of storage nor new sophisti-
cated algorithms will lead to the devel-

Program
opment of a true oracle for program
termination.
Unfortunately, many have drawn
too strong of a conclusion about the

Termination
prospects of automatic program ter-
mination proving and falsely believe
we are always unable to prove termi-
nation, rather than more benign con-
sequence that we are unable to always
prove termination. Phrases like “but
that’s like the termination problem”
are often used to end discussions that
might otherwise have led to viable par-
tial solutions for real but undecidable
problems. While we cannot ignore
T he program t e rmin ati o n problem, also known termination’s undecidability, if we
as the uniform halting problem, can be defined as develop a slightly modified problem
follows: statement we can build useful tools.
In our new problem statement we will
Using only a finite amount of time, determine still require that a termination prov-
whether a given program will always finish running ing tool always return answers that
are correct, but we will not necessarily
or could execute forever. require an answer. If the termination
This problem rose to prominence before the prover cannot prove or disprove termi-
invention of the modern computer, in the era of nation, it should return “unknown.”
Using only a finite amount of time,
Hilbert’s Entscheidungsproblem:a the challenge to determine whether a given program
formalize all of mathematics and use algorithmic will always finish running or could
means to determine the validity of all statements. execute forever, or return the answer
“unknown.”
In hopes of either solving Hilbert’s challenge, or
showing it impossible, logicians began to search key insights
for possible instances of undecidable problems. For decades, the same method was used
for proving termination. It has never been
Turing’s proof38 of termination’s undecidability is applied successfully to large programs.
Illust ratio n by Matthew co oper

the most famous of those findings.b A deep theorem in mathematical logic,
based on Ramsey’s theorem, holds the
The termination problem is structured as an infinite key to a new method.

a In English: “decision problem.” The new method can scale to large


b There is a minor controversy as to whether or not Turing proved the undecidability in38. Technically programs because it allows for the
he did not, but termination’s undecidability is an easy consequence of the result that is proved. A modular construction of termination
simple proof can be found in Strachey.36 arguments.

88 communications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


credit tk

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t he ac m 89
review articles

This problem can clearly be solved, provable using termination proving adapting the techniques to other do-
as we could simply always return “un- techniques.12,29 With every month, we mains. We also discuss current work
known.” The challenge is to solve this now see more powerful applications and possible avenues for future inves-
problem while keeping the occurrenc- of automatic termination proving. As tigation. Concepts and strategies will
es of the answer “unknown” to within an example, recent work has demon- be introduced informally, with cita-
a tolerable threshold, in the same way strated the utility of automatic ter- tions to original papers for those inter-
that we hope Web browsers will usu- mination proving to the problem of ested in more detail. Several sidebars
ally succeed to download Web pages, showing concurrent algorithms to be are included for readers with back-
although we know they will sometimes non-blocking.20 With further research grounds in mathematical logic.
fail. Note that the principled use of and development, we will see more
unknown in tools attempting to solve powerful and more scalable tools. Disjunctive Termination Arguments
undecidable or intractable problems We could also witness a shift in the Thirteen years after publishing his
is increasingly common in computer power of software, as techniques from original undecidability result, Turing
science; for example, in program anal- termination proving could lead to proposed the now classic method of
ysis, type systems, and networking. tools for other problems of equal dif- proving program termination.39 His
In recent years, powerful new ter- ficulty. Whereas in the past a software solution divides the problem into two
mination tools have emerged that re- developer hoping to build practical parts:
turn “unknown” infrequently enough tools for solving something related to Termination argument search: Find
that they are useful in practice.35 These termination might have been fright- a potential termination argument in
termination tools can automatically ened off by a colleague’s retort “but the form of a function that maps every
prove or disprove termination of many that’s like the termination problem,” program state to a value in a math-
famous complex examples such as perhaps in the future the developer ematical structure called a well-order.
Ackermann’s function or McCarthy’s will instead adapt techniques from We will not define well-orders here,
91 function as well as moderately sized within modern termination provers the reader can assume for now that we
industrial examples such as Windows in order to develop a partial solution are using the natural numbers (a.k.a.
device drivers. Furthermore, entire to the problem of interest. the positive integers).
families of industrially useful termi- The purpose of this article is to fa- Termination argument checking:
nation-like properties—called live- miliarize the reader with the recent Proves the termination argument to
ness properties—such as “Every call to advances in program termination be valid for the program under con-
lock is eventually followed by a call proving, and to catalog the underly- sideration by proving that result of the
to unlock” are now automatically ing techniques for those interested in function decreases for every possible
program transition. That is, if f is the
termination argument and the pro-

Turing’s Classic Method gram can transition from some state s


to state s¢, then f(s) > f( s¢).

and Disjunctive
(Readers with a background in logic
may be interested in the formal expla-
nation contained in the sidebar here.)
Well-Foundness A well-order can be thought of as a
terminating program—in the exam-
Formally proving program termination amounts to proving the program’s transition ple of the natural numbers, the pro-
relation R to be well-founded. If (S, ≥) is a well-order then > is a well-founded relation. gram is one that counts from some
Furthermore, any map f into S defines a well-founded relation, by lifting > via f, that
is, {(s, t) | f (s) > f (t)}. Turing’s method39 of proving a program’s transition relation R initial value in the natural numbers
well-founded amounts to finding a map f into a well-order, which defines a termination down to 0. Thus, no matter which ini-
argument T = {(s, t) | f (s) > f (t)}. To prove the validity of T we must show R ⊆ T. From the tial value is chosen the program will
well-foundedness of T and the fact that every sub-relation of a well-founded relation is
well-founded follows that R is well-founded.
still terminate. Given this connection
In this article we are using the phrase disjunctive termination argument to refer to between well-orders and terminat-
a disjunctively well-founded transition invariant.31 This is a finite union T1 ∪ . . . ∪ Tn of ing programs, in essence Turing is
well-founded relations that contains R+, which is the transitive closure of the transition proposing that we search for a map
relation of the program, as a superset, such as, R+ ⊆ T1 ∪ . . . ∪ Tn.
Usually, each T1, . . . , Tn will be constructed as above via some map into a well-order. from the program we are interested in
Note that the non-reflexive transitive closure (the + in R+) is crucial. It is not sufficient proving terminating into a program
to show that R ⊆ T1 ∪ . . . ∪ Tn,, as the union of well-founded relations is not guaranteed known to terminate such that all steps
to be well-founded. It is the transitive closure that makes checking the subset inclusion
in the first program have analogous
more difficult in practice.
The recent approaches for proving termination for general programs3,4,9,12,14,32 are steps in the second program. This
based on the proof rule of disjunctively well-founded transition invariants. The proof map to a well-order is usually called a
rule itself is based on Ramsey’s theorem,34 and it has been developed in the effort to progress measure or a ranking function
give a logical foundation to the termination analysis based on size-change graphs.24 The
principle expressed by the proof rule appears implicitly already in previously developed in the literature. Until recently, all
termination algorithms for rewrite systems and logic and functional programs, see known methods of proving termina-
refs10, 15, 17, 24. tion were in essence minor variations
on the original technique.

90 commun ic ations of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


review articles

The problem with Turing’s meth- rem,34 and it has been developed in code fragment in Figure 1. In this code
od is that finding a single, or mono- the effort to give a logical foundation the collection of user-provided input is
lithic, ranking function for the whole to the termination analysis based on performed via the function input().
program is typically difficult, even for size-change graphs.24 We will assume the user always enters
simple programs. In fact, we are often The principle it expresses appears a new value when prompted. Further-
forced to use ranking functions into implicitly in previously developed ter- more, we will assume for now that vari-
well-orders that are much more com- mination algorithms for rewrite sys- ables range over possibly negative in-
plex than the natural numbers. Luck- tems, logic, and functional programs, tegers with arbitrary precision (that is,
ily, once a suitable ranking function see refs 10,15,17,24. mathematical integers as opposed to
has been found, checking validity is in The advantage to the new style of 32-bit words, 64-bit words, and so on).
practice fairly easy. termination argument is that it is Before reading further, please answer
The key trend that has led toward usually easier to find, because it can the question: “Does this program ter-
current progress in termination prov- be expressed in small, mutually in- minate, no matter what values the user
ing has been the move away from the dependent pieces. Each piece can be gives via the input() function?” The
search for a single ranking function found separately or incrementally us- answer is given below.c
and toward a search for a set of rank- ing various known methods for the Using Turing’s traditional method
ing functions. We think of the set as a discovery of monolithic termination we can define a ranking function from
choice of ranking functions and talk arguments. As a trade-off, when using program variables to the natural num-
about a disjunctive termination argu- a disjunctive termination argument, a bers. One ranking function that will
ment. This terminology refers to the more difficult validity condition must work is 2x + y, though there are many
proof rule of disjunctively well-found- be checked. This difficulty can be mit- others. Here we are using the formula
ed transition invariants.31 The recent igated thanks to recent advances in as- 2x + y as shorthand for a function
approaches for proving termination sertion checking tools (as discussed in that takes a program configuration
for general programs3,4,9,12,14,26,32 are a later section). as its input and returns the natural
based on this proof rule. The proof Example using a monolithic termina- number computed by looking up the
rule itself is based on Ramsey’s theo- tion argument. Consider the example value of x in the memory, multiply-
ing that by 2 and then adding in y’s
Figure 1. Example program. value—thus 2x + y represents a map-
ping from program configurations to
1 x : = input();
natural numbers. This ranking func-
2 y : = input(); tion meets the constraints required
3 while x > 0 and y > 0 do to prove termination: the valuation of
4 if input() = 1 then 2x + y when executing at line 9 in the
5 x : = x – 1;
6 y : = y + 1; program will be strictly one less than
7 else its valuation during the same loop
8 y : = y – 1; iteration at line 4. Furthermore, we
9 fi
10 done
know the function always produces
natural numbers (thus it is a map into
User-supplied inputs are gathered via calls to the function input(). We assume that the variables a well-order), as 2x + y is greater than
range over integers with arbitrary precision (in other words, not 64-bit or 32-bit integers). Assuming 0 at lines 4 through 9.
that the user always eventually enters in a value when prompted via input(), does the program
terminate for all possible user-supplied inputs? (The answer is provided in a footnote below.) Automatically proving the valid-
ity of a monolithic termination argu-
ment like 2x + y is usually easy using
tools that check verification condi-
Figure 2. Example program. tions (for example, Slam2). However,
as mentioned previously, the actual
search for a valid argument is fa-
1 x := input();
mously tricky. As an example, consid-
2 y := input();
3 while x > 0 and y > 0 do er the case in Figure 2, where we have
4 if input () = 1 then replaced the command “y := y + 1;”
5 x := x × 1; in Figure 1 with “y := input();”. In
6 y := input();
7 else
this case no function into the natural
8 y := y – 1; numbers exists that suffices to prove
9 fi termination; instead we must resort
10 done
to a lexicographic ranking function
This program is similar to Figure 1 where the command “y := y + 1;” replaced with (a ranking function into ordinals, a
“y := input();”. No ranking function into the natural numbers exists that can prove the more advanced well-order than the
termination of this program. naturals).

c The program does terminate.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 91


review articles

Example using a disjunctive termi- gram in Figure 2, where we replaced “y ther x goes down by at least one and
nation argument. Following the trend := y + 1;” with “y := input();.” On x is greater than 0 or y goes down by
toward the use of disjunctive termina- every possible unrolling of the loop we at least one and y is greater than 0.
tion arguments, we could also prove will still see that either x or y has gone Yet, the program does not guarantee
the termination of Figure 1 by defin- down and is larger than 0. termination. As an example input se-
ing an argument as the unordered To see why we cannot use the same quence that triggers non-termination,
finite collection of measures x and validity check for disjunctive termina- consider 5, 5, followed by 1, 0, 1, 0, 1,
y. The termination argument in this tion arguments as we do for monolith- 0, …. If we consider all possible unroll-
case should be read as: ic ones, consider the slightly modified ings of the loop, however, we will see
example in Figure 3. For every single that after two iterations it is possible
x goes down by at least 1 and is larger than 0. iteration of the loop it is true that ei- (in the case that the user supplied the
or
y goes down by at least 1 and is larger than 0 Figure 3. Another example program.

We have constructed this termina-


1 x := input();
tion argument with two ranking func-
2 y := input();
tions: x and y. The use of “or” is key: 3 while x > 0 and y > 0 do
the termination argument is modu- 4 if input() = 1 then
lar because it is easy to enlarge using 5 x := x – 1;
6 y := y + 1;
additional measures via additional 7 else
uses of “or.” As an example, we could 8 x := x + 1;
enlarge the termination argument 9 y := y – 1;
10 fi
by adding “or 2w − y goes down by
11 done
at least 1 and is greater than 1,000.”
Furthermore, as we will discuss later, Does it terminate for all possible user-supplied inputs?
independently finding these pieces of
the termination argument is easier in
practice than finding a single mono-
lithic ranking function. Figure 4. Example program with an assertion statement in line 3.
The expert reader will notice the
relationship between our disjunctive 1 if y ≥ 1 then
termination argument and complex 2 while x > 0 do
3 assert (y ≥ 1);
lexicographic ranking functions. The
4 x := x – y;
advantage here is that we do not need 5 done
to find an order on the pieces of the 6 fi
argument, thus making the pieces of
the argument independent from one
another.
The difficulty with disjunctive ter- Figure 5. Encoding of termination argument validity.
mination arguments in comparison to
monolithic ones is that they are more
1 copied := 0;
difficult to prove valid: for the benefit 2 x := input();
of modularity we pay the price in the 3 y := input();
fact that the termination arguments 4 while x > 0 and y > 0 do
5 if copied = 1 then
must consider the transitions in all 6 assert (oldx ≥ x + 1 and oldx > 0);
possible loop unrollings and not just 7 elsif input() = 1 then
single passes through a loop. That is to 8 copied := 1;
say: the disjunctive termination argu- 9 oldx := x;
10 oldy := y;
ment must hold not only between the 11 fi
states before and after any single itera- 12 if input() = 1 then
tion of the loop, but before and after 13 x := x – 1;
14 y := y + 1;
any number of iterations of the loop 15 else
(one iteration, two iterations, three 16 y := y – 1;
iterations, and so on). This is a much 17 fi
more difficult condition to automati- 18 done

cally prove. In the case of Figure 1 we Encoding of termination argument validity using the program from Figure 1 and the termination
can prove the more complex condition argument “x goes down by at least one and is larger than 0.” The black code comes directly from
using techniques described later. Figure 1. The code in red implements the encoding of validity with an assertion statement.
Note that this same termination ar-
gument now works for the tricky pro-

92 commun ications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


review articles

inputs 1 and 0 during the two loop


iterations) that neither x nor y went
down, and thus the disjunctive termi-
nation argument is not valid for the
Implementation Strategies
program in Figure 3. Here, we give a brief summary of implementation strategies based on disjunctive
termination arguments deployed by the recent termination checkers:
Refinement:9,14 In Cook et al.,14 the termination argument begins with ø. We first
Argument Validity Checking attempt to prove that R+ ⊆ ø. When this proof fails, rank function synthesis is applied
While validity checking for disjunc- to the witness, thus giving a refinement T1 to the argument, which is then rechecked
tive termination arguments is more R+ ⊆ ø ∪ T1. This process is repeated until a valid argument is found or a real
counterexample is found.
difficult than checking for mono- In Chawdhary et al.,9 the termination argument T is constructed following the
lithic arguments, we can adapt the structure of the transition relation R = R1 ∪ . . . ∪ Rm by using a ranking function
problem statement such that recently synthesis procedure, which is used to compute a well-founded overapproximation
WF(X) of a binary relation X. The initial candidate T = WF(R1) ∪ . . . ∪ WF (Rm) is extended
developed tools for proving the valid- with WF (WF (Ri) ° Rj) and so on until the fixpoint is reached.
ity of assertions in programs (such as Variance analysis:3,32 As described in some detail in this article, the approach from
Slam2). Berdine et al.3 and Podelski et al.32 uses program transformations and abstract
An assertion statement can be put interpretation for invariants to compute an overapproximation T1; T2, . . . , Tn such that
R+ ⊆ T1 ∪ T2 . . . ∪ Tn. It then uses rank function synthesis to check that each Ti is well-
in a program to check if a condition founded.
is true. For example, assert(y ≥ 1); In contrast to the refinement-based methods, variance analysis always terminates,
checks that y ≥ 1 after executing the but may return “don’t know” in cases when a refinement-based method succeeds.
command. We can use an assertion
checking tool to formally investigate at
compile time whether the conditions an assertion statement to check the coding given in Cook et al.14 The new
passed to assertion statements always termination argument always holds code (introduced as a part of the en-
evaluate to true. For example, most as- between the current state and the re- coding) is given in red, whereas the
sertion checking tools will be able to corded state. If the assertion checker original program from Figure 1 is in
prove the assert statement at line 3 can prove the assert cannot fail, it has black. We make use of an extra call to
in Figure 4 never fails. Note that com- proved the validity of the termination input() to decide when the unroll-
pile-time assertion checking is itself argument. We can use encoding tricks ing begins. The new variables oldx
an undecidable problem, although it to force the assertion checker to con- and oldy are used for recording a state.
is technically in an easier class of dif- sider all possible unrollings. Note that the assertion checker must
ficulty than termination.d Figure 5 offers such an example, consider all values possibly returned
The reason that assertion checking where we have used the termination by input() during its proof, thus the
is so important to termination is the argument “x goes down by at least one proof of termination is valid for any
validity of disjunctive termination ar- and x is greater than 0” using the en- starting position. This has the effect of
guments can be encoded as an asser-
Figure 6. Encoding of termination argument validity using previous program.
tion statement, where the statement
fails only in the case that the termina-
tion argument is not valid. Once we are 1 copied := 0;
given an argument of the form T1 or T2 2 x := input();
or … or Tn, to check validity we simply 3 y := input();
4 while x > 0 and y > 0 do
want to prove the following statement: 5 if copied = 1 then
Each time an execution passes 6 assert( (oldx ≥ x + 1 and oldx > 0)
through one state and then through 7 or
another one, T1 or T2 or … or Tn holds 8 (oldy ≥ y + 1 and oldy > 0)
9 );
between these two states. That is, there 10 elsif input() = 1 then
does not exist a pair of states, one be- 11 copied := 1;
ing reachable from the other, possibly 12 oldx := x;
13 oldy := y;
via the unrolling of a loop, such that
14 fi
neither T1 nor T2 nor … nor Tn holds be- 15 if input() = 1 then
tween this pair of states. 16 x := x – 1;
This statement can be verified a 17 y := y + 1;
18 else
program transformation where we 19 y := y – 1;
introduce new variables into the pro- 20 fi
gram to record the state before the 21 done
unrolling of the loop and then use
Encoding of termination argument validity using the program from Figure 1 and the termination
argument “x goes down by at least one and is larger than 0 or y goes down by at least one
and is larger than 0.” The black code comes directly from Figure 1. The code in red implements
d Checking validity of an assertion statement is the encoding of validity with an assertion statement.
an undecidable but co-recursively enumerable
problem, whereas termination is neither r.e.
nor co-r.e. problem.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 93


review articles

considering any possible unrolling of the paths. A plethora of recently devel- we reached the current state from the
the loop. After some state has been re- oped techniques now make this pos- recorded one. That is: this is the unroll-
corded, from this point out the termi- sible. Many recent assertion checkers ing found that demonstrates that the
nation argument is checked using the are designed to produce a path to a bug assertion statement can fail. What we
recorded state and the current state. In in the case that the assertion statement know is that the termination argument
this case the assertion can fail, mean- cannot be proved. For example, a path does not currently cover the case where
ing that the termination argument is leading to the assertion failure is 1 → this path is repeated forever.
not valid. 2 → 3 → 4 → 5 → 7 → 8 → 9 → 10 → See Figure 6 for a version using the
If we were to attempt to check this 11 → 12 → 16 → 17 → 4 → 5 → 6. This same encoding, but with the valid ter-
condition in a naïve way (for example, path can be broken into parts, each mination argument:
by simply executing the program) we representing different phases of the ex-
would never find a proof for all but the ecution: the prefix-path 1 → 2 → 3 → x goes down by at least 1 and is larger than 0
most trivial of cases. Thus, assertion 4 is the path from the program initial or
checkers must be cleverly designed to state to the recorded state in the failing y goes down by at least 1 and is larger than 0.
find proofs about all possible execu- pair of states. The second part of the
tions without actually executing all of path 4 → 5 → . . . 5 → 6 represents how This assertion cannot fail. The fact
that it cannot fail can be proved by a
Figure 7. Program prepared for abstract interpretation. number of assertion verification tools.

1 copied := 0; Finding Termination Arguments


2 x := input(); We have examined how we can check
3 y := input(); a termination argument’s validity via
4 while x > 0 and y > 0 do
5 if copied = 1 then
a translation to a program with an as-
6 skip; sertion statement. We now discuss
7 elsif input() = 1 then known methods for finding monolith-
8 copied := 1; ic termination arguments.
9 oldx := x;
10 oldy := y;
Rank function synthesis. In some
11 fi cases simple ranking functions can
12 if input() = 1 then be automatically found. We call a
13 x := x – 1;
ranking function simple if it can be
14 y := y + 1;
15 else defined by a linear arithmetic expres-
16 y := y – 1; sion (for example, −3x = −2y + 100).
17 fi The most popular approach for find-
18 done
ing this class of ranking function uses
a result from Farkas16 together with
tools for solving linear constraint sys-
Figure 8. Example C loop over a linked-list data-structure with fields next and data. tems. (See Colón and Sipma11 or Polel-
ski and Rybalchecko30 for examples
of tools using Farkas’ lemma.) Many
c = head; other approaches for finding rank-
while (c != NULL) {
if (c – >next != NULL && c – > next – >data == 5) {
ing functions for different classes of
t = c – >next; programs have been proposed (see
c–>next = c –> next –>next; refs1, 6−8, 19, 37). Tools for the synthesis of
free(t); ranking functions are sometimes ap-
}
c = c–>next; plied directly to programs, but more
} frequently they are used (on small
and simplified program fragments)
internally within termination proving
tools for suggesting the single ranking
Figure 9. Example program illustrating nontermination. functions that appear in a disjunctive
termination argument.
1 x := 10;
Termination analysis. Numerous
2 while x > 9 do approaches have been developed for
3 x := x – 232; finding disjunctive termination argu-
4 done ments in which—in effect—the valid-
Example program demonstrating nontermination when variables range over fixed-width numbers. The ity condition for disjunctive termina-
program terminates if x ranges over arbitrary size integers, but repeatedly visits the state where x = tion arguments is almost guaranteed
10 in the case that x ranges over 32-bit unsigned numbers. to hold by construction. In some cas-
es—for example, Berdine et al.3—to
prove termination we need only check

94 commun ications of th e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


review articles

that the argument indeed represents a Recall Figure 5, which encoded the
set of measures. In other cases, such invalid termination argument for the
as Lee et al.24 or Manolios and Vroon,26 program in Figure 1, and the path lead-
the tool makes a one-time guess as to ing to the failure of the assertion: is 1
the termination argument and then
checks it using techniques drawn from In recent years, → 2 → 3 → 4 → 5 → 7 → 8 → 9 → 10
→ 11 → 12 → 16 → 17 → 4 → 5 → 6.
abstract interpretation.
Consider the modified program
powerful new Recall this path represents two phases
of the program’s execution: the path
in Figure 7. The termination strat- termination tools to the loop, and some unrolling of the
egy described in Berdine et al.3 and
Podelski and Rybalchenko32 essen-
have emerged that loop such that the termination con-
dition doesn’t hold. In this case the
tially builds a program like this and return “unknown” path 4 → 5 → . . . 6 represents how we
then applies a custom program analy-
sis to find the following candidate ter-
infrequently enough reached the second failing state from
the first. This is a counterexample to
mination argument: that they are useful the validity of the termination argu-

(copied ≠ 1) or in practice. ment, meaning that the current ter-


mination argument does not take this
(oldx ≥ x + 1, oldx > 0, oldy path and others like it into account.
> 0, x ≥ 0, y > 0) or If the path can be repeated forever
(oldx ≥ x, oldy ≥ y + 1, oldx during the program’s execution then
> 0, oldy > 0, x > 0, y ≥ 0) we have found a real counterexample.
Known approaches (for example, Gup-
for the program at line 4—meaning we ta et al.21) can be used to try and prove
could pass this complex expression to this path can be repeated forever. In
the assertion at line 4 in Figure 7 and this case, however, we know that the
know that the assertion cannot fail. path cannot be repeated forever, as
We know this statement is true of any y is decremented on each iteration
unrolling of the loop in the original through the path and also constrained
Figure 1. What remains is to prove that via a conditional statement to be posi-
each piece of the candidate argument tive. Thus this path is a spurious coun-
represents a measure that decreases— terexample to termination and can
here we can use rank function synthe- be ruled out via a refinement to the
sis tools to prove that oldx > x + 1 and termination argument. Again, using
oldx > 0 . . . represents the measure rank function synthesis tools we can
based on x. If each piece between the automatically find a ranking function
ors in fact represents a measure (with that demonstrates the spuriousness of
the exception of copied ≠ 1 which this path. In this case a rank function
comes from the encoding) then we synthesis tool will find y, meaning that
have proved termination. the reason this path cannot be repeat-
One difficulty with this style of ter- ed forever is that “y always goes down
mination proving is that, in the case by at least one and is larger than 0.” We
that the program doesn’t terminate, can then refine the current termina-
the tools can only report “unknown,” tion argument used in Figure 5:
as the techniques used inside the ab-
stract interpretation tools have lost x goes down by at least 1 and is larger than 0
so much detail that it is impossible with the larger termination argument:
to find a non-terminating execution x goes down by at least 1 and is larger than 0
from the failed proof and then prove it or
non-terminating. The advantage when y goes down by at least 1 and is larger than 0
compared to other known techniques
is it is much faster. We can then check the validity of
Finding arguments by refinement. this termination argument using a tool
Another method for discovering a ter- such as IMPACT on the program in Fig-
mination argument is to follow the ap- ure 6. IMPACT can prove this assertion
proach of Cook et al.14 or Chawdhary never fails, thus proving the termina-
et al.9 and search for counterexamples tion of the program in Figure 1.
to (possibly invalid) termination argu-
ments and then refine them based on Further Directions
new ranking functions found via the With fresh advances in methods for
counterexamples. proving the termination of sequen-

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 95


review articles

tial programs that operate over math- automatically discover the shapes of programs use variables that range
ematical numbers, we are now in the data-structures) and then to create over fixed-width numbers, such as
position to begin proving termination new auxiliary variables in the program 32-bit integers or 64-bit floating-
of more complex programs, such as that track the sizes of those data struc- point numbers, with the possibility
those with dynamically allocated data tures, thus allowing for arithmetic of overflow or underflow. If a program
structures, or multithreading. Fur- ranking functions to be more easily uses only fixed-width numbers and
thermore, these new advances open expressed (examples include refs4,5,25). does not use dynamically allocated
up new potential for proving proper- The difficultly with this approach is memory, then termination proving is
ties beyond termination, and finding that we are now dependent on the ac- decidable (though still not easy). In
conditions that would guarantee ter- curacy and scalability of current shape this case we simply need to look for a
mination. We now discuss these av- analysis tools—to date the best known repeated state, as the program will di-
enues of future research and develop- shape analysis tool40 supports only verge if and only if there exists some
ment in some detail. lists and trees (cyclic and acyclic, sin- state that is repeated during execu-
Dynamically allocated heap. Con- gly and doubly linked) and scales only tion. Furthermore, we cannot ignore
sider the C loop in Figure 8, which to relatively simple programs of size the fixed-width semantics, as over-
walks down a list and removes links less than 30,000 LOC. Furthermore, flow and underflow can cause non-
with data elements equaling 5. Does the auxiliary variables introduced by termination in programs that would
this loop guarantee termination? methods such as Magill et al.25 some- otherwise terminate, an example is
What termination argument should times do not track enough informa- included in Figure 9. Another com-
we use? tion in order to prove termination (for plication when considering this style
The problem here is that there are example, imagine a case with lists of of program is that of bit-level opera-
no arithmetic variables in the program lists in which the sizes of the nested tions, such as left- or right-shift.
from which we can begin to construct lists are important). In order to im- Binary executables. Until now we
an argument—instead we would want prove the state of the art for termina- have discussed proving termination of
to express the termination argument tion proving of programs using data programs at their source level, perhaps
over the lengths of paths to NULL via structures, we must develop better in C or Java. The difficulty with this
the next field. Furthermore, the pro- methods of finding arguments over strategy is the compilers that then take
grammer has obviously intended for data structure shapes, and we must these source programs and convert
this loop to be used on acyclic sin- also improve the accuracy and scal- them into executable artifacts can in-
gly linked lists, but how do we know ability of existing shape analysis tools. troduce termination bugs that do not
that the lists pointed to by head will Bit vectors. In the examples used exist in the original source program.
always be acyclic? The common solu- until now we have considered only Several potential strategies could help
tion to these problems is to use shape variables that range over mathemati- mitigate this problem: We might try to
analysis tools (which are designed to cal numbers. The reality is that most prove termination of the executable
binaries instead of the source level
Figure 10. Example of multi-threaded terminating producer/consumer program. programs, or we might try to equip
the compiler with the ability to prove
1 while x > 0 do that the resulting binary program pre-
2 x := x – 1; 1 while y > 0 do serves termination, perhaps by first
3 lock(lck) 2 lock (lck) proving the termination of the source
4 b := x; 3 y:=b;
5 unlock(lck) 5 unlock(lck)
program and then finding a map from
6 done 6 done the binary to the source-level program
and proving that the composition with
To prove that the thread on the left terminates we must assume that the thread on the right always
the source-level termination argument
calls unlock when needed. To prove that the thread on the right always calls unlock when needed,
we must prove that the thread on the left always calls unlock when needed, and so on. forms a valid termination argument
for the binary-level program.
Non-linear systems. Current ter-
mination provers largely ignore non-
Figure 11. Collatz program. linear arithmetic. When non-linear
updates to variables do occur (for ex-
1 while x > 1 do ample x := y * z;), current termina-
2 if x is divisible by 2 then tion provers typically treat them as
3 x := x=2;
if they were the instruction x := in-
4 else
5 x := 3x + 1; put();. This modification is sound—
6 fi meaning when the termination prover
7 done returns the answer “terminating,” we
We assume that x ranges over all natural numbers with arbitrary precision (that is, neither 64-bit
know the proof is valid. Unfortunately,
vectors nor 32-bit vectors). A proof of this program’s termination or non-termination is not known. this method is not precise: the treat-
ment of these commands can lead to
the result “unknown” for programs

96 communicat ions of th e ac m | may 2 0 1 1 | vo l . 5 4 | no. 5


review articles

that actually terminate. Termination representing its executions, but this


provers are also typically unable to find approach does not scale well to larger
or check non-linear termination argu- programs. The challenge is to develop
ments (x2, for example) when they are automatic methods of finding non-cir-
required. Some preliminary efforts in
this direction have been made,1,6 but With fresh cular rely-guarantee termination argu-
ments. Recent steps20 have developed
these techniques are weak. To improve
the current power of termination prov-
advances in heuristics that work for non-blocking
algorithms, but more general tech-
ers, further developments in non-lin- methods for niques are still required.
ear reasoning are required.
Concurrency. Concurrency adds an
proving the Advanced programming features.
The industrial adoption of high-level
extra layer of difficulty when attempt- termination programming features such as virtual
ing to prove program termination. The
problem here is that we must consider
of sequential functions, inheritance, higher-order
functions, or closures make the task of
all possible interactions between con- programs that proving industrial programs more of a
currently executing threads. This is es-
pecially true for modern fine-grained operate over challenge. With few exceptions (such
as Giesl et al.18), this area has not been
concurrent algorithms, in which
threads interact in subtle ways through
mathematical well studied.
Untyped or dynamically typed pro-
dynamically allocated data structures. numbers, we are grams also contribute difficulty when
Rather than attempting to explicitly
consider all possible interleavings of
now in the position proving termination, as current ap-
proaches are based on statically dis-
the threads (which does not scale to to begin proving covering data-structure invariants and
large programs) the usual method for
proving concurrent programs correct
termination of finding arithmetic measures in order
to prove termination. Data in untyped
is based on rely-guarantee or assume- more complex programs is often encoded in strings,
guarantee style of reasoning, which
considers every thread in isolation programs. using pattern matching to marshal
data in and out of strings. Termination
under assumptions on its environ- proving tools for JavaScript would be
ment and thus avoids reasoning about especially welcome, given the havoc
thread interactions directly. Much of that nonterminating JavaScript causes
the power of a rely-guarantee proof daily for Web browsers.
system (such as Jones22 and Misra and Finding preconditions that guarantee
Chandy28) comes from the cyclic proof termination. In the case that a program
rules, where we can assume a proper- does not guarantee termination from
ty of the second thread while proving all initial configurations, we may want
property of the first thread, and then to automatically discover the condi-
assume the recently proved property tions under which the program does
of the first thread when proving the as- guarantee termination. That is, when
sumed property of the second thread. calling some function provided by a
This strategy can be extended to live- library: what are the conditions under
ness properties using induction over which the code is guaranteed to return
time, for example, Gotsman et al.20 and with a result? The challenge in this
McMillan.27 area is to find the right precondition:
As an example, consider the two the empty precondition is correct but
code fragments in Figure 10. Imagine useless, whereas the weakest precon-
that we are executing these two frag- dition for even very simple programs
ments concurrently. To prove the ter- can often be expressed only in com-
mination of the left thread we must plex domains not supported by today’s
prove that it does not get stuck waiting tools. Furthermore, they should be
for the call to lock. To prove this we computed quickly (the weakest pre-
can assume the other thread will al- condition expressible in the target log-
ways eventually release the lock—but ic may be too expensive to compute).
to prove this of the code on the right Recent work has shown some prelimi-
we must assume the analogous prop- nary progress in this direction.13,33
erty of the thread on the left, and so Liveness. We have alluded to the
on. In this case we can certainly just connection between liveness prop-
consider all possible interleavings of erties and the program termination
the threads, thus turning the concur- problem. Formally, liveness proper-
rent program into a sequential model ties expressed in temporal logics can

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 97


review articles

be converted into questions of fair ter- Conclusion 19. Giesl, J. Thiemann, R., Schneider-Kamp, P. and Falke,
S. Automated termination proofs with AProVE. In
mination—termination proving were This article has surveyed recent ad- Proceedings of RTA, 2004.
certain non-terminating executions vances in program termination prov- 20. Gotsman, A., Cook, B., Parkinson, M. and Vafeiadis, V.
Proving that non-blocking algorithms don’t block. In
are deemed unfair via given fairness ing techniques for sequential pro- Proceedings of POPL, 2009.
constraints, and thus ignored. Cur- grams, and pointed toward ongoing 21. Gupta, A., Henzinger, T., Majumdar, R., Rybalchenko, A.,
and Xu, R. Proving non-termination. In Proceedings of
rent tools, in fact, either perform this work and potential areas for future POPL, 2008.
reduction, or simply require the user to development. The hope of many tool 22. Jones, C.B. Tentative steps toward a development
method for interfering programs. ACM Trans. Program.
express liveness constraints directly as builders in this area is that the current Lang. Syst., 1983.
the set of fairness constraints.12,29 Nei- and future termination proving tech- 23. Jula, H., Tralamazza, D., Zamfir, C. and Candea, G.
Deadlock immunity: Enabling systems to defend
ther approach is optimal: the reduc- niques will become generally avail- against deadlocks. In Proceedings of OSDI, 2008.
tion from liveness to fairness is ineffi- 24. Lee, C.S., Jones, N.D. and Ben-Amram, A.M.. The
able for developers wishing to directly size-change principle for program termination. In
cient in the size of the conversion, and prove termination or liveness. We also Proceedings of POPL, 2001.
25. Magill, S., Berdine, J., Clarke, E. and Cook, B.
fairness constraints are difficult for hope that termination-related appli- Arithmetic strengthening for shape analysis. In
humans to understand when used di- cations—such as detecting livelock at Proceedings of SAS, 2007.
26. Manolios, P. and Vroon, D. Termination analysis with
rectly. An avenue for future work would runtime or Wang’s tiling problem— calling context graphs. In Proceedings of CAV, 2006.
be to directly prove liveness properties, will also benefit from these advances. 27. McMillan, K.L. Circular compositional reasoning about
liveness. In Proceedings of CHARME, 1999.
perhaps as an adaption of existing ter- 28. Misra, J and Chandy, K.M. Proofs of networks of
mination proving techniques. Acknowledgments processes. IEEE Trans. Software Eng., 1981.
29. Pnueli, A., Podelski, A., and Rybalchenko, A. Separating
Dynamic analysis and crash dumps The authors would like to thank Lu- fairness and well-foundedness for the analysis of fair
for liveness bugs. In this article we have cas Bourdeaux, Abigail See, Tim Har- discrete systems. In Proceedings of TACAS, 2005.
30. Podelski, A, and Rybalchenko, A. A complete method
focused only on static, or compile-time, ris, Ralf Herbrich, Peter O’Hearn, and for the synthesis of linear ranking functions. In
proof techniques rather than tech- Hongseok Yang for their reading of Proceedings of VMCAI, 2004.
31. Podelski, A, and Rybalchenko, A. Transition invariants.
niques for diagnosing divergence dur- early drafts of this article and sugges- In Proceedings of LICS, 2004.
ing execution. Some effort has been tions for improvement. 32. Podelski, A. and Rybalchenko, A. Transition predicate
abstraction and fair termination. In Proceedings of
placed into the area of automatically POPL, 2005.
33. Podelski, A., Rybalchenko, A., and Wies, T. Heap
detecting deadlock during execution References assumptions on demand. In Proceedings of CAV, 2008.
time. With new developments in the 1. Babic, D., Hu, A.J., Rakamaric, Z., and Cook, B. Proving 34. Ramsey, F. On a problem of formal logic. London Math.
termination by divergence. In SEFM, 2007. Soc., 1930.
area of program termination proving 35. Stix, G. Send in the Terminator. Scientific American
2. Ball, T., Bounimova, E., Cook, B., Levin, V., Lichtenberg,
we might find that automatic methods J., McGarvey, C., Ondrusek, B., Rajamani, S.K. and (Nov. 2006).
Ustuner, A. Thorough static analysis of device drivers. 36. Strachey, C. An impossible program. Computer
of discovering livelock could also now In Proceedings of EuroSys, 2006. Journal, 1965.
be possible. Temporary modifications 3. Berdine, J., Chawdhary, A., Cook, B., Distefano, D. 37. Tiwari, A. Termination of linear programs. In
and O’Hearn, P. Variance analyses from invariance Proceedings of CAV, 2004.
to scheduling, or other techniques, 38. Turing, A. On computable numbers, with an application
analyses. In Proceedings of POPL, 2007.
might also be employed to help pro- 4. Berdine, J., Cook, B., Distefano, D. and O’Hearn, P. to the Entscheidungsproblem. London Mathematical
Society, 1936.
grams not diverge even in cases where Automatic termination proofs for programs with
39. Turing, A. Checking a large routine. In Report of a
shape-shifting heaps. In Proceedings of CAV, 2006.
they do not guarantee termination or 5. Bouajjani, A., Bozga, M., Habermehl, P., Iosif, R., Moro,
Conference on High Speed Automatic Calculating
Machines, 1949.
other liveness properties. Some pre- P. and Vojnar, T. Programs with lists are counter
40. Yang, H., Lee, O., Berdine, J., Calcagno, C., Cook, B.,
automata. In Proceedings of CAV, 2006.
liminary work has begun to emerge Distefano, D. and O’Hearn, P. Scalable shape analysis
6. Bradley, A., Manna, Z. and Sipma, H. Termination of for systems code. In Proceedings of CAV, 2008.
in this area (see Jula et al.23) but more polynomial programs. In Proceedings of VMCAI, 2005.
7. Bradley, A., Manna, Z. and Sipma, H.B. Linear ranking
work is needed. with reachability. In Proceedings of CAV, 2005.
Scalability, performance, and preci- 8. Bradley, A., Manna, Z. and Sipma, H.B. The polyranking Byron Cook is a Principal Researcher at Microsoft’s
principle. In Proceedings of ICALP, 2005. research laboratory at Cambridge University, and a
sion. Scalability to large and complex professor of computer science at Queen Mary, University
9. Chawdhary, C., Cook, B., Gulwani, S., Sagiv, M. and
programs is currently a problem for of London, England.
Yang, H. Ranking abstractions. In Proceedings of
modern termination provers—cur- ESOP, 2008.
Andreas Podelski is a professor of computer science at
10. Codish, M., Genaim, S., Bruynooghe, M., Gallagher, J.
rent techniques are known, at best, to the University of Freiburg, Germany.
and Vanhoof, W. One loop at a time. In Proceedings of
scale to simple systems code of 30,000 WST, 2003.
Andrey Rybalchenko is a professor of computer science
11. Colón, M. and Sipma, H. Synthesis of linear ranking at the Technische Universität München, Germany.
lines of code. Another problem we face functions. In Proceedings of TACAS, 2001.
is one of precision. Some small pro- 12. Cook, B., Gotsman, A., Podelski, A., Rybalchenko, A.
and Vardi, M. Proving that programs eventually do
grams currently cannot be proved ter- something good. In Proceedings of POPL, 2007.
minating with existing tools. Turing’s 13. Cook, B., Gulwani, S., Lev-Ami, T., Rybalchenko, A.
and Sagiv, M. Proving conditional termination. In
undecidability result, of course, states Proceedings of CAV, 2008.
that this will always be true, but this 14. Cook, B., Podelski, A. and Rybalchenko, A. Termination
does preclude us from improving pre- proofs for systems code. In Proceedings of PLDI, 2006.
15. Dershowitz, N., Lindenstrauss, N., Sagiv, Y. and
cision for various classes of programs Serebrenik, A. A general framework for automatic
and concrete examples. The most fa- termination analysis of logic programs. Appl. Algebra
Eng. Commun. Comput., 2001.
mous example is that of the Collatz’ 16. Farkas, J. Uber die Theorie der einfachen
problem, which amounts to proving Ungleichungen. Journal für die reine und angewandte
Mathematik, 1902.
the termination or non-termination 17. Geser, A. Relative termination. PhD dissertation, 1990.
of the program in Figure 11. Currently 18. Giesl, J., Swiderski, S., Schneider-Kamp, P. and
Thiemann, R. Automated termination analysis
no proof of this program’s termination for Haskell: From term rewriting to programming
behavior is known. languages. In Proceedings of RTA, 2006. © 2011 ACM 0001-0782/11/05 $10.00

98 communications of th e acm | may 2 0 1 1 | vol . 5 4 | no. 5


research highlights
p. 100 p. 101
Technical Computational Complexity
Perspective
Complex Financial and Information Asymmetry
Products:
Caveat Emptor
in Financial Products
By Sanjeev Arora, Boaz Barak, Markus Brunnermeier, and Rong Ge
By David C. Parkes

p. 108 p. 109
Technical Self-Similarity-based
Perspective
Images Everywhere Image Denoising
Looking for Models By Antoni Buades, Bartomeu Coll, and Jean-Michel Morel
By Guillermo Sapiro

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t he acm 99


research highlights
doi:10.1145/1941487.1 9 4 1 5 1 0

Technical Perspective
Complex Financial Products:
Caveat Emptor
By David C. Parkes

The flow of capital in the financial in- consider Akerlof’s famous “lemons choose how to package together assets
dustry relies on the packaging of assets problem.” Suppose that 80% of second- into derivatives.
into products that can be reliably valued hand cars are good, and worth $1,000 The authors establish the intracta-
and then sold to global investors. For to buyers, while the rest are lemons bility of detecting rigged financial prod-
example, many home mortgages were and worth $0. Without the ability for a ucts for the kinds of CDOs that arise in
packaged into products known as Col- seller to credibly signal the quality of a the financial industry. The penalty for
lateralized Debt Obligations (CDOs) in car, buyers will only pay $800 and trades the realism of their model is that the
the run-up to the sub-prime mortgage of good cars by sellers with values in hardness assumption that they require
crisis of 2007. An investor in a CDO buys the range [$800, $1,000] are forfeited. is not as standard as P vs NP; rather
the rights to a share of the principal and If all sellers of good cars want close to the results assume the intractability
interest payments collected from home- $1,000 then the effect of information of finding planted dense subgraphs in
owners. By pooling assets and promising asymmetry between buyers and sellers random graphs. The seller is doing the
to pass along payments before making is much worse—only lemons remain “planting” in this case, by placing a dis-
payments to other investors, new finan- in the market and there is complete proportionate number of assets from
cial products offering lower risk than market collapse! Still, a seller with 100 one class into some subset of products.
the underlying assets can be construct- cars, each correctly known by a buyer Under this assumption, CDOs cannot
ed. CDOs are examples of financial de- to be a lemon with probability 0.2, can alleviate the lemons problem: either
rivatives, with a value that depends on make a new deal: the right to use up to buyers are fooled and sellers make ex-
the underlying assets—mortgages in 80 of the cars. Because it is highly likely cess profits, or buyers know not to trust
this case—with which they are linked. that at least this many cars will be good, sellers. Many believe the planted dense
These kinds of complex financial this deal can be priced at about $80,000, subgraph problem is hard, and this has
products are the cause célèbre of the fi- around the price at which it would trade been considered a plausible conjecture
nancial crisis, and many have called for without information asymmetry. The before this paper was published. Still,
their regulation or even elimination. same thing happens in a simple model it is possible this hardness assumption
In the following paper, Arora, Barak, of CDOs, in which a seller packages as- is false, and this should be studied by
Brunnermeier, and Ge provide new sets into a single derivative that can be computer scientists.
insight into the problem: a complexity- accurately priced and sold. This provocative paper should be re-
theoretic explanation for how sellers Now consider a seller with 1,000,000 quired reading for commentators and
can hide bad assets in these derivatives. cars, with the cars partitioned into financial regulators alike. Among the
Even when buyers are fully informed, classes, and the association with a class questions it raises: Are sellers using
with correct beliefs about the probabil- known to buyers. Each class is a “lem- this information asymmetry to their ad-
ity with which underlying mortgages ons class” with some probability, in vantage in packaging “booby-trapped”
are likely to default, sellers can pack- which case it contains only lemons, and CDOs and other financial derivatives?
age a disproportionate number of bad otherwise is a “good class” and contains Given that buyers and ratings agencies
assets into some products, and do so a mixture of good cars and lemons. may not be aware of their own com-
without detection. The reason is the in- The probability of a lemons class, and putational limitations, is there a role
tractability of checking whether or not the fraction of lemons in a good class, for regulation in protecting buyers by
this manipulation has occurred. By fo- is known to buyers. The seller again banning complex financial products
cusing on this missing angle of compu- constructs deals, each deal this time that are provably untrustworthy? Do
tational complexity, this paper starts to consisting of 100 cars drawn from one there exist derivatives that cannot be
bridge the gap between the common or more classes. But whereas a buyer manipulated by strategic sellers, thus
view that derivatives can be rigged and knows only the distributional prop- avoiding this new lemons cost due to
a viewpoint from economics that this erties of the classes, the seller knows computational complexity?
is impossible when buyers are fully which are lemons and which are good Buyers might like to reflect on the
informed. Computationally bounded classes. The new problem is this infor- implications of their bounded rational-
buyers may end up significantly over- mation asymmetry allows a seller to as- ity. Caveat emptor!
paying, and a trustworthy seller cannot sign a disproportionate number of cars
even prove that financial products have from lemons classes to some deals, and David C. Parkes (parkes@eecs.harvard.edu) is Gordon
McKay Professor of Computer Science in the School of
not been rigged. to do so without detection by a computa- Engineering and Applied Sciences at Harvard University,
To understand the reason to sell tionally bounded buyer! The same story where he founded the EconCS research group.
derivatives in the first place, we can applies for CDOs, where a big bank can © 2011 ACM 0001-0782/11/05 $10.00

100 commun ic ations of t h e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


doi:10.1145/1941487 . 1 9 4 1 5 1 1

Computational Complexity
and Information Asymmetry
in Financial Products
By Sanjeev Arora, Boaz Barak, Markus Brunnermeier, and Rong Ge

1. INTRODUCTION information in the market, in practice these effects will per-


A financial derivative is a contract entered between two par- sist—or even get worse—because market participants are not
ties, in which they agree to exchange payments based on computationally sophisticated enough to solve cryptographic
events or on the performance of one or more underlying problems. This suggests that better regulation and more
assets—independently of whether they own or control the informed buyers are not sufficient for derivatives market to
underlying assets (e.g., the DOW Jones index falling below work correctly, or at least that regulators and buyers should
10,000). Securitization of cash flows using derivatives trans- take computational complexity into account. Such issues are
formed the financial industry over the last three decades. further discussed at the end of the paper in Section 5.
However, mispricing of these derivatives is believed to The bite of computational complexity: Computational com-
have contributed to the financial crash of 2008 (see e.g. plexity studies intractable problems, such as NP-complete prob-
Brunnermeier8 and Coval et al.10). lems, which are conjectured to require more computational
There are also suggestions that derivatives were delib- resources than can be provided by the fastest computers. (For
erately misused. In Spring 2010 there was a famous an introduction see the text.4) The key reason it comes naturally
­allegation about investment bank Goldman Sachs’s into the study of financial derivatives is that it implies an asym-
Abacus derivative. The security and exchange commis- metry between the ease of creating ­problems and solving them.
sion alleged that Goldman Sachs collaborated with short- A simple example is the problem of factoring integers. It is easy
seller Paulson to select particularly bad mortgages as the to take two random prime numbers—say 7019 and 5683—and
underlying assets for this derivative. Tranches of Abacus multiply them—in this case, to obtain 39888977. However, given
were sold to ABN Amro and IKB Deutsche Industriebank, 39888977, it is not that easy to factor it to get the two numbers
who were unaware of Goldman’s selection methods and 7019 and 5683. Algorithms that search over potential factors
lost almost $1 billion within a few months of buying these take very long time. This difficulty becomes more pronounced
assets. as the numbers have more and more digits. Computer scien-
Hence, it is not surprising that derivatives have attracted tists believe that factoring an n-digit number requires roughly
criticism—Warren Buffett famously called them “financial exp(n1/3) time to solve,a a quantity that becomes astronomical
weapons of mass destruction”—accompanied with calls for even for a moderate n like 10,000. The intractability of this prob-
extensive regulation and even an outright ban. Others point lem leads to a concrete realization of information asymmetry.
out—with ample justification from economic theory—that Anybody who knows how to multiply can randomly generate
derivatives are beneficial because they allow better risk shar- (using a few coin flips and a pen and paper) a large integer by
ing by “completing” markets, and also protect buyers from multiplying two smaller factors. This ­integer could have say
the effects of asymmetric information, ameliorating the so- 1000 digits, and hence can fit in a paragraph of text. The per-
called “lemon” problem (which arises whenever one party son who generated this integer knows its (prime) factors, but
in the transaction has more information about the asset no computational device in the universe can find a nontrivial
than the other; cf. Section 2). According to this viewpoint, factor in any plausible amount of time.b This informational
problems with derivatives would disappear with use of more asymmetry underlies modern cryptosystems, which allow (for
accurate financial models, more vigilance by buyers and
­better governmental oversight. a 
The precise function is more complicated, but in particular the security of
In our paper,5 which the current write-up is trying to most electronic commerce depends on the infeasibility of factoring integers
describe at a simplified level, we injected a new aspect into with roughly 800 digits.
this debate. We show that even when the underlying financial
b 
Experts in computational complexity should note that we use factoring
merely as a simple illustrative example. For this reason we ignore the issue
model used by buyers and sellers is correct there is an inherent of quantum computers, whose possible existence is relevant to the factor-
obstacle to accurate pricing due to computational complex- ing problem, but does not seem to have any bearing on the computational
ity. Formally, even in industry-standard models, the pric- ­problems used in this paper.
ing problem can be as difficult as solving the planted dense
subgraph problem, which has been proposed as a basis for A previous version of this paper appeared in The First
cryptosystems. The practical implication is that though Symposium on Innovations in Computer Science (ICS 2010).
derivatives such as collateralized debt obligations (CDOs) Tsinghua University Press, Beijing, China; 49−65.
can theoretically ameliorate the effects of asymmetric

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t h e acm 101


research highlights

example) two parties to exchange information over an open And we show in this note that pricing certain financial deriva-
channel in a way that an eavesdropper can extract no informa- tives may require solving problems that are believed to be intrac-
tion from ­it—not even distinguish it from a randomly gener- table, hence placing it beyond the reach of any real-life agent.
ated sequence of symbols. More generally, in computational
complexity we consider a computational task infeasible if the 2. THE “LEMONS PROBLEM” IN ECONOMICS
resources needed to solve it grow exponentially in the length of To understand the theoretical benefits of financial deriva-
the input, and consider it feasible if these resources only grow tives it is useful to recall the lemons problem, introduced
polynomially in the input length. in Akerlof’s classic 1970 paper.1 The simplest setting is as
Computational complexity immediately implies the exis- follows. You are in the market for a used car. A used car in
tence of hard-to-price derivatives, albeit unnatural ones. working condition is worth $1000. However, 20% of the used
Consider for example a derivative whose contract contains cars are lemons (i.e., are useless, even though they look fine
a 10,000 digit integer n and has a nonzero payoff iff the unem- on the outside) and their true worth is $0. Thus if you could
ployment rate next January, when rounded to the nearest pick a used car at random then its expected worth would
integer, is the last digit of a factor of n. A relatively unsophis- be only $800 and not $1000. Now consider the seller’s per-
ticated seller can generate such a derivative together with spective. Suppose sellers know whether or not they own a
a fairly accurate estimate of its yield (to the extent that unem- lemon. A  seller who knows he has a non-lemon would be
ployment rate is predictable), yet even a sophisticated investor unwilling to sell for $800, and would therefore withdraw
like Goldman Sachs would have no idea what to pay for it. This from the ­market. The market would be left only with lem-
example shows both the difficulty of pricing ­arbitrary deriva- ons, and knowing this, buyers would refuse to buy any car.
tives and the possible increase in asymmetry of information Thus the market grounds to a halt. Akerlof’s paper goes
via derivatives. on to analyze reasons why used cars do sell in real life. We
While this “factoring derivative” is obviously far removed will be interested in one of the reasons, namely, that there
from anything used in current markets, in this work we could be a difference between what a car is worth to a buyer
show that similar effects can be obtained in simpler and versus a seller. In the above example, the seller’s value for a
more popular classes of derivatives that are essentially the working car might be $200 less than the buyer’s—perhaps
ones used in real life in securitization of mortgages and because the seller is moving across the country and needs
other forms of debt. The person selling the derivative can the cash—thus allowing trade to occur. In this case we say
structure (“rig”) the derivative in a way such that it has low that the “lemon cost” of this market is $200. Some authors
yield, but distinguishing it from a normal (“unrigged”) refer to the lemon cost as a wedge. Generally, the higher this
higher yield derivative is computationally intractable. Thus cost, the less efficient the market.
any ­efficient pricing mechanism would either overvalue the The lemons problem can potentially arise in almost every
rigged derivative or undervalue the unrigged one, hence area of the economy, and a large body of work in information
­creating an inefficiency in the market. economics describes how it can be ameliorated. Akerlof’s
Densest subgraph problem: Our result relies on the conjec- original paper already described signaling mechanisms
ture that there does not exist a tractable algorithm to detect by which a seller can reliably communicate his private
large dense subgraphs in random graphs. This is a more ­­information—namely, prove that his car is not a lemon—
­specialized assumption than the familiar P ¹ NP conjecture. to the buyer. For example, a used car dealer can show the
We needed this assumption because we needed to exhibit buyer repair records, or provide a warranty for 6 months, or
the intractability of “real-life” derivatives, and the setting point out to his stellar reputation and rating from the Better
there naturally leads to random graphs, as will be clear in Business Bureau.
the description in Section 4.
Computational complexity and “bounded rationality”: 3. FINANCIAL DERIVATIVES AND CDOs
Computational complexity can be related to the bounded The lemons problem also arises in the financial industry
rationality concept in economics. Simon14 proposed the and the usual mechanisms for dealing with lemons prob-
notion of bounded rationality to recognize that in decision lems (as identified by Akerlof) have also flowered: borrower
making, real-life agents are limited by their cognitive ability FICA ­ratings (a.k.a. credit scores), ratings of individual
to process information and the finite amount of time they ­securities by agencies such as Moody’s, etc. Financial deriva-
have. Simon postulates that agents use heuristics instead tives ­provide another mechanism for dealing with the lem-
of time-consuming and complex optimizing behavior. ons problem. Below we will illustrate this with a common
Experimental evidence on behavioral biases supports this derivative called the collateralized debt obligation or CDO.
notion (e.g. Kahneman,13 etc.). On the other hand, economic It is not commonly known, but the humble home mort-
experiments also suggest that as the stakes rise and people gage is actually a very complex instrument that presents
face similar situations repeatedly, they behave more delib- great risks for lenders. The payoff structure is complicated;
eratively in a way that approaches rationality. In particular risk of default is fairly high (compared say to a U.S. trea-
this is the case in the setting of finance, where stakes are high sury bond); and there is high risk of prepayment at times of
and traders have access to cutting edge technology. However, low interest rates, which is precisely when the mortgage’s
even the most sophisticated traders cannot escape the limita- locked-in higher rate is most valuable to the lender. CDOs
tions of computational complexity, since no physically realiz- are financial devices that allow many mortgages to be aggre-
able computational device can solve intractable problems. gated into a security that has a supposedly much more

102 commun ications of t h e acm | may 2 0 1 1 | vo l . 5 4 | no. 5


predictable yield, and hence more attractive to risk-averse estimate of the rate of default, whereas the buyer may have
lenders such as retirement funds. a less precise idea—say that the rate lies between 10% and
Consider the following simplistic example: suppose 15%. Economic theory says that in addition to transforming
a bank holds a portfolio of 100 mortgages, and that each the risk profile of the asset, the CDO also protects the inves-
mortgage yields $0 if the borrower defaults and $1 million oth- tor from this lemons problem. The crucial observation is that
erwise. For now assume the probability of default is 10%, even if the probability of default was 15%, the probability of the
which implies that the expected yield (and hence fair price) senior tranche yielding its maximum of $80 million would still
for the entire portfolio is $90 million. The bank would like to be roughly 99.9%, and hence the tranching insulates the buyer
get all or most of these mortgages off its books because this from the information-sensitive part of the mortgage pool.
is favorable for regulatory reasons. Since each individual In fact, as was shown by DeMarzo,11 the choice of the
mortgage may be unacceptably risky for a risk-averse buyer, threshold can be used as a signaling mechanism that allows
the bank holding the mortgages can do the following. Create the bank to transmit in a trustworthy way the true default
two new assets by combining the above 100 mortgages. Set value. We now illustrate the idea behind this result. Consider
a threshold, say $80 million. The first asset, called the senior the problem from the bank’s viewpoint. It is interested in
tranche, has claim to the first 80 ­million of the yield; and the getting rid of as many mortgages—specifically, the largest
second, called the junior tranche, has claim to the rest. These possible portion of the entire portfolio—from its book as
assets are known as collateralized debt obligations (CDOs). possible, so it wants to set the threshold as high as possible.
The bank offers the senior tranche to the risk-averse buyer Suppose it knows the default rate is 15%. This is the highest
and holds on to the junior tranche (Figure 1). possible default rate, so it can simply sell the whole bundle
Now a risk-averse buyer may reason as follows: if the of mortgages (i.e. set the threshold to 100%). The buyers will
mortgage defaults are independent events (which is a big use their most pessimistic evaluation (that the default rate
if, though in practice justified by pooling mortgages made is 15%) and pay the price of $85 million. Both the seller and
to a geographically diverse group of homeowners, whose the buyer are satisfied because the price is just equal to the
defaults are presumably independent) then the senior estimated yield. Suppose on the other hand that the bank
tranche is extremely unlikely to ever yield less than its maxi- knows the default rate is actually only 10%, the lowest pos-
mum total value of $80 million. In fact for this to happen, sible rate. Now setting the threshold to 100% is no longer its
more than 20  mortgages need to default, which happens best strategy, since the buyers will just pay $85 million while
only with probability . Thus the bundle is now worth $90 million. To signal its confidence
the senior tranche is a very safe asset with a highly predictable in the quality of mortgages, the bank will tranch the pool,
yield, and such derivatives were often rated by credit-rating set the threshold to 80%,c and offer to hold the riskier part—
agencies to be as safe as a U.S. treasury bond. In real-life the junior tranche. Knowing that the bank will not offer this
CDOs the mortgage yields, payment streams, and tranching lower threshold when the default rate is high (indeed, the best
are all much more complex, but the basic idea is the same. threshold for default rate 15% is 100%), the rational buyers
The lemons problem enters: There is an obvious lemons prob- should correctly interpret this as a signal to the true default
lem in the above scenario because of asymmetric information: rate and pay close to $80 million for the senior tranche. Again,
The bank that issued the mortgages has the most accurate both the seller and the buyer are satisfied because the price is
almost equal to the estimated yield of the senior tranche.
Making the above intuitive argument precise in the usual
Figure 1. Aggregating many mortgages into a single asset makes the rational expectations framework of economic theory takes
yield more predictable due to the law of large numbers (central limit some work, and was done in DeMarzo,11 where it is shown
theorem). This assumes that the yields of the different mortgages that the CDO is the optimum solution to the lemons prob-
are independent random variables.
lem in a setting somewhat more general than the above
­simplistic one. Specifically, the CDO allows the lemon
I want to buy a house, cost—i.e., the difference in valuation of the security by
I want to get good but very but might default on
safe returns. buyer and bank required for the sale to occur—to approach
my loan
0.d That is, the bank’s secret information does not lead to
large market inefficiencies. Henceforth we will refer to this
as DeMarzo’s Theorem.

4. WHY COMPLEXITY MATTERS


0.45
0.4
1
0.9
We presented above the traditional justification for CDOs
Cumulative Probability

0.8
from economic theory. Now we explain at an intuitive level
Probability Density

0.35
0.3 0.7
0.6
0.25
0.5
0.2
0.4
0.15 0.3
0.1 0.2
c 
The exact threshold here depends on a number of factors, including ­default
0.05 0.1
0 0 rate and discount factor. The discount factor shows how much the seller pre-
0 2 4 6 8 10 12 14 16 18 20
fers cash to assets. The threshold can be computed exactly using methods
Aggregating mortgages gives in DeMarzo.11
an asset with predictable yields d 
A nonzero difference in valuation or wedge between the bank and buyer
arises because the buyer holds cash and the bank holds the mortgages, and
the bank prefers cash to mortgages because of regulatory or other reasons.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t h e acm 103


research highlights

why introducing computational complexity into the picture


gaussians and the central limit theorem
greatly complicates the picture, and even takes away some of
The ability of CDOs to ameliorate effects of asymmet- the theoretical benefits of CDOs. The full analysis appears in
ric ­information relies on the law of large numbers, our longer paper.
which informally speaking states that the total payoff The important twist we introduce in the above scenario
of a bundle of mortgages is close to the mean (or is that a large bank is selling many CDOs and not just a
­expected) value. More precisely, we have the central single one. DeMarzo’s theorem does not generalize to this
limit theorem: The sum of sufficiently many bounded case, and indeed we will show that whether or not the CDOs
and independent random variables will be approxi- ameliorate the lemons problem depends upon the compu-
mately distributed like a Gaussian with same mean tational ability of the buyer. The lemons problem gets ame-
and variance. The Gaussian is a good approximation liorated only if the buyer is capable of solving the densest
even when the number of variables is only in the hun- subgraph problem, which is currently believed to be com-
dreds. Therefore, if there are 100 mortgages, each pay- putationally difficult.
ing 1 with probability 1/2 and paying 0 otherwise, the We will use the assumption—consistent with practice—
distribution of the total payoff is like a Gaussian with that mortgages are grouped into classes depending upon
mean 50 and standard deviation 5. The probability that factors such as the borrower’s credit score, geographic loca-
the payoff is outside [35, 65] (three standard devia- tion, etc., and that default rates within a class are the same.
tions) is less than 0.2%. Consider for simplicity a bank with N asset classes, each of
which contains C assets. Some asset classes are “lemons”:
Histogram of ProportionOfHeads assets in these classes will always default and have payoff 0.
All other asset classes are good: assets in these classes pay
500
1/C with probability 1/2 and default (i.e., have payoff 0) with
probability 1/2. The yields of assets from different asset
400 classes are independent.
The buyer’s prior is that the number of lemon classes is
uniformly distributed in [0, 2n] for some n < N/2, and the
Frequency

300
set of lemon classes is uniformly picked among all classes.
200 However, the bank has additional information: it knows
precisely which classes are lemons (this implies that it
100 knows the number of lemons as well). This is the asymmet-
ric information.
0 Since the expected number of lemon classes is n, each
0.40 0.45 0.50 0.55 0.60 0.65 with payoff 0 and the remaining N – n good classes have
ProportionOfHeads ­payoff 1/2, a buyer purchasing the entire portfolio would
be willing to pay the expected yield, which is (N – n)/2. Thus
a wedge à la Akerlof arises for banks who discover that the
In addition to their value as limiting distributions for the number of lemons is lower than the expectation, and they
sum of independent random variables, Gaussians arise would either exit the market, or would need to prefer cash by
in one other way in finance: often the payoffs of assets an amount that overcomes the wedge.
themselves are ­assumed to be Gaussians. The joint distri- Of course, DeMarzo’s theorem allows this lemons prob-
bution of these Gaussian valued assets is the well-known lem to be ameliorated, via securitization of the entire
Gaussian copula: portfolio into a single CDO. As already mentioned, we are
interested in the case where the number of assets held by
Gaussian copula Density of Gaussian copula the bank is large, and so, rather then using a single CDO, the
bank partitions them into multiple CDOs. Now how does the
1.8
1 1.6 bank’s extra information affect the sale? Clearly, it has new
0.8 1.4
1.2
cherry-picking possibilities, involving which asset to pack-
0.6 1 age into which CDO. We will assume that all transactions
0.4 0.8
0.6 are public and visible to all buyers, which means that seller
0.2
0
0.4
0.2
must do any such cherry picking in full public view.e
1
1 0 Now let us show that in principle derivatives should still
1
0.5 0.6 0.8 allow buyers to rule out any significant cherry picking, thus
0.4 0.5
0.2 0.8 1
0 0 0 0 0.2 0.4 0.6 ameliorating the lemon wedge. Consider the following:
the seller creates M new financial products, each of them
Although in the illustrative example we assumed binary
payoffs for a single asset, similar results hold for asset e 
This assumption of transparency only makes our negative results stron-
yields that form a Gaussian copula with the same mean, ger. It also may be a reasonable approximation if buyers are well-informed,
variance, and covariance. and recent financial regulation has mandated more transparency into the
­market.

104 commun ications of t h e ac m | may 2 0 1 1 | vo l . 5 4 | no. 5


a CDO depending on a pool of D of the underlying assets. by random pooling. The question is whether buyers can be
We assume MD = NC and that every asset occurs in exactly fooled by this cherry picking. We have to consider two cases,
one pool. Clearly, assets in the same class should be distrib- based on the buyer’s computational powers.
uted to different products in order to ensure the diversity Fully rational (computationally unbounded) buyer: He
of the products. Each CDO will have assets from distinct will not be fooled. Even though he does not know the set
classes (and hence have stochastically independent yields) of lemon classes, he knows thanks to random graph theory
so that sum of their yields follows the central limit theo- (see the excellent references of Alon and Spencer2 and
rem. Suppose each one of the M products has the follow- Bollobás7) that in a randomly chosen portfolio of CDOs the
ing design: it pays off N/(3M) units as long as the number possibility of accidentally setting up such a boobytrap is
of assets in its pool that defaulted is at most for vanishingly remote. Therefore it suffices for him to rule out
some parameter t (set to be about ), and otherwise it the existence of any boobytrap in the presented portfolio:
pays 0. Henceforth we call such a product a “binary CDO”; it he enumerates over all possible 2n-sized subsets of the N
can be viewed as the senior tranche of a simple CDO.f Assets classes and verifies that none of them are over-represented
contained in the same product come from different classes, in any subset of m products. The same calculations as above
the yields of good assets are uniformly iid, so the expected guarantee him that in this case the yield of the derivative is
number of defaults among D good assets is D/2 and the at least V – o(n), even though he does not know the identity
standard deviation is . Now the central limit theorem of the lemon classes. Thus a seller has no incentive to plant
applies and the total number of defaults may be assumed a boobytrap for a fully rational buyer, and the lemon wedge
to be distributed like a Gaussian. Thus so long as the frac- is indeed ameliorated greatly if buyers are fully rational.
tion of lemon classes is much smaller than the safety mar- Real-life buyer, who is feasibly rational (computationally
gin of t standard deviations, the probability of default for bounded): For him the above computation for detecting
an individual CDO is tiny. Thus, if V denotes the combined ­boobytraps is infeasible even for moderate parameter values.
expected yield of these M products, then V ≈ M × N/3M = N/3. To get an appreciation of the infeasible problem lurking
(The exact value of V is unimportant below.) here, it helps to take a graph-theoretic view of the problem.
If the bank were to pick the pools truly randomly— Recall that a bipartite graph consists of two disjoint sets of
i.e., the entire portfolio of assets is randomly partitioned ­vertices A, B such that each edge has an endpoint in both
into the M pools—then the portfolio’s expected yield is only A and B. We can use a bipartite graph to represent the port-
mildly affected by the presence of lemons. Specifically, if V folio of CDOs: A is the set of asset classes and B is the set of
is the expected yield when there are no lemon classes, then CDOs, and an edge (a, b) indicates that the CDO numbered
it can be shown that the yield is still V – o(n) (i.e. larger than b contains an asset from the asset class numbered a (see
V – n for any  > 0) when the ­number of lemon classes is 2n, Figure 2).
the maximum possible. In this sense derivatives can help Of course the buyer will also try other possible algo-
significantly reduce the lemon wedge from n to o(n), thus rithms to detect the boobytrap. If the bank randomly
performing their task of allowing a party to sell off the least throws assets into CDOs, then this graph that represents
information-sensitive portion of the risk. the portfolio is some kind of random graph. If the bank
However, the above description assumed that the seller creates a boobytrap as described above, then the boobytrap
creates the pools disinterestedly using pure randomness. But corresponds to a dense subgraph in this bipartite graph: it is
this may be against his self-interest given his secret informa- a subset of asset classes (the lemons) and a subset of CDOs
tion! Given that the seller’s interest is to give out the minimum (the boobytrapped ones) where the number of edges lying
yield possible, as long as this is undetected by the buyer, it between them is substantially higher than it would be in a
turns out that his optimum strategy is to pick some subset of random graph.
m of the financial products, and ensure that the lemon assets The problem of detecting a boobytrap is equivalent to the
are overrepresented in the pools of these m products—to an so-called hidden dense subgraph problem, which is widely
extent about which is just enough to significantly skew believed to be intractable. In fact the conjecture is that there
the probability of default. We call this subset of n CDOs the is no efficient way to distinguish the truly random bipartite
“boobytrap.” Thus the CDOs in the boobytrap have a much
higher probability of default than buyers expect, causing the Figure 2. Using a bipartite graph to represent asset classes and
expected yield of the entire portfolio of CDOs to be smaller by derivatives. There are M vertices on top corresponding to the
an amount proportional to m (roughly mN/(3M) ).g derivatives and N vertices at the bottom corresponding to asset
classes. Each derivative references D assets in different classes.
With some settings of m the tampered derivative can
have much smaller yield than the yield of V – o(n) obtained

f 
This is a so-called synthetic binary option. The more popular CDO derivative
described above behaves in a similar way, except that if there are defaults
above the threshold (in this case ) then the payoff is not 0 but
the defaults are just deducted from the total payoff. We call this a “tranched
CDO” to distinguish it from the binary CDO.
g 
The non-booby trapped CDOs will have a slightly smaller probability of
­default than in the untampered (i.e., random) case, but a simple calculation
shows that this will only contribute a negligible amount to the yield.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t h e acm 105


research highlights

graph from one in which the bank has “planted” the dense 5. DISCUSSION
subgraph (a.k.a. boobytrap). Formally, the two kinds of The notion that derivatives need careful handling has been
graphs are believed to be computationally indistinguishable extensively discussed before. Coval et al.10 show that pric-
for polynomial-time algorithms and this was the basis of ing (or rating) a structured finance product like a CDO is
a recent cryptosystem proposed by Applebaum et al.3 extremely fragile to modest imprecision in evaluating
The conjecture is that even quite large boobytraps may underlying risks, including systematic risks. The high level
be undetectable: the expected yield of the entire portfolio idea is that these everyday derivatives are based upon the
could be much less than say V – n1.1 and yet the buyer may not threshold function, which is highly sensitive to small pertur-
be able to distinguish it from a truly random (i.e., honestly bations of the input distribution. Indeed, empirical stud-
­constructed) portfolio, whose yield is V – o(n). ies suggest that valuations for a given financial product by
We conclude that if buyers are computationally different sophisticated investment banks can be easily 17%
bounded, then introducing derivatives into the picture not apart6 and that even a single bank’s evaluations of different
only fails to reduce the lemon wedge, but paradoxically, “tranches” of the same derivative may be mutually incon-
amplifies it even beyond the total value 2n of all lemon sistent.12 Thus one imagines that banks are using different
assets. Though the above example is highly simplified, it models and assumptions in evaluating derivatives.
can be embedded in settings that are closer to real life and The question studied in our work is: Is there a problem
similar results are obtained. with derivatives even if one assumes away the above possi-
bilities, in other words the yield of the underlying asset exactly
4.1. Can the cost of complexity be mitigated? fits the stochastic model assumed by the buyer? Economic
In Akerlof’s classic analysis, the no-trade outcome dictated theory ­suggests the answer is “No”: informed and rational
by lemon costs can be mitigated by appropriate signal- buyers need not fear derivatives. (Recall our discussion of
ing mechanism—e.g., car dealers offering warranties to DeMarzo’s theorem.)
increase confidence that the car being sold is not a lemon. The main contribution of our work has been to formal-
In the above setting, however, there seems to be no direct ize settings in which this prediction of economic theory
way for seller to prove that the financial product is untam- may fall short (or even be falsified), and manipulation is
pered i.e., free of boobytraps. (It is believed that there is ­possible and undetectable by all real-life (i.e., computation-
no simple way to prove the absence of a dense subgraph; ally bounded) buyers. We have worked within existing con-
this is related to the NP ¹ coNP conjecture.) Furthermore, ceptual frameworks for asymmetric information. It turns
we can show that for suitable parameter choices the tam- out that the seller can benefit from his secret information
pering is undetectable by the buyer even ex post. The buyer (viz., which assets are lemons) by using the well-known fact
realizes at the end that the financial products had a much that a random election involving n voters can be swung with
lower yield than expected, but would be unable to prove significant probability by making voters vote the same
that this was due to the seller’s tampering. Nevertheless, way; this was the basis of the boobytrap described earlier.
we do show in our paper5 that one could use ideas from The surprising fact is that a computationally limited buyer
computer science in designing derivatives that are tam- may not have any way to distinguish such a tampered CDO
perproof in our simple setting. from untampered CDOs. Formally, the indistinguishabil-
ity relies upon the conjectured intractability of the planted
4.2. Complexity ranking dense s­ ubgraph problem.h
Recently, Brunnermeier and Oehmke9 suggested that trad- The model in our more detailed paper has several nota-
ers have an intuitive notion of complexity for derivatives. ble features:
Real-life markets tend to view derivatives such as CDO2
(a CDO whose underlying assets are CDOs like the one 1.  The largeness of the market—specifically, the fact that
described earlier) as complex and derivatives like CDO3 sellers are constructing thousands of financial prod-
(a CDO whose underlying assets are CDO2) as even more so. ucts rather than a single product as was the case in the
One might think that the number of layers of removal from model of DeMarzo11—allows sellers to cherry pick in
a simple underlying real asset could be a natural measure such a way that cannot be detected by feasible ­rational
of complexity. However, as Brunnermeier and Oehmke9 (computationally bounded) buyers—i.e., all real-world
point out, such a definition might not be appropriate, buyers—while it can be detected by fully rational (com-
since it would rank e.g. highly liquid stocks of investment putationally unbounded) buyers.
banks, which hold CDO2s and other complex assets, as one 2.  The possibility of cherry picking by sellers creates an
of the most complex securities. Our paper5 proposes an Akerlof-like wedge between buyer’s and seller’s valua-
alternative complexity ranking which is based on the above tions of the financial product. We call this the lemon
discussed notion of lemon cost due to complexity. This rank- cost due to computational complexity. In our detailed
ing also confirms the standard intuition that CDO2s are paper we can quantify this wedge for several classes of
more complex than CDOs. Roughly speaking, the cherry- derivatives popular in securitization. This allows a par-
picking possibilities for sellers of CDOs described in this
paper become even more serious for derivatives such as h 
Note that debt-rating agencies such as Moody’s or S&P currently use simple
CDO2 and CDO3. simulation-based approaches to evaluate derivatives, which certainly do not
attempt to solve something as complicated as densest subgraph.

106 communications of t h e acm | may 2 0 1 1 | vo l . 5 4 | no. 5


tial ranking of these classes, which can be seen as a 4. Arora, S. and Barak, B. Computational Complexity in financial markets.
Complexity: A Modern Approach. Working Paper. Princeton University.
quantification of more familiar heuristic notions of Cambridge University Press, 2009. 10. Coval, J., Jurek, J., Stafford, E.
“complexity.” This answers the open question of 5. Arora, S., Barak, B., Brunnermeier, M., The economics of structured
Ge, R. Computational complexity and finance. J. Econ. Perspect. 23(1)
Brunnermeier and Oehmke.9 information asymmetry in financial (2009), 3–25.
3.  It can be difficult for regulatory bodies to control the products. In The First Symposium 11. DeMarzo, P.M. The pooling and
on Innovations in Computer Science, tranching of securities: A model of
above-mentioned cherry picking because the cherry ICS 2010, Tsinghua University Press, informed intermediation. Rev. Financ.
picking can be difficult to detect ex ante. In some Beijing, 2010, 49–65. Stud. 18(1) (2005), 1–35.
6. Bernardo, A.E., Cornell, B. The 12. Duffie, D. Innovations in credit risk
­models the cherry picking seems undetectable even valuation of complex derivatives by transfer: Implications for financial
ex  post. Both these remain true even in a fully trans- major investment firms: Empirical stability. BIS Working Papers.
evidence. J. Finance 52 (1997), 13. Kahneman, D. Maps of bounded
parent market where all transactions occur on a public 785–798. rationality: Psychology for behavioral
7. Bollobás, B. Random Graphs, 2nd edn. economics. Am. Econ. Rev. 93(5)
exchange. It also implies that verifying the existence of Cambridge University Press, 2001. (2003), 1449–1475.
the lemon cost due to computational complexity in 8. Brunnermeier, M.K. Deciphering the 14. Simon, H.A. Bounded rationality
liquidity and credit crunch 2007–08. and organizational learning.
historical data (in other words, an empirical test of our J. Econ. Perspect. 23(1) (2009), 77–100. Organ. Sci. 2(1) (1991),
paper) may prove difficult, especially given that the 9. Brunnermeier, M.K., Oehmke, M. 125–134.
market has not been fully transparent.

In sum, our approach of combining insights from computer Sanjeev Arora (arora@cs.princeton.edu), Markus Brunnermeier (markus@
Department of Computer Science, princeton.edu), Department of Economics,
science with economic questions allows one to formally Center for Computational Intractability, Bendheim Center for Finance,
study phenomena, such as complexity and bounded ratio- Princeton University, Princeton, NJ. Princeton University, Princeton, NJ.
nality, that are of first-order importance but were difficult
to capture in formal economic models. These new insights Boaz Barak (boaz@microsoft.com), Rong Ge (rongge@cs.princeton.edu),
Microsoft Research New England, Department of Computer Science, Center
should help shape future regulation and the post-2008 Princeton University, Princeton, NJ. for Computational Intractability,
­financial architecture. Princeton University, Princeton, NJ.

References Probabilistic Method, 3rd edn. Wiley,


1. Akerlof, G.A. The market for “lemons”: Hoboken, NJ, 2008.
Quality uncertainty and the market 3. Applebaum, B., Barak, B., Wigderson,
mechanism. Q. J. Econ. 84(3) (1970), A. Public-key cryptography from
488–500. different assumptions. In Proceedings
2. Alon, N., Spencer, J.H. The of STOC, 2010, 171–180. © 2011 ACM 0001-0782/11/05 $10.00

You’ve come a long way.


Share what you’ve learned.

ACM has partnered with MentorNet, the award-winning nonprofit e-mentoring network in engineering,
science and mathematics. MentorNet’s award-winning One-on-One Mentoring Programs pair ACM
student members with mentors from industry, government, higher education, and other sectors.
• Communicate by email about career goals, course work, and many other topics.
• Spend just 20 minutes a week - and make a huge difference in a student’s life.
• Take part in a lively online community of professionals and students all over the world.

Make a difference to a student in your field.


Sign up today at: www.mentornet.net
Find out more at: www.acm.org/mentornet
MentorNet’s sponsors include 3M Foundation, ACM, Alcoa Foundation, Agilent Technologies, Amylin Pharmaceuticals, Bechtel Group Foundation, Cisco
Systems, Hewlett-Packard Company, IBM Corporation, Intel Foundation, Lockheed Martin Space Systems, National Science Foundation, Naval Research
Laboratory, NVIDIA, Sandia National Laboratories, Schlumberger, S.D. Bechtel, Jr. Foundation, Texas Instruments, and The Henry Luce Foundation.

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t h e acm 107


research highlights
doi:10.1145/1941487.1 9 4 1 5 1 2

Technical Perspective its optimality are naturally raised. The


image processing community is busy
Images Everywhere addressing these questions.
There is another critical aspect
Looking for Models clearly illustrated by the following
seminal work, this being the idea of
By Guillermo Sapiro addressing image inverse problems
with overlapping local image regions,
About 5,000 images per minute are up- image inverse problems. The basic or overlapping image patches. In many
loaded to the photo-sharing site http:// underlying concept is that local image scenarios this became the working
www.flickr.com/; over 7,000,000 a day. information repeats itself across the unit, replacing the standard single
Similar numbers are uploaded to oth- non-local image. Noise, on the other point or pixel (sometimes these are
er social sites. Often these images are hand, is expected in numerous scenar- now called super-pixels). While some
acquired by amateur photographers ios to be random. Therefore, collecting researchers have adopted models that
under non-ideal conditions and with those similar local regions all across are different than the self-similarity
low-end digital cameras such as those the image, the noise can be eliminated one, it is safe to say that today, six years
available in mobile phones. Such im- by simple estimators based on having after their original paper was pub-
ages often look noisy, blurry, and with multiple observations of the same un- lished, the state-of-the-art techniques
the wrong colors or contrast. Even im- derlying signal under different noise for image reconstruction, as well as
ages acquired by high-end devices, conditions. This simple and powerful for image classification, are all based
such as MRI or microscopy, suffer idea of self-similarity, which brings a on working with these super-pixels
from these effects due to the intrinsic unique perspective of simultaneous or patches. This has become a funda-
physics of the device and the structure local and non-local processing, dates mental building block of virtually all
of the material being photographed. A at least to Shannon’s model for Eng- image models.
key challenge in image science then is lish writings in 1950 (“Prediction and The authors’ work also starts hint-
how to go from the “low-” quality im- Entropy of Printed English,” Bell Sys. ing at the idea that we can learn the
age to a high-quality one that is sharp, Tech. J., 50–64), and was used in image model from the data itself, or at least
has good contrast, and is clean of arti- processing for synthesis tasks. But it adapt it to the image, instead of re-
facts. This is an intrinsically ill-posed was not until the 2005 elegant paper lying on predefined mathematical
inverse problem, according to Had- by Buades et al. that the community structures. This relates to dictionary
amard’s definition. So, what do we do? had its Eureka moment and clearly re- learning, where the image is modeled
We have to include additional as- alized it could be exploited for recon- as being represented via a learned
sumptions, a process often called reg- structions challenges as well. dictionary. The self-similarity model
ularization. These assumptions come This idea of self-similarity opened assumes the dictionary is the image
with different names depending on a large number of questions. At the itself, or actually its local patches. All
one’s particular area of research or practical level, we could ask how to de- these models indicate that images,
interest, and are often called priors or fine the scale of the local regions, how and in particular image patches, do
models. Deriving appropriate regular- to efficiently find similar regions in not actually live in the ambient high-
ization terms, priors or models, has an image, how to define the distance dimensional space, but in some much
occupied the research community between local image regions to deter- lower dimensional stratification em-
since the early days of digital image mine that they are “similar,” and what bedded on it.
processing, and we have witnessed type of image processing tasks can For over 40 years, the image pro-
fantastic and very inspiring models be addressed with this model. At the cessing community has been on the
such as linear and nonlinear diffusion, theoretical level, standard questions lookout for image models. The most
wavelets, and total variation. Different like consistency of the estimator and fundamental of them have left im-
image models can be appropriate for portant footprints in the community.
different types of images; for example, Many of the questions are still open
MRI and natural images should have In their landmark today, from the eternal battle be-
different models. Indeed, some mod- tween generative and discriminative
els might be useful for some inverse paper, Buades, Coll, models to the need of deriving com-
problems and not for others. and Morel discuss putationally feasible and fundamen-
In their landmark paper, Buades, tally useful models. All this work goes
Coll, and Morel discuss a number of a number of image to the root of our desire to know “What
image models under a unified frame- models under is an image?”
work. Let us concentrate on the self-
similarity model, which leads to the a unified framework. Guillermo Sapiro (guille@umn.edu) is a professor in the
Department of Electrical and Computer Engineering at
important non-local means algorithm the University of Minnesota.
proposed by the authors for image
denoising and its extensions to other © 2011 ACM 0001-0782/11/05 $10.00

108 commun ications of t h e ac m | may 2 0 1 1 | vol . 5 4 | no. 5


doi:10.1145/1941487 . 1 9 4 1 5 1 3

Self-Similarity-based
Image Denoising
By Antoni Buades, Bartomeu Coll, and Jean-Michel Morel

Abstract Formally we define a denoising method Dh as a


The search for efficient image denoising methods is still decomposition
a valid challenge at the crossing of functional analysis
and statistics. In spite of the sophistication of the recently v = Dhv + n(Dh, v),
­proposed methods, most algorithms have not yet attained a
desirable level of applicability. All show an outstanding per- where v is the noisy image and h is a filtering parameter,
formance when the image model corresponds to the algo- which usually depends on the standard deviation of the
rithm assumptions but fail in general and create artifacts or noise. Ideally, Dhv is smoother than v and n(Dh, v) looks like
remove image fine structures. The main focus of this paper the realization of a white noise.
is, first, to define a general mathematical and experimen- The denoising methods should not alter the original
tal methodology to compare and classify classical image image u. Now, most denoising methods degrade or remove
denoising algorithms and, second, to describe the nonlo- the fine details and texture of u. In order to better understand
cal means (NL-means) algorithm6 introduced in 2005 and this removal, we shall introduce and analyze the method noise.
its more recent extensions. The mathematical analysis is The method noise is defined as the difference between the ori­
based on the analysis of the “method noise,” defined as the ginal (always slightly noisy) image u and its denoised version.
difference between a digital image and its denoised version. The denoising methods should not introduce visual arti-
NL-means, which uses image self-similarities, is proven to facts. The noise-to-noise principle requires that a denoising
be asymptotically optimal under a generic statistical image algorithm transforms a white noise into white noise. This
model. The denoising performance of all considered meth- paradoxical requirement seems to be the best way to charac-
ods are compared in four ways: mathematical, asymptotic terize artifact-free algorithms.
order of magnitude of the method noise under regularity We also propose and analyze the NL-means algorithm,
assumptions; perceptual-mathematical, the algorithms which is defined by the simple formula
artifacts and their explanation as a violation of the image
model; perceptual-mathematical, analysis of algorithms
when applied to noise samples; quantitative experimen-
tal, by tables of L2 distances of the denoised version to the
original image. where is a normalizing
constant, Ga is a Gaussian kernel, and h acts as a filtering
parameter. This formula amounts to say that the denoised
1. INTRODUCTION value at x is a mean of the values of all points whose Gaussian
The goal of image denoising methods is to recover the origi- neighborhood looks like the neighborhood of x. The main
nal image from a noisy measurement: difference of the NL-means algorithm with respect to local
filters or frequency domain filters is the systematic use of
v(i ) = u(i ) + n(i ), (1) all possible self-predictions the image can provide, in the
spirit of Efros and Leung.19 Section 2 gives formulas for
where v(i) is the observed value, u(i) is the “true” value, and the method noise of several classic algorithms. Section 3
n(i) is the noise perturbation at a pixel i. The best simple describes NL-means. Section 4 gives its consistency results.
way to model the effect of noise on a digital image is to add A substantial experimental Section 5 compares several clas-
a Gaussian white noise. In that case, n(i) are i.i.d. Gaussian sic algorithms by the new introduced criteria and Section 6
values with zero mean and variance s 2. reviews many recent extensions, applications, and variants.
Several methods have been proposed to remove the
noise and recover the true image u. Even though they may 2. METHOD NOISE
be very different in tools it must be emphasized that a wide Definition 1 (Method noise). Let u be an image and Dh a
class share the same basic remark: denoising is achieved denoising operator depending on a filtering parameter h. Then,
by averaging. This averaging may be performed locally: the we define the method noise as the image difference u − Dhu.
Gaussian smoothing model,27 the anisotropic filtering,2,  35
and the neighborhood filtering;40, 42, 46 by the calculus of
The original version of this paper is entitled “A review
variations: the total variation minimization;39 or in the fre-
of image denoising algorithms, with a new one.” It was
quency domain: the empirical Wiener filters46 and wavelet
published in Multiscale Modeling and Simulation, 2005.
thresholding methods.12, 17

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t h e acm 109


research highlights

The application of a denoising algorithm should not while flat and textured regions are degraded.
alter the non-noisy images. So the method noise should Total Variation Minimization: The total variation minimi-
be very small when some kind of regularity for the image zation was introduced by Rudin et al.39 Given a noisy image
is assumed. If a denoising method performs well, the v(x), these authors proposed to recover the original image
method noise must look like a noise even with non-noisy u(x) as the solution of the minimization problem:
images and should contain as little structure as possible.
Since even good quality images have some noise, it makes TVFλ(v) = arg min
u
TV(u) + λ∫ |v(x) − u(x)|2dx,
sense to evaluate any denoising method in that way, with-
out the traditional “add noise and then remove it” trick. where TV   (u) denotes the total variation of u and λ is a given
We shall list formulas permitting to compute and analyze Lagrange multiplier. The minimum of the above minimi-
the method noise for several classical local smoothing fil- zation problem exists and is unique. The parameter λ is
ters: the Gaussian filtering,27 the anisotropic filtering,2, 35 related to the noise statistics and controls the degree of fil-
the total variation minimization,39 and the neighborhood tering of the obtained solution.
filtering.46 The formal analysis of the method noise for the
frequency domain filters falls out of the scope of this paper. Theorem 3. The method noise of the total variation mini-
These method noises can also be computed but their inter- mization is
pretation depends on the ­particular choice of the wavelet
or Fourier basis.

The Gaussian Filtering: The image isotropic linear filtering


As in the anisotropic case, straight edges are maintained
boils down to the convolution of the image by a linear sym-
because of their small curvature. However, details and tex-
metric kernel. The paradigm of such kernels is of course
ture can be over smoothed if  λ is too small.
the Gaussian kernel . In that case, Gh has
standard deviation h and it is easily seen that Neighborhood Filtering: The previous filters are based on a
notion of spatial neighborhood or proximity. Neighborhood
Theorem 1 (Gabor 1960). The image method noise of the filters instead take into account gray-level ­values to define
Gaussian convolution satisfies u − Gh ∗ u = −h2 ∆ u + o(h2). neighboring pixels. In the simplest and more extreme
case, the denoised value at pixel i is an ­average of values
The Gaussian method noise is zero in harmonic parts of at ­pixels that have a gray-level value close to u(i). The gray-
the image and very large near edges or texture, where the level neighborhood is therefore
Laplacian cannot be small. As a consequence, the Gaussian
convolution is optimal in flat parts of the image but edges B(i, h) = { j ∈ I | u(i) − h < u( j) < u(i) + h}.
and texture are blurred.
This is a fully nonlocal algorithm, since pixels belonging to
The Anisotropic Filtering: The anisotropic filter (AF) the whole image are used for the estimation at pixel i. This
attempts to avoid the blurring effect of the Gaussian by con- algorithm can be written in a more continuous form:
volving the image u at x only in the direction orthogonal to
Du(x). The idea of this filter goes back to Perona and Malik35
and is interpreted in Alvarez et al.2 It is defined by
where W ⊂ R2 is an open and bounded set, and C(x) =
is the normalization factor.
The Yaroslavsky neighborhood filters46 consider mixed
for x such that Du(x) ≠ 0 and where (x, y)⊥ = (−y, x) and Gh neighborhoods B(i, h) ∩ Br(i  ), where Br(i) is a ball of center
is the one-dimensional Gauss function with variance h2. i  and radius r. So the method takes an average of the val-
If one assumes that the original image u is twice continu- ues of pixels that are both close in gray-level and spatial
ously differentiable (C2) at x, it is easily shown by a second- ­distance. This filter can be easily written in a continuous
order Taylor expansion that form as

Theorem 2. The image method noise of AFh satisfies ( for


Du(x) ≠ 0)

where is the normalization factor.


More recent versions, namely the SUSAN filter 40 and the
By curv(u)(x), we denote the curvature, that is, the signed Bilateral filter42 weigh the distance to the reference pixel x
inverse of the radius of curvature of the level line passing instead of considering a fixed spatial neighborhood.
by x. This method noise is zero wherever u behaves locally In the next theorem, we compute the asymptotic expan-
like a straight line and large in curved edges or texture sion of the Yaroslavky neighborhood filter when r, h → 0
(where the curvature and gradient operators take high val- have the same order of magnitude. The proof and general-
ues). As a consequence, the straight edges are well restored izations of this result can be found in Buades et al.7

110 commun ic ations of t h e ac m | may 2 0 1 1 | vo l . 5 4 | no. 5


Theorem 4. Suppose u ∈ C2(W), and let r, h, a  > 0 such where the family of weights {w(i, j)}j depend on the simi-
that r, h → 0 and h = O(r). Let us consider the continuous larity between the pixels i and j and satisfy the usual condi-
function �
g defined by for t ≠ 0, where tions 0 ≤ w(i,  j) ≤ 1 and ∑j w(i,  j ) = 1.
Let �
f be the continuous function defined by The similarity between two pixels i and j depends on
Then, for x ∈ W, the similarity of the intensity gray level vectors v(Ni ) and
v(Nj ), where Nk denotes a square neighborhood of fixed
size ­centered at a pixel k. This similarity is measured as a
decreasing function of the weighted Euclidean distance,
2
½½v (Ni ) − v(Nj )½½2, a , where a > 0 is the standard deviation
of the  Gaussian kernel. The expectation of the Euclidean
­distance of the noisy neighborhoods is
According to Theorem 4 the Yaroslavsky neighborhood
­ lter acts as an evolution PDE with two terms. The first term
fi
is proportional to the second derivative of u in the direction
x, which is tangent to the level line passing through x. The This equality shows the robustness of the algorithm since
second term is proportional to the second derivative of u in in expectation the Euclidean distance preserves the order
the direction h, which is orthogonal to the level line passing of similarity between pixels.
through x. The pixels with a color neighborhood similar to v(N i)
The weighting coefficient of the tangent diffusion, have larger weights in the average, see Figure 2. These
uxx, is given by � g  ( |Du|). The function � g is positive and weights are defined by
decreasing. Thus, there is always diffusion in that direc-
tion. The weight of the normal diffusion, uhh, is given by � f  (
|Du|). As the function � f takes positive and negative val-
ues (see Figure 1), the ­filter behaves as a filtering/enhanc-
ing ­algorithm in the normal direction depending on |Du|.
The intensity of the filtering in the tangent diffusion and
the enhancing in the normal diffusion tend to zero when
the  gradient tends to infinity. Thus, points with a very where Z(i) is the normalizing constant and the parameter
large gradient are not altered. h controls the decay of the weights as a function of the
The neighborhood filter asymptotically behaves as Euclidean distances. NL-means not only compares the gray
the Perona–Malik equation,35 also creating shocks inside level at a single point but the geometrical configuration
smooth regions (see Buades et al.7 for more details on this in a whole neighborhood. This fact allows a more robust
comparison). ­comparison than neighborhood filters (see Figure 2). This
figure illustrates how NL-means implicitly chooses a best
3. NL-MEANS ALGORITHM averaging neighborhood depending on the image structure
Given a discrete noisy image v = {v(i ) | i ∈ I}, the estimated in a wide neighborhood.
value NL[v](i), for a pixel i, is computed as weighted average
of all the pixels in the image: Figure 2. q1 and q2 have a large weight in NL-means because their
similarity windows are similar to that of p, while the weight w(p, q3)
is much smaller.

Figure 1. Magnitude of the tangent diffusion (continuous line) and


normal diffusion (dashed line – –) of Theorem 4.

0.2

0.15

0.1

0.05

2 4 6 8

-0.05

-0.1

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t h e acm 111


research highlights

In Section 2, we have computed explicitly the method The full statement of the hypothesis of the theorem and
noise of the local smoothing filters. These formulas are its proof can be found in a more general framework in
corroborated by the visual experiments of Figure 3. This Roussas.38 This theorem tells us that the NL-means algo-
­figure displays the method noise for the standard image rithm corrects the noisy image rather than trying to separate
Boat, that is, the difference u − Dh(u), where the parameter the noise ­(oscillatory) from the true image (smooth).
h is been fixed in order to remove a noise with standard In the case that an additive white noise model is assumed,
deviation 2.5. The method noise helps us in understand- the next result shows that the conditional expectation is the
ing the performance and limitations of the denoising algo- function of V (Ni \{i}) that minimizes the mean square error
rithms, since removed details or texture correspond to a with the true image u.
large method noise. We see in Figure 3 that the NL-means
method noise does not present noticeable ­geometrical Theorem 6. Let V, U, N be random fields on I such that
structures. Figure 4 explains this property since it shows V = U + N, where N is a signal-independent white noise. Then,
how the NL-means algorithm chooses a weighting con- the following statements hold good.
figuration adapted to the local and nonlocal geometry of
the image.  (i) E[V(i) | Xi = x] = E[U(i) | Xi = x] for all i ∈ I and x ∈ Rp.
(ii) The expected random variable E[U(i ) | V (Ni\{i})] is the
4. NL-MEANS CONSISTENCY   function of V (Ni\{i}) that minimizes the mean square
Under stationarity assumptions, for a pixel i, the NL-means   error
algorithm converges to the conditional expectation of i once
observed a neighborhood of it. In this case, the stationarity min
g
E[U(i) − g (V(Ni \{i}))]2
conditions amount to say that as the size of the image grows,
we can find many similar patches for all the details of the Similar optimality theoretical results have been obtained in
image. Ordentlich et al.34 and presented for the denoising of binary
Let V be a random field and suppose that the noisy images.
image  v  is a realization of V. Let Z denote the sequence of
random variables Zi = {Yi , Xi} where Yi = V (i) is real ­valued and 5. DISCUSSION AND EXPERIMENTATION
Xi = V (Ni \{i}) is Rp valued. The NL-means is an estimator of In this section, we compare the local smoothing filters, the
the conditional expectation r (i) = E[Yi|Xi  = v(Ni \{i})]. wavelet thresholding algorithms,17 sliding DCT Wiener fil-
ter,46 and the NL-means algorithm. The wavelet threshold-
Theorem 5 (Conditional Expectation Theorem). ing and the sliding DCT algorithms yield state-of-the-art
Let Z = {V (i), V(Ni\{i})} for i = 1, 2, . . . be a strictly stationary results among frequency domain filters.
and mixing process. Let NLn denote the NL-means ­algorithm For computational purposes of the NL-means algo-
applied to the sequence Zn = {V(i), V(Ni\{i})}ni =1. Then for j ∈ rithm, the search of similar windows was restricted to a
{1, . . . , n}, larger “search window” with size S × S pixels. In all experi-
ments, the search window has 21 × 21 pixels and the simi-
|NLn( j ) − r( j )| → 0   a.s. larity square neighborhood 3 × 3 pixels for color images
and 5 × 5 pixels for gray images. When denoising a color

Figure 3. Image method noise. From left to right and from top to bottom: original image, Gaussian convolution, anisotropic filtering, total
variation minimization, neighborhood filter, translation invariant wavelet thresholding, DCT sliding window Wiener filter, and the NL-means
algorithm. The parameters have been set for each method to remove a method noise with variance s2 = 2.52.

112 commun ications of t h e acm | may 2 0 1 1 | vo l . 5 4 | no. 5


image, the whole color patch containing the red, green, shows. Figure 7 shows an experiment on a natural image.
and blue pixels is compared. Thus, a single weight is This experience must be compared with Figure 3, where we
obtained for any pair of pixels and used for the denoising ­display the method noise of the original image. The blurred
of the three channels at this pixel. or degraded structures of the restored images coincide
The filtering parameter h has been fixed to 0.8s when with the noticeable structures of its method noise. Figure 8
a noise of standard deviation s  is added. Due to the fast shows that the frequency domain filters are well adapted to
decay of the exponential kernel, large Euclidean distances the recovery of oscillatory patterns. Although some artifacts
lead to nearly zero weights acting as an automatic threshold are noticeable in both solutions, the stripes are well recon-
(Figure 4). structed. The DCT transform seems to be more adapted
to this type of texture, and stripes are little better recon-
Visual Comparison: Visual criteria remains essential to structed. NL-means also performs well on this type of tex-
decide if the quality of the image has been improved by the ture, due to its high degree of redundancy.
denoising method. We display some denoising experiences Noise-to-Noise Criterion: The noise-to-noise principle
comparing the NL-means algorithm with local smoothing requires that a denoising algorithm transforms a white
and frequency domain filters. All experiments have been noise into white noise. This paradoxical requirement seems
simulated by adding a Gaussian white noise of standard
deviation s  to the true image. The objective is to compare Figure 5. NL-means denoising experiment with a Brodatz texture
the visual quality of the restored images, the nonpresence image. Left: Noisy image with standard deviation 30. Right:
NL-means restored image. The Fourier transform of the noisy and
of artifacts, and the correct reconstruction of edges, tex-
restored images show how main features are preserved even
ture, and details. at high frequencies.
Due to the nature of the algorithm, the most favorable
case for NL-means is the textured or periodic case. In this
situation, for every pixel i, we can find a large set of samples
with a very similar configuration. See Figure 4f for an exam-
ple of the weight distribution of the NL-means algorithm for
a periodic image. Figure 5 illustrates the performance of the
NL-means for a ­natural texture and Figure 6 for an artificial
periodic pattern.
Natural images also have enough redundancy to be
restored by NL-means, see Figure 7. Flat zones present
a  huge number of similar configurations lying inside
the  same object, see Figure 4a. Straight or curved edges
have a complete line of pixels with similar configurations,
see Figure 4b, c. In addition, natural images allow us to find
many similar configurations in far away pixels, as Figure 4f

Figure 4. On the right-hand side of each pair, we display the weight


distribution used to estimate the central pixel of the left image by the
NL-means algorithm. (a) In flat zones, the weights are distributed as
a convolution filter (as a Gaussian convolution). (b) On straight edges,
the weights are distributed in the direction of the edge (like for AF). Figure 6. Denoising experience on a periodic image. From left to
(c) On curved edges, the weights favor pixels belonging to the same right and from top to bottom: noisy image (standard deviation 35), total
contour or level line, which is a strong improvement with respect varia­tion minimization, neighborhood filter, translation invariant wavelet
to AF. (d) In a flat neighborhood, the weights are distributed in a thresholding, DCT sliding window Wiener filtering, and NL-means.
gray-level neighborhood (like for a neighborhood filter). In the cases
of (e) and (f), the weights are distributed across the more similar
configurations, even though they are far away from the observed
pixel. This shows a behavior similar to a nonlocal neighborhood filter
or to an ideal Wiener filter.

(a) (b) (c)

(d) (e) (f)

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t h e acm 113


research highlights

Figure 7. Denoising experience on a natural image. From left to right Figure 8. Denoising experience on a natural image. From left to right
and from top to bottom: noisy image (standard deviation s = 20), and from top to bottom: noisy image (standard deviation 35), total
Gaussian convolution (h = 1.8), anisotropic filter (h = 2.4), total variation variation minimization, neighborhood filter, translation invariant
(l = 0.04), the Yaroslavsky neighborhood filter (r = 7, h = 28), and the wavelet thresholding, DCT sliding window Wiener filter, and NL-means.
NL-means algorithm. Parameters have been set for each algorithm so that
the removed quadratic energy is equal to the energy of the added noise.

to be the best way to characterize artifact-free algorithms.


The transformation of a white noise into any correlated
signal creates structure and artifacts. Only white noise is
perceptually devoid of visual structure, a principle first
stated by Attneave.4 Figure 9 shows how denoising methods
­transform a white noise.
The convolution with a Gauss kernel is equivalent to
the product in the Fourier domain with a Gauss kernel of
inverse standard deviation. Therefore, convolving the noise
with a kernel reinforces the low frequencies and cancels the
high ones. Thus, the filtered noise actually shows big grains
due to its prominent low frequencies.
Noise filtered by a wavelet thresholding is no more a
white noise. The few coefficients with a magnitude larger
than the threshold are spread all over the image. The
pixels that do not belong to the support of one of these
coefficients are set to zero. The visual result is a constant Numerical Comparison: Table 1 displays the mean square
image with superposed wavelets as displayed in Figure 9. error for the denoising experiments given in the paper.
It is easy to prove that the denoised noise is spatially highly This numerical measurement is the most objective one,
correlated. since it does not rely on any visual interpretation. However,
Given a noise realization, the filtered value by the neigh- this error is not computable in a real problem and a small
borhood filter at a pixel i only depends on its value n(i) and mean square error does not assure a high visual quality. So
the parameters h and r. The neighborhood filter averages all above-discussed criteria seem necessary to compare the
noise values at a distance from n(i) less or equal than h. ­performance of denoising algorithms.
Thus, when the size r of the neighborhood increases,
by the law of large numbers the filtered value tends to the 6. EXTENSIONS SINCE 2005
expectation of the Gauss distribution restricted to the Our conclusions on the better denoising performance of
interval (n(i) − h, n(i) + h). This filtered value is therefore nonlocal methods with respect to former state-of-the-art
a deterministic function of n(i) and h. Independent ran- algorithms such as the total variation or the wavelet thresh-
dom variables are mapped by a deterministic function on olding have been widely accepted. The “method noise”
independent variables. Thus the noise-to-noise require- methodology to compare the denoising performance has
ment is asymptotically satisfied by the neighborhood fil- been adopted ever since.
ter. NL-means satisfies the noise-to-noise principle in a The NL-means algorithm is easily extended to the
similar manner. However, a mathematical statement and denoising of image sequences and video. The denoising
proof of this property are more intricate and we shall skip algorithm involves indiscriminately pixels not belonging
them. only to same frame but also to all frames in the image.

114 commun icat ions of t h e ac m | may 2 0 1 1 | vo l . 5 4 | no. 5


Figure 9. The noise-to-noise criterion. From left to right and from top to bottom: original noise image of standard deviation 20, Gaussian
convolution, anisotropic filtering, total variation, neighborhood filter, translation invariant wavelet thresholding, DCT sliding window Wiener
filter, and NL-means. Parameters have been fixed for each method so that the noise standard deviation is reduced by a factor 4.

Table 1. Mean square error table.

Image s GF AF TV YNF DCT Wav. Thresh NL-Means


Boat  8   53   38   39   39   33   28   23
Lena 20 120 114 110 129 105   81   68
Barbara 25 220 216 186 176 111 135   72
Baboon 35 507 418 365 381 396 365 292
Wall 35 580 660 721 598 325 712   59
A smaller mean square error indicates that the estimate is closer to the original image. The numbers have to be compared on
each row. The square of the number on the left-hand column gives the real variance of the noise. By comparing this square to
the values on the same row, it is quickly checked that all studied algorithms indeed perform some denoising. This is a sanity
check! In general, the comparison performance corroborates the previously mentioned quality criteria.

The ­algorithm favors pixels with a similar local configura- and Wiener filtering.
tion, as the ­similar configurations move, so do the weights. The NL-means algorithm has also expanded to most
Thus, the algorithm is able to follow the similar configura- image processing tasks: Demosaicking, which is the opera-
tions when they move without any explicit motion compu- tion that transforms the “R or G or B” raw image in each
tation (see Figure 10). This is not the case of classical movie camera into an “R and G and B” image;10, 30 movie coloriza-
denoising algorithms, which are motion compensated (see tion21,  26; image inpainting by proposing a nonlocal image
Buades et al.9 for more details on this discussion). The very inpainting variational framework with a unified treatment
same idea on movie denoising can be applied for super-res- of geometry and texture3 (see also Wong and Orchard44);
olution, an image zooming method by which several frames Zooming by a fractal like technique where examples are
from a video, or several low resolution photographs, can be taken from the image itself at different scales18; movie flicker
fused into a larger image.20, 37 stabilization16 that compensates spurious oscillations in
Improvements or adaptations of the NL-means algo- the colors of successive frames.
rithm have been proposed for the denoising of several NL-means is a computationally demanding algorithm.
types of data: in fluorescence microscopy,5 cryon micro­ Several papers have proposed fast and extremely fast (lin-
scopy,15 magnetic resonance imaging (MRI),31 and 3D data ear) implementations, by block preselection,29 by Gaussian
set points.47 KD-trees to classify image blocks,1 by SVD,33 by using the FFT
Most successful improvement of NL-means combine to compute correlation between blocks43, and by statistical
the nonlocal principle with former classic algorithms and arguments.13 The statistical validity of the NL-means algo-
have indeed shown an improved denoising performance. rithm is wide open. See Ebrahimi and Vrscay,18 Kervrann
Probably the best performing methods so far are the hybrid et  al.,24 and Thacker et al.41 (where a Bayesian interpreta-
method BM3D proposed in Dabov et al.14 and the NL-PCA tion is ­proposed) or Xu et al.45 (where a bias of NL-means is
proposed in Zhang et al.48 Both algorithms combine not corrected).
less than block-matching, a linear transform thresholding, The relationship of neighborhood filters to classic

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n icat io n s o f t h e acm 115


research highlights

Figure 10. Weight distribution of NL-means applied to a movie. In


The exploration of image redundancy and its applica-
(a), (b), and (c) the first row shows a five frames image sequence. In tion to image restoration has led to new attempts at sparse
the second row, the weight distribution used to estimate the central image representations by block dictionaries.24 Algorithms
pixel (in white) of the middle frame is shown. The weights are equally and application have been developed by Chatterjee and
distributed over the successive frames, including the current one.
Milanfar,11 Mairal et al.,30 and Protter and Elad.36
They actually involve all the candidates for the motion estimation
instead of picking just one per frame. The aperture problem can be
taken advantage of for a better denoising performance by involving Acknowledgment
more pixels in the average. This work was partially financed by MCYIT grant number
TIN2008-04752.

References Science (Springer, New York, 2006),


1. Adams, A., Gelfand, N., Dolson, J., 33–40.
Levoy, M. Gaussian kd-trees for fast 14. Dabov, K., Foi, A., Katkovnik, V.,
high-dimensional filtering. ACM Trans. Egiazarian, K. Image denoising
Graphics 28, 3 (2009), 1–12. by sparse 3-D transform-domain
2. Alvarez, L., Lions, P., Morel, J. Image collaborative filtering. IEEE Trans.
selective smoothing and edge I.P. 16, 8 (2007), 2080–2095.
detection by nonlinear diffusion. II. 15. Darbon, J., Cunha, A., Chan, T., Osher,
(a) SIAM J. Numer. Anal. 29, 3 (1992), S., Jensen, G. Fast nonlocal filtering
845–866. applied to electron cryomicroscopy.
3. Arias, P., Caselles, V., Sapiro, G. A In 5th IEEE International
variational framework for non-local Symposium on Biomedical
image inpainting. In Proceedings Imaging: From Nano to Macro
of the 7th International (Paris, France, May 14–17, 2008),
Conference on Energy 1331–1334.
Minimization Methods in Computer 16. Delon, J., Desolneux, A. Stabilization
Vision and Pattern Recognition of flicker-like effects in image
(EMMCVPR´09) (Bonn, Germany, sequences through local
August 24–27, 2009), Springer, contrast correction. SIAM
Heidelberg. J. Imag. Sci. 3, 4 (2010),
4. Attneave, F. Some informational 703–734.
aspects of visual perception. 17. Donoho, D. De-noising by
Psychol. Rev. 61, 3 (1954), soft-thresholding. IEEE Trans.
183–193. Inf. Theory 41 (1995),
(b) 5. Boulanger, J., Sibarita, J., Kervrann, 613–627.
C., Bouthemy, P. Non-parametric 18. Ebrahimi, M., Vrscay, E. Solving
regression for patch-based the inverse problem of image
fluorescence microscopy image zooming using “Self-Examples”.
sequence denoising. In 5th IEEE In Volume 4633 of Lecture
International Symposium on Notes in Computer Science
Biomedical Imaging: From Nano to (2007), 117.
Macro, 2008 (Paris, France, 19. Efros, A., Leung, T. Texture
May 14–17, 2008), ISBI 2008, synthesis by non parametric
748–751. sampling. In Volume 2 of
6. Buades, A., Coll, B., Morel, J. A review Proceedings of the 7th IEEE
of image denoising algorithms, with a International Conference on
new one. Multiscale Model. Simul. 4, Computer Vision (Corfu,
2 (2005), 490–530. Greece, 1999), 1033–1038.
7. Buades, A., Coll, B., Morel, 20. Elad, M., Datsenko, D. Example-based
(c) J. Neighborhood filters and regularization deployed to super-
PDE’s. Numer. Math. 105, 1 (2006), resolution reconstruction of a single
1–34. image. Comput. J. 50, 4 (Apr. 2007),
8. Buades, A., Coll, B., Morel, J. 1–16.
local PDE’s has been discussed in Buades et al.,7, 8 lead- The staircasing effect in 21. Elmoataz, A., Lezoray, O.,
neighborhood filters and its solution. Bougleux, S., Ta, V. Unifying local
ing to an adaptation of NL-means that avoids the stair cas- IEEE Trans. I.P. 15, 6 (2006), and nonlocal processing with
ing effect. Yet, the main interest has shifted to defining 1499–1505. partial difference operators
9. Buades, A., Coll, B., Morel, J. on weighted graphs. In International
non­local PDEs. The extension of the NL-means method to Nonlocal image and movie denoising. Workshop on Local and Non-Local
Int. J. Comput. Vision 76, 2 (2008), Approximation in Image Processing
define nonlocal image-adapted differential operators and 123–139. (Lausanne, Switzerland, August
nonlocal variational methods starts with Kindermann 10. Buades, A., Coll, B., Morel, J., 23–24, 2008).
Sbert, C. Self-similarity driven color 22. Gilboa, G., Osher, S. Nonlocal
et al.,25 who propose to perform denoising and deblurring demosaicking. IEEE Trans. I.P. 18, linear image regularization and
by nonlocal functionals. Several articles on deblurring 6 (2009), 1192–1202. supervised segmentation.
11. Chatterjee, P., Milanfar, P. Image Multiscale Model. Simul. 6,
have followed this variational line22, 23, 32 (for image seg- denoising using locally learned 2 (2008), 595–630.
mentation) and Lou et al.28 for deconvolution and tomo- dictionaries. Comput. Imag. 23. Jung, M., Vese, L. Nonlocal
VII, SPIE 7246 (2009), variational image deblurring
graphic reconstruction. 72460V–72460V. models in the presence of Gaussian
A particular notion of nonlocal PDE has emerged, 12. Coifman, R., Donoho, D. or impulse noise. Scale Space and
Translation-invariant de-noising. Variational Methods
whose coefficients are actually image dependent. For In Wavelets and Statistics. in Computer Vision (2009),
instance, in Elmoataz et al., 21 the image colorization is Lecture Notes in Statistics 401–412.
(Springer Verlag, New York, 1995), 24. Kervrann, C., Boulanger, J., Coupe, P.
viewed as the minimization of a discrete partial differ- 125–150. Bayesian non-local means filter,
ential functional on the weighted block graph. Thus, it 13. Coupé, P., Yger, P., Barillot, C. image redundancy and adaptive
Fast non local means denoising dictionaries for noise removal.
can  be seen either as a nonlocal heat equation on the for 3D MR images. In Medical In Volume 4485 of Lecture
image or as a local heat equation on the space of image Image Computing and Computer- Notes in Computer Science
Assisted Intervention–MICCAI (Ischia, Italy, May 30–June 2,
patches. 2006. Lecture Notes in Computer 2007), 520.

116 commun icat ions of t h e ac m | may 2 0 1 1 | vo l . 5 4 | no. 5


25. Kindermann, S., Osher, S., 33. Orchard, J., Ebrahimi, M., Wong, A. 1 (1997), 45–78. 45. Xu, H., Xu, J., Wu, F. On the biased
Jones, P. Deblurring and Efficient non-local-means 41. Thacker, N., Manjon, J., Bromiley, P. A estimation of Nonlocal Means
denoising of images by nonlocal denoising using the SVD. In statistical interpretation of filter. In IEEE International
functionals. SIAM MMS 4, Proceedings of IEEE International non-local means. In 5th Conference on Multimedia and Expo
4 (2006), 1091–1115. Conference on Image Processing International Conference (San Diego, CA, October 12–15, 2008),
26. Lezoray, O., Ta, V., Elmoataz, A. (San Diego, CA, October 12–15, on Visual Information Engineering 1149–1152.
Nonlocal graph regularization 2008). (Xian, China, 2008), 250–255. 46. Yaroslavsky, L.P. Digital Picture
for image colorization. In 34. Ordentlich, E., Seroussi, G., 42. Tomasi, C., Manduchi, R. Bilateral Processing. Springer, New York,
International Conference on Verdu, M.W.S., Weissman, T. filtering for gray and color images. 1985.
Pattern Recognition (Tampa, FL, A discrete universal denoiser In International Conference on 47. Yoshizawa, S., Belyaev, A.,
December 8–11, 2008). and its application to binary Computer Vision (Bombay, India, Seidel, H. Smoothing by example:
27. Lindenbaum, M., Fischer, M., images. In Volume 1 of 1998), 839–846. Mesh denoising by averaging with
Bruckstein, A. On Gabor’s Proceedings of IEEE International 43. Wang, J., Guo, Y., Ying, Y., Liu, Y., similarity-based weights.
contribution to image Conference on Image Processing Peng, Q. Fast non-local algorithm In IEEE International Conference
enhancement. Pattern Recognit. (Barcelona, Spain, 2003), 117–120. for image denoising. In IEEE on Shape Modeling and Applications
27, 1 (1994), 1–8. 35. Perona, P., Malik, J. Scale-space International Conference on Image (Matsushima, Japan, June 14–16,
28. Lou, Y., Zhang, X., Osher, S., and edge detection using Processing (Atlanta, GA, October 2006), 9–9.
Bertozzi, A. Image recovery via anisotropic diffusion. IEEE Trans. 8–11, 2006), 1429–1432. 48. Zhang, L., Dong, W., Zhang, D.,
nonlocal operators. J. Sci. PAMI 12, 7 (1990), 44. Wong, A., Orchard, J. A Shi, G. Two-stage image denoising
Comput. 42, 2 (2010), 629–639. nonlocal-means approach to by principal component analysis
185–197. 36. Protter, M., Elad, M. Image sequence exemplar-based inpainting. In IEEE with local pixel grouping.
29. Mahmoudi, M., Sapiro, G. denoising via sparse and redundant International Conference on Image Pattern Recognit. 43, 4 (2010),
Fast image and video denoising representations. IEEE Trans. Processing, 2600–2603, 2008. 1531–1549.
via nonlocal means of similar Image Process. 18, 1 (2009),
neighborhoods. IEEE Signal 27–35.
Process. Lett. 12, 12 (2005), 37. Protter, M., Elad, M., Takeda, H., Antoni Buades (toni.buades@uib.es), Jean-Michel Morel (morel@cmla.
839–842. Milanfar, P. Generalizing the ­non- Université Paris Descartes, 45, rue Saints enscachan.fr), CMLA, ENS Cachan,
30. Mairal, J., Elad, M., Sapiro, G. Sparse local-means to super-resolution Pères, Paris, France. 61 av. Président Wilson, Cachan 94235,
representation for color image reconstruction. IEEE Trans. France.
restoration. IEEE Trans. I.P. 17, Image Process. 18, 1 Bartomeu Coll (tomeu.coll@uib.es),
1 (2007), 53–69. (January 2009), 36–51. Dpt Matematiques Informatica,
31. Manjón, J., Carbonell-Caballero, J., 38. Roussas, G. Nonparametric regression Universitat Illes Balears, Ctra
Lull, J., García-Martí, G., Martí- estimation under mixing conditions. Valldemossa km 7.5, Palma
Bonmatí, L., Robles, M. MRI Stochastic Process. Appl. 36 (1990), de Mallorca, Spain.
denoising using Non-Local Means. 107–116.
Med. Image Anal. 12, 4 (2008), 39. Rudin, L., Osher, S., Fatemi, E.
514–523. Nonlinear total variation based noise
32. Mignotte, M. A non-local removal algorithms. Physica D 60
regularization strategy for image (1992), 259–268.
deconvolution. Pattern Recognit. Lett. 40. Smith, S., Brady, J. SUSAN:
CACM 29, 16lifetime
(2008), mem half page ad:Layout
A new approach1to low 1/4/11
level image 5:53 PM Page 1
2206–2212. processing. Int. J. Comput. Vision 23, © 2011 ACM 0001-0782/11/05 $10.00

Take Advantage of
ACM’s Lifetime Membership Plan!
 ACM Professional Members can enjoy the convenience of making a single payment for their
entire tenure as an ACM Member, and also be protected from future price increases by
taking advantage of ACM's Lifetime Membership option.
 ACM Lifetime Membership dues may be tax deductible under certain circumstances, so
becoming a Lifetime Member can have additional advantages if you act before the end of
2011. (Please consult with your tax advisor.)
 Lifetime Members receive a certificate of recognition suitable for framing, and enjoy all of
the benefits of ACM Professional Membership.

Learn more and apply at:


http://www.acm.org/life

may 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t h e acm 117


careers
Center for Genomics and Georgia Southern University nationwide surveys as one of the best places to live
Bioinformatics (CGB) Assistant Professor in the U.S. We enjoy outstanding public schools, af-
Indiana University fordable housing, and great weather, all in the prox-
Genome Computing Unit Leader Tenure-track position in Computer Sciences at imity of both mountains and the seashore.
the Asst Prof level to begin August 1, 2011. For the Applications will be reviewed as they are re-
The Center for Genomics and Bioinformatics full position description and information about ceived. The positions will remain open until suit-
(CGB) (http://cgb.indiana.edu) is a research center the department, see http://cit.georgiasouthern. able candidates are identified. Applicants are en-
at Indiana University, Bloomington that carries edu/cs/. Georgia is an Open Records state. Geor- couraged to apply by April 1, 2011. Salary will be
out research in all aspects of genomics and bio- gia Southern University is an AA/EO institution. commensurate with qualifications. Applicants
informatics. The CGB Bioinformatics Group – Ge- should submit the following online at http://jobs.
nome Computing Unit conducts research in the ncsu.edu (reference position number 102077):
area of next generation sequencing and gene mi- Jacksonville University cover letter, curriculum vitae, teaching statement,
croarray data analysis, genome assembly and an- Visiting Assistant Professor of and names and complete contact information of
notation, functional genomics and systems biolo- Computing Science four references, including email addresses and
gy. We have an immediate vacancy for the Genome phone numbers. For more information about
Computing Unit Leader. Responsibilities include Position to begin August 2011. Expertise in pro- the position and department see http://www.csc.
guiding research projects; managing all aspects gramming, web app. development & related in- ncsu.edu/employment/ . Inquiries may be sent via
of the analysis of next generation sequencing and ternet technologies. Master’s degree required, email to: teaching_faculty_search@csc.ncsu.edu.
microarray projects, along with hiring, training, Ph.D. preferred. To apply: Send CV, transcripts, North Carolina State University is an equal op-
and supervising staff. Ideal candidate will hold a 3 current letters of support. Email: cssearch@ portunity and affirmative action employer. In ad-
Ph.D., have a strong background in computer sci- ju.edu, Fax: 904-256-7573. Application screening dition, NC State University welcomes all persons
ence and/or bioinformatics, and have extensive begins immediately. JU actively seeks application without regard to sexual orientation. Individuals
experience in genome data analysis. from individuals with diverse backgrounds & ex- with disabilities desiring accommodations in the
This is a non-tenure track research faculty ap- periences. We believe that diversity enriches the application process should contact the Depart-
pointment with salary and benefits commensu- workplace & the academic experience. ment of Computer Science at (919) 515-2858.
rate with prior experience. The position is avail-
able immediately. Those received by May 15, 2011
will be assured full consideration. To apply please North Carolina State University Purdue University
submit a CV and a description of your background Computer Science Department Post-doctoral Research Associate
and interests, and arrange that 3 letters of recom- Teaching Assistant Professor
mendation be sent to: Search: CGB-019: Genome Wanted a post-doctoral research associate to par-
Computing Unit Leader, Center for Genomics The Computer Science Department at North Caro- ticipate in a leadership role on a team to develop
and Bioinformatics, Indiana University, 1001 E. lina State University (NCSU) invites applications software for the modeling and analysis of agent-
3rd St., Bloomington IN 47405-7005. from outstanding committed teachers for one or based missile defense architectures, including
Indiana University is an affirmative action more Teaching Assistant Professor positions start- validation of the software. Team includes 8 other
equal opportunity employer. ing August 2011. Candidates must have a Ph.D. in participants. US citizenship or permanent resi-
Computer Science or a Ph.D. in a related area along dency is required.
with appropriate experience, by August 15, 2011.
The Microsoft Research – Candidates should provide substantial evidence Knowledge of:
University of Trento COSBI
of interest and excellence in teaching at the univer- ˲˲ Computer and communication modeling
Principal Investigator in
computer science sity level, and leadership in curricular innovation. ˲˲ Cybersecurity modeling
We are seeking an outstanding, highly Primary responsibilities will include teaching ˲˲ Optimization
motivated and experienced Principal undergraduate Computer Science courses, with ˲˲ Skills in:
Investigator in modeling and simulation.
initial focus on lower-division courses and man- ˲˲ Software development (Matlab, C, scripting)
PhD in Computer Science and at least eight years experience
of research activity in this field are required. agement of the introductory course sequences. ˲˲ Software validation
Skills and experience: This includes supervision of Teaching Assistants
• international reputation, distinguished record of scientific and development of (1) course and curricular ma- Apply:
results, large number of invited talks, high bibliometric
indexes, participation in steering committees, program terials (including interactive web-based materi- Contact Person: Saurabh Bagchi, Email Address:
committees and advisory bodies; als), (2) classroom demonstrations, and (3) labora- sbagchi@purdue.edu; Phone: 765-494-3362
• scientific and administrative coordination of large tory exercises. Successful candidates will interact
international projects;
• demonstrated ability to establish strong industrial with the regional and national community, and
collaborations, start and develop funded research must be student-centered with excellent commu- University of New Hampshire
programs;
nication skills. They will also be expected to con- Lecturer in Computer Science
• consulting experience for industries;
tribute to the department efforts in scholarship
• strong interpersonal and research leadership, vision
of the future development of biological and ecological and service. Participation in high quality research The Department of Computer Science of the Univer-
systems modeling; activities centered on teaching, learning and sity of New Hampshire invites applications for a full-
• demonstrated ability to manage stressing situations
and delivering results in time according to pre-defined Computer Science-related pedagogy is expected. time non-tenure track Lecturer position to begin
schedules; The Department, part of the university’s College August 22, 2011. The candidate should be able to
• experience as CS professional is preferred. of Engineering, is one of the oldest and largest in the teach a variety of undergraduate computer science
We offer a competitive salary. This job is in Northern Italy. country, and consistently ranks among the highest and information technology courses. For more in-
Other vacancies at www.cosbi.eu/index.php/open-positions
Send your application letter with statement of research
nationwide as a source of new university hires by formation see: http://www.cs.unh.edu/search.htm
interests, CV and contact information for three references to: major international companies. NCSU is located in UNH is an AA/EEO Employer. UNH is com-
COSBI HR Department • Trento – Italy • hr@cosbi.eu; Raleigh, capital of North Carolina, which forms one mitted to excellence through the diversity of its
Ph: +39 0461 282811 • Ref: Principal Investigator in
Computer Science vertex of the world-famous Research Triangle. The faculty and staff and encourages women and mi-
Research Triangle area is routinely recognized in norities to apply.

118 communications of t h e acm | may 2 0 1 1 | vol . 5 4 | no. 5


Expansion of the Research School
“Service-Oriented Systems Engineering“
at Hasso-Plattner-Institute
Hasso-Plattner-Institute (HPI) is a privately financed institute affiliated with the
University of Potsdam, Germany. The Institute‘s founder and benefactor Professor
Hasso Plattner, who is also co-founder and chairman of the supervisory board of
SAP AG, has created an opportunity for students to experience a unique education
in IT systems engineering in a professional research environment with a strong
practice orientation.

In 2005, HPI initiated the research school on „Service-Oriented Systems Engineering“


under the scientific supervision of Professors Jürgen Döllner, Holger Giese,
Robert Hirschfeld, Christoph Meinel, Felix Naumann, Hasso Plattner,
Andreas Polze, Mathias Weske and Patrick Baudisch.

We are expanding our research school and are currently seeking

8 Ph.D. students
(monthly stipends 1450-1650 Euro)
2 Postdocs (monthly stipend 1850 Euro)
Positions will be available starting October 1, 2011.
The stipends are not subject to income tax.

The main research areas in the research school at HPI are:


„ Self-Adaptive Service-Oriented Systems
„ Operating System Support for Service-Oriented Systems
„ Architecture and Modeling of Service-Oriented Systems
„ Adaptive Process Management
„ Services Composition and Workflow Planning
„ Security Engineering of Service-Based IT Systems
„ Quantitative Analysis und Optimization of Service-Oriented Systems
„ Service-Oriented Systems in 3D Computer Graphics
„ Service-Oriented Geoinformatics
„ Human Computer Interaction for Service-Oriented Systems

Prospective candidates should have demonstrated expertise in one of the


above-mentioned research areas and are invited to apply with:
„ Curriculum vitae and copies of degree certificates/transcripts
„ A short research proposal
„ Writing samples/copies of relevant scientific papers (e. g. thesis etc.)
„ Letters of recommendation

Please submit your applications by August 1, 2011 to the coordinator of the


research school:

Prof. Dr. Andreas Polze


Hasso-Plattner-Institute, Universität Potsdam
Postfach 90 04 60, 14440 Potsdam, Germany

Successful candidates will be notified by September 15, 2011 and are expected
to enroll into the program on October 1, 2011.

For additional information see: http://kolleg.hpi.uni-potsdam.de

or contact the office:


Telephone +49-331-5509-220, Telefax +49-331-5509-229
Email: office-polze@hpi.uni-potsdam.de

May 2 0 1 1 | vo l . 5 4 | n o. 5 | c o m m u n ic ati o n s o f t h e ac m 119


last byte

hexgame.pdf 1 3/16/11 1:14 PM

DOI:10.1145/1941487.1941514 Peter Winkler

Puzzled
Games, Roles, Turns
Welcome to three new puzzles. Solutions to the first two will be
published next month; the third is (as yet) unsolved. In each, the issue
is how your intuition matches up with the mathematics.
The theme is games. The twist possible legal moves are C

is a little bit of role-switching, computed, with one chosen M

taking the randomness out of uniformly at random. The CM

MY

poker and putting it into chess. program is designed to quit CY

CMY

if and only if a checkmate or


K

1. Tired of the vagaries of


the random deal, Alice
and Bob embark on a game of
stalemate is achieved or if
only the two kings remain on
the board. The following day,
deterministic draw poker. The Clarissa finds the program
to create a path of blue stones
52 cards are spread out face up. is still running—caught in a
from top to bottom. It is not
Alice chooses five; then Bob loop. How could this happen?
difficult to see that only one
chooses five. Alice can now player can succeed, and that by
discard any number of cards
(which go out of play) and draw
a like number, so she finishes
3. The game of hex (see,
for example, http://
mathworld.wolfram.com/
the time the board is filled one
player must succeed. Also not
difficult to see is that the first
with five cards. It’s then Bob’s GameofHex.html) is played on player (Alice) has a winning
turn to draw; he has the an 11x11 diamond cut from a strategy. Game theory tells us
same options. All actions are hexagonal grid; the figure here that either Alice or Bob has
deterministic and seen by both is of a game, which, with best such a strategy, but it can’t be
players. Finally, Alice and Bob play, will be won by the red Bob because an extra red stone
compare hands. Since Alice player. Invented independently on the board can never hurt
had the advantage of going in the 1940s by two beautiful Alice. The problem is no one
first, Bob is deemed the winner minds on different sides of has been able to devise such a
if the hands are equally good. the world—Piet Hein and John strategy (either for the general
Who wins with best play? Nash—the game is played by nxn game or the standard
alternately placing red and 11x11 game). Your problem,
2. Clarissa, a computer
science major and
president of her university’s
blue stones on the hexagonal
cells. Playing red, Alice makes
the first move, intending to
however, is potentially simpler
than devising a winning
strategy: Prove the eminently
chess club, decides to program create an uninterrupted path plausible statement that one of
her laptop to play random of red stones from left to Alice’s winning first moves is
chess. At each position, all right. Playing blue, Bob tries the center cell.

All readers are encouraged to submit prospective puzzles for future columns to puzzled@cacm.acm.org.
Peter Winkler (puzzled@cacm.acm.org) is Professor of Mathematics and of Computer Science and Albert Bradley
Third Century Professor in the Sciences at Dartmouth College, Hanover, NH.

120 commun ications of t h e acm | may 2 0 1 1 | vol . 5 4 | no. 5


October 22–27, 2011
A SPLASH Conference
Hilton Portland & Executive Tower
Portland, Oregon USA

ONWARD! 2011
ACM Symposium on New Ideas in
Programming and Reflections on Software

Chair
Robert Hirschfeld
Hasso-Plattner-Institut Potsdam, Germany
chair@onward-conference.org

Papers
Eelco Visser
Delft University of Technology, The Netherlands
papers@onward-conference.org

Workshops
Pascal Costanza
Vrije Universiteit Brussel, Belgium
workshops@onward-conference.org

Essays
David West
New Mexico Highlands University, USA
essays@onward-conference.org

Films
Bernd Bruegge
Technische Universität München, Germany
films@onward-conference.org

http://onward-conference.org/
The 2012 ACM Conference on C
Computer Supported Cooperative Work S
)(
2
0
1
C
February 11-15, 2012 | Seattle, Washington 2 W

Call for Submissions Submission


Deadlines
CS
CSCW is an international and interdisciplinary conference on
technical and social aspects of communication, collaboration, and Papers & Notes
coordination. The conference addresses the design and use of 3 June 2011
technologies that affect groups, organizations, and communities.
CSCW topics continue to expand as we increasingly use
technologies to live, work and play with others. Workshops
28 July 2011
This year we have adopted a new review process for papers and
notes intended to increase their diversity and quality. The
submission deadline is early to avoid conflicting with the CHI 2012 Panels
deadline. This enables us to include a revision cycle: Qualifying Interactive Posters
authors can revise their submissions after the initial reviews.
Demonstrations
For more details about CSCW 2012, please review the Call for CSCW Horizon
Participation on our conference homepage, www.cscw2012.org. To Videos
learn about future details as they become available, please follow us
on Twitter (@acm_2012) and/or “like” us on Facebook Student Volunteers
(www.facebook.com/CSCW2012). 9 September 2011
Conference Chairs: Steve Poltrock, Carla Simone
Doctoral Colloquium
Papers and Notes Chairs: Gloria Mark, John Riedl, Jonathan Grudin 16 October 2011
Also consider attending WSDM (wsdm2012.org) immediately before
CSCW 2012.

Sponsored by

http://www.cscw2012.org

You might also like