3D printing a tabletop-size Martian landscape

During the winter of 2016, I was a Science Sandbox Fellow at the New Lab, a futuristic and quirky workspace in the Brooklyn Navy Yard. When I saw the square-meter sized BigRep large-format 3D printer there and was told I had access, I instantly knew I wanted to make a large 3D printed alien landscape. Mars was an easy choice, mainly because I could imagine that in the near future someone might stand on Mars, seeing the same landscape I printed. There is also excellent very high-resolution terrain data available for some regions of Mars, meaning that I could accurately print a region that humans could relate to in scale.

My starting point was to look at the digital digital terrain models, DTMs for short, which are created and released by the HiRISE team. HiRISE is the name of high resolution camera which is run by consortium of NASA Jet Propulsion Laboratory & Arizona Lunar and Planetary Lab. It uses extremely high resolution images taken from two different angles, which are combined with other data to make a highly detailed 3D surface map. The HiRISE camera is on the Mars Reconnaissance Orbiter spacecraft, which has been observing Mars from orbit since March 2006.

An image of a spacecraft with a satellite dish, solar panels, and a gold foil central body over the rusty red cratered surface of Mars, with lines indicating the atmosphere interacting with the motion of the spacecraft.

An image of the Mars Reconnaissance Orbiter aerobraking in the Martian atmosphere upon its arrival. NASA/JPL/Corby Waste

I searched through the several hundred DTMs available at the time looking for particularly interesting terrain to print, and settled on this fascinating layered landscape in the giant Martian canyon Valles Marineris. The canyon measures one fifth the total circumference of Mars, stretching the distance from New York to L.A., and is four times as deep as than the Grand Canyon. The printed area covers a tiny fraction of Valles Marineris located in the southwest part of the sub-region Candor Chasma. This area of Mars is not only visually striking, but also interesting from a scientific perspective – the layered hills in this area are thought to be formed by deposits from extremely salty water early in Mars’ history. More information about the geologic processes that shaped this area can be found in this paper and presentation.

 

To import the terrain data, I used the HiRISE DTM plugin for the free 3D modeling program Blender, which made it very easy to get the terrain into a mesh format which can be manipulated (see the plugin tutorial). The mesh is so detailed that keeping it at full resolution will likely crash the program, and also is more detailed than our 3D printer can handle. If we were printing at the full resolution of the HiRISE data, we could resolve shockingly small features only ~80 cm in size!

Due to the combination of the printer resolution and the area of the model used, which covers about 4 km x 4 km, the actual resolution of the 3D print is less. After importing the mesh, I extruded the landscape, and cut the bottom. Margaret Hewitt of BigRep was very helpful with cleaning the 3D model using Rhino and preparing it to print.  During test printing we found that the print came out much smoother and less “terraced” when printed vertically, standing on a thin edge. The 3D printer used was the BigRep One, and was printed as a set of 16″ x 16″ tiles to help cut down on warping, making a total area of 32″ x 32″. It was printed with heat-tolerant, silver colored PRO HT filament since I though I might be vacuum forming over the tiles.

I wanted the surface to resemble Mars as much as possible, so I gave the print a coat of fine stone texture spray paint, and then layered on other paints using the color HiRISE images as a guide. I sealed with many layers of clear matte finish so that the surface could be touched.

The Marscape is currently being used in astronomy classes at CUNY’s LaGuardia Community College, and will be used for in the future for programs for visually impaired at the American Museum of Natural History and other educational programs. If you have any ideas about how the print can be used, or if you’re in the NYC area and would like to borrow it for educational purposes, please let me know.

Finally I’d like to thank the folks at New Lab, Science Sandbox, BigRep, and the Simons Foundation for supporting the project and generally doing amazing things, particularly Greg Boustead, Hannah Max, Mari Kussman, Alex Susse, and Margaret Hewitt.

colorfulmars

Colorfully painting one of my test prints, because why not?

An evening of insect delights

I didn’t expect to spend my Thursday night eating insects, but I ended up at Alchemist’s Kitchen with a panel of proponents of entomophagy. I’m usually a vegetarian, but broke with that rule to try some insect-based offerings. I’m not sure if insects have consciousness or not, and I’d want more study on that before supporting entomophagy on a large scale, but I think it is both possible and beneficial to offset some of our dietary protein with insect protein. There are several argued benefits. One is environmental – insect production takes about three hundred times less water per unit protein than meat production. Another is ethical. While it could be the larger number of individuals per unit protein outweighs everything else, most people would say a single cricket is less capable of suffering than an individual cow.

It’s one thing to say it’s likely to be beneficial, another to argue that western society will accept eating insects when there is such a strong aesthetic prejudice against it. I felt it a little grossed out when eating the insects, but no more than I felt while eating particularly meat-like substitutes like the impossible burger.

