Is it possible to remove classes from a field that uses the Rendered entity format? I have an entity reference field that is being handled by Display Suite. Even when setting the field template to expert, I can't completely strip away the default classes. The markup still has a div wrapper like so:

&lt;span class="field-content"&gt;
  &lt;div about="/products/chicken-breast-tenderloins" typeof="sioc:Item foaf:Document" class="ds-1col node node-product node-promoted node-teaser contextual-links-region view-mode-teaser clearfix"&gt;
    &lt;div class="contextual-links-wrapper contextual-links-processed"&gt;
      &lt;a class="contextual-links-trigger" href="#"&gt;Configure&lt;/a&gt;
      &lt;ul class="contextual-links"&gt;
        &lt;li class="node-edit first"&gt;&lt;a href="/node/37/edit?destination=node/23"&gt;Edit&lt;/a&gt;&lt;/li&gt;
        &lt;li class="node-delete"&gt;&lt;a href="/node/37/delete?destination=node/23"&gt;Delete&lt;/a&gt;&lt;/li&gt;
        &lt;li class="manage-display last"&gt;&lt;a href="/admin/structure/types/manage/product/display/teaser?destination=node/23"&gt;Manage display&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;  
    &lt;a href="/products/chicken-breast-tenderloins"&gt;Chicken Breast Tenderloins&lt;/a&gt;
  &lt;/div&gt;
&lt;/span&gt;


Is there any way to remove those classes? Like maybe using a preprocess function or something?
Generally:
You could modify the display of the content type referenced by the Entity reference field. There you can use Display suite again for formatting the fields of the referenced content type and have it styled your way.

Especially, regarding this:

&lt;div class="contextual-links-wrapper contextual-links-processed"&gt;
  &lt;a class="contextual-links-trigger" href="#"&gt;Configure&lt;/a&gt;
  &lt;ul class="contextual-links"&gt;
    &lt;li class="node-edit first"&gt;&lt;a href="/node/37/edit?destination=node/23"&gt;Edit&lt;/a&gt;&lt;/li&gt;
    &lt;li class="node-delete"&gt;&lt;a href="/node/37/delete?destination=node/23"&gt;Delete&lt;/a&gt;&lt;/li&gt;
    &lt;li class="manage-display last"&gt;&lt;a href="/admin/structure/types/manage/product/display/teaser?destination=node/23"&gt;Manage display&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


There is an option "Display Links" on the Rendered Entity. If you uncheck this, you can get rid of this code. This is done in the content type where  the Entity Reference field is included, not in the referenced conten type.

If you want to change this:

&lt;div about="/products/chicken-breast-tenderloins" typeof="sioc:Item foaf:Document" class="ds-1col node node-product node-promoted node-teaser contextual-links-region view-mode-teaser clearfix"&gt;


Go to the content type you are referencing and check the display. It seems you are using the 1 Col Display, so you can use ds-1col.tpl.php template. There you can change the classes.