The appetizers at the event were prepared by chef Joseph Yoon, and were delicious. Some of the bites had obvious crickets and wax worms on top, lending them some shock value. Others were subtle, with cricket flour (read: ground cricket) mixed in. The crickets tasted earthy or nutty, the I couldn’t taste the wax worms. I think it was just a coincidence, but I did end the evening with an upset stomach.

The event was hosted by Paul Miller, who pointed out the importance of less water and energy intensive farming methods in the context of global warming. One of the panelists, Robyn Shapiro, sells cricket-flour containing balls through her company Seek. I tried her coconut flavored cricket balls and liked them, they reminded me a bit of Lara Bars. Mitchell Joachim presented his work with Terreform ONE, an architecture firm based at New Lab. They designed a futuristic looking cricket shelter, which is a modular insect farm designed to both house the crickets and encourage mating with acoustic effects.

There are some specific benefits of eating insects I personally find interesting. I’ve been anemic since before I went vegetarian, and I struggle to get enough iron in my diet. Cricket flour contains over three times the iron as the same quantity of spinach, one of the richest vegetarian sources of iron. I can’t see entomophagy catching on without some major cultural shifts, but as the panelists noted, until recently lobster was once considered an undesirable food as well, so tastes change.

terreform1

Terreform ONE’s futuristic cricket farm design

I grew a plant pot out of mushrooms the other day

These days I’ve been spending time at New Lab, a shared office space filled with futuristic start-ups working in 3D printing, robotics, design, and A.I., as a part of the Science Sandbox fellowship. Being there sometimes feels a bit like I’m in a mash-up of Star Trek and the Fifth Element, which is exactly where I’d most like to be in the universe. So I suppose I shouldn’t have been surprised when someone walked into my office and says, want to go to a mushroom workshop? Let me think…

The workshop was held by Danielle Trofe, a designer who is headquartered in Industry City. To make our pots, we used the same mycelium-infused material she uses in her MushLume lighting collection, which looks a bit like a hobbit’s version of high design. The same material was used to make a series of unusual benches at New Lab.

MyceliumBench

Sitting on a fungal bench, nbd.

We started by sanitizing the surfaces of a plastic take out container and plastic drinking cup that together would serve as the mold for our planters. The grow-it-yourself material, which is brown and looks like mulch, is made out of corn husks and other agricultural byproducts which has been infused with liquid mycelium (you can buy it yourself at www.ecovativedesign.com).

We filled the containers and watched as over the course of 4 days, the brown material slowly became more white as the mycelium grew, binding the pot together. I removed the pot from the mold and enclosed in a puffed-up plastic bag so that it could have the freedom to grow a nice, soft white layer on the outside surfaces of the pot without drying out. The final step made me feel strangely guilty – you kill the growth by baking it in at 200 degrees in the oven for an hour. The final product is light and has give, and feels like you grew a pot out of mushrooms. It even has that lovely earthy fungal aroma.

MyceliumPot

The mycelium pot and its succulent tenant.

Dupe Snoop: Identify duplicate questions on Quora

This post describes a project I completed as an Insight Data Science fellow, a program which helps PhD academics transition to careers in Data Science.

Introduction

Quora is a website where users from the general public can ask questions and crowdsource answers. Posted questions can have multiple answers, and users upvote answers according to their usefulness. As Quora has grown, so has their problem with duplicate questions. The Quora management has identified question duplicates as a major threat to the quality of their product. As well as being annoying, repeated questions divide useful answers and their upvotes among the duplicates, making it challenging for users to find useful answers. To address this problem, Quora allows duplicate questions to be merged. Even with this feature, the site is still struggling with a proliferation of duplicate questions.

A screenshot of a Quora question asking why there are so many duplicate questions on Quora, which itself has been merged with a duplicate of itself. Meta.

Data

On January 30th, 2017, Quora released a dataset of over 400 thousand question pairs, some of were asking the same underlying question and other pairs which were not. The non-duplicate pairs were supplemented with questions which were asking about the same topic and represent topically related but semantically distinct questions. The question pairs were labelled by human taggers as true duplicate questions or non-duplicates, although this labelling is not perfect. (Update: I started on the dataset the day it was released but since then it has gained an associated Kaggle competition where you can find examples of a variety of approaches.)

Two examples from the dataset, one which is asking the same underlying question and one which is topically related, semantically similar, but syntactically distinct.

Method

For my Insight Data Science project, I used natural language processing (NLP) methods to classify these question pairs as either likely duplicates or distinct questions. This is a challenging NLP problem because of the questions are very short, meaning there are few semantic features to use to determine similarity. Subtle changes can also lead to large differences in meaning. As an example, take the questions, “What do women want from men?” and “What do men want from women?” To a simple bag-of-words (BOW) models, which discard grammar or word order information, these questions look exactly the same. When I applied BOW models to the Quora duplicate problem, this was a common failure mode. This suggested to me that despite the additional complexity and computational investment, the best choice for the problem would be an NLP approach which takes into account syntactic information.

Of the approaches I tested, the one with the highest accuracy is based on skip-thoughts. The reason I was drawn to this model was seeing its success on a task determining semantic similarity between short sentence pairs.

From Kiros et al. 2015. Each sentence pair was evaluated by a human for similarity, which is listed in this figure as GT, or ground truth, scored from 1-5 with 5 being the most similar. Skip thoughts performed favorably on these metrics compared to other state of the art NLP methods.

Skip-thoughts provides a method for encoding sentences as whole as vectors as opposed to ad-hoc sentence encodings created by combining vector embeddings for individual words in a sentence, a common NLP approach. The model I used was trained with a recurrent neural network over a period of several weeks. The input for the unsupervised training was a large corpus of unpublished books containing over 74 million sentences. Resulting sentence vectors are embedded in a 4800 dimensional space, and questions encoded using the model which have similar vector representations should represent semantically and syntactically similar questions.

Visual description of the question comparison process.

I used the skip-thought model to encode each of my questions into a vector representation, and then computed what is called the cosine similarity, which compares the two vector representations accounting for the angle between the two vectors. The output from running this method on a subset of the question pairs shows that pairs with high cosine similarity are more likely to be duplicate questions.

Distributions of both duplicate and non-duplicate question pairs as a function of cosine similarity.

The accuracy of the skip-thought classification as a function of the cosine similarity threshold, and tops out at around 67%. It’s likely that the variation seen in the accuracy for cosine similarity thresholds above is due to noise.

Accuracy of question pair classification for the skip-thought method as a function of the cosine similarity threshold.

The receiver operating characteristic (ROC) curve, which plots the false positive rate against the true positive rate, is commonly used to determine the performance of classification tasks. It shows that my Quora question pair classification does much better than random, which would be represented by the blue dotted line.  The area under the ROC curve (known as AUC) is 0.72.

Receiver operating characteristic curve, showing classification is much better than random, with an area under the curve (AUC) of 0.72.

Below a certain threshold in cosine similarity, the algorithm identifies non-duplicate pairs with high confidence, which could eliminate a large population of questions from the pool slated for manual review. For those questions which high cosine similarity, however, the false positive rate is high. This method would be best suited to augment and human duplicate identification and make that process more efficient.

If I had time to invest further work towards improving the accuracy of the method, I would apply linguistic parsers or parts of speech identifiers and see if this could be used to engineer relevant features which provide additional clues for question discrimination or could be used in concert with other machine learning algorithms suited to classification problems.

Appendix: Other approaches

Since this was my first foray into NLP, I initially attacked the problem with simple method known as term-frequency – inverse document frequency (tf-idf). Term frequency refers to the number of times a term occurs in a document, logarithmically scaled. The inverse document frequency is the inverse fraction of documents which contain that term, also logarithmically scaled. This has the effect of down weighting the importance of common terms and up weighting the importance of rare terms when determining the The tf-idf is then calculated by multiplying the term frequency by the inverse document frequency. The resulting matrix represents weighted word frequencies and can be used to compare each question pair.

A bumper sticker for bag of words model enthusiasts, drawing attention to the fact that bag of words models disregard both grammar and word order. Modified from a design by Othar Hansson.

Word2vec from the gensim package is commonly used for python-implemented NLP tasks, and it enables training of models for vector encoding and decoding of words. Word2vec based models can contain impressively deep information about the relationship between words. In an oft-cited example for a popular word2vec model, if vector(“Madrid”) represents the vector for Madrid, then vector(“Madrid”) – vector(“Spain”) + vector(“France”) is closest to vector(“Paris”), despite the model not being explicitly told about country/capitol city relationships.

In addition to skip-thoughts, I also applied several word2vec methods. I trained a custom 300-feature skip-gram word2vec model on all words found in the training questions, which represented 80% of the total set of question pairs. Another approach was to use a word2vec model which was pre-trained on a large corpus of Google News articles, yielding a vocabulary of 3 million words, each encoded by a vector with 300 features. Questions were compared to one another using cosine similarity. A third word2vec method I tried used the same Google News word2vec pre-trained model but compared the question pairs using word movers distance, which is an extension of the earth movers distance problem. In each case I removed common words called stopwords.

I tried several approaches over the course of the project, some of which came in slightly below the performance of skip-thoughts. The approaches had AUCs of 0.63, 0.69, 0.70, and 0.70, for tf-idf, word2vec self-trained model, word2vec Google News pre-trained model, and word2vec pre-trained model using word movers distance, respectively.

 Acknowledgements

I would like to thank my fellow Insight Data Science fellows and coordinators for their invaluable feedback. I would especially like to thank Andrej Ficnar and Dan Vatterott for their useful suggestions